[Libav-user] Copying pixels directly from AVFrame->data, possible alignment error.
Jesper Taxbøl
jesper at taxboel.dk
Thu Jun 9 20:20:33 CEST 2016
uint64_t src_i = (xx+(yy*src_camera_width))*3;
r = f->pAVFrame->data[0][src_i+0];
g = f->pAVFrame->data[0][src_i+1];
b = f->pAVFrame->data[0][src_i+2];
On 9 Jun 2016 3:02 pm, "Jesper Taxbøl" <jesper at taxboel.dk> wrote:
> I am doing a pixel based transformation directly on an AVFrame->data[0]
> array, and I am experiencing the following artefact:
>
> http://i.imgur.com/vnABDjE.png
>
> The source frame I am working on is 3840x2160 pixels in AV_PIX_FMT_BGR24
> format which should place all pixels in the first data array, in BGR order.
>
> The bottom 1/3 part of the picture has a problem with the colors, and I
> suspect that the pAVFrame has an alignment problem and I just by chance hit
> some data that maps to pixels.
>
> Any Idea what I am doing wrong?
>
> Kind regards
>
> Jesper Taxbøl
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160609/44a7e0b4/attachment.html>
More information about the Libav-user
mailing list