Hello all,
I'm dealing with an unexpected memory allocation by av_image_alloc(). The
code in question is:
AVFrame* picture_yuv_filtered = av_frame_alloc();
picture_yuv_filtered->format = codec_ctx->pix_fmt; // AV_PIX_FMT_YUV420P
picture_yuv_filtered->width = codec_ctx->width; // 720
picture_yuv_filtered->height = codec_ctx->height; // 576
ret = av_image_alloc(picture_yuv_filtered->data,
picture_yuv_filtered->linesize,
codec_ctx->width, codec_ctx->height, codec_ctx->pix_fmt, 32);
This returns linesizes of {736, 384, 384}, which is expected.
However, the pointers in the picture_yuv_filtered->data point to addresses:
[0] 22F40h
[1] 8A740h
[2] A5740h
The Y plane memory area ([1]-[0]) is just right, but the U plane ([2]-[1])
is half the required size.
Am I overlooking something here?
BR,
~Justas
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user