[FFmpeg-devel] [PATCH v6] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette
Mats Peterson
matsp888 at yahoo.com
Wed Feb 10 12:26:09 CET 2016
On 02/10/2016 11:14 AM, Mats Peterson wrote:
> On 02/10/2016 10:12 AM, Mats Peterson wrote:
>> The stride will be calculated incorrectly for the attached 3 x 3 pixel
>> pal8 nut file, since there is some padding in the packet after the video
>> data and before the palette. It will be properly rounded down to the
>> real width of the video data for larger sizes, but this one will be 4
>> instead of 3. I've tried a 1x1 file, but that one wouldn't play at all.
>> Anyway, run ffplay with "-v debug" to output the packet size and the
>> stride.
>>
>> If you have a better solution, feel free to change the stride
>> calculation code.
>>
>
> Perhaps it's not that bad after all, because before this patch, any
> odd-width pal8 nut file would be skewed on display. And there aren't too
> many people who use 3 x 3 pixel videos. But it's a bit irritating
> nevertheless.
>
When using "-vcodec copy" with pal8 nut as the output, FFmpeg will
happily copy the video to the file without ever considering the stride
of it. Therefore, it's not possible to base the stride on avctx->width
for nut. It would of course be much easier. One will have to divide the
packet size with the height, in the same way as the stride is calculated
for AVI and QuickTime. They don't contain any palette in the packets, of
course.
Mats
More information about the ffmpeg-devel
mailing list