[FFmpeg-devel] [PATCH v4] lavc/rawdec: Use AV_PIX_FMT_PAL8 for 1-bit raw AVI video
matsp888 at yahoo.com
Thu Jan 21 02:12:16 CET 2016
On 01/20/2016 03:25 PM, Mats Peterson wrote:
> On 01/20/2016 02:55 PM, Mats Peterson wrote:
>> This version uses 8-byte alignment of lines. However, this generates
>> "Warning. Data is not aligned!" messages for odd widths. Don't know how
>> important this is.
> I should add that both the 4 bpp (8 bytes alignment) and 8 bpp (4 bytes
> alignment) depths are already "misaligned" without my help, so perhaps
> it's not that bad to use 8-byte alignment for 1 bpp as well?
Now when I think about it, there is no real benefit with this version
over version 2 which uses 16-byte line alignment, except one line of
calculation less in the loop. The size of the frame will be set with
"context->frame_size = av_image_get_buffer_size(avctx->pix_fmt,
FFALIGN(avctx->width, 16), avctx->height, 1)" at the beginning of
raw_decode() anyway, so it won't matter if we use 8-byte alignment or
anything less than that. Better use version 2 instead.
More information about the ffmpeg-devel