[FFmpeg-devel] avformat/mxfenc: fix stored/sampled/displayed width/height

Jerome Martinez jerome at mediaarea.net
Sun Jan 15 16:24:37 EET 2023


On 14/01/2023 21:04, Michael Niedermayer wrote:
> On Sat, Jan 14, 2023 at 04:48:10PM +0100, Jerome Martinez wrote:
> [...]
>> +        stored_height = (stored_height+15)/16*16;
> If this is supposed to match the actual macroblocks, then this would
> have to consider field pictures and interlacing as it differs from
> progressive

There is no change on that side, no addition, no change about it, this 
code is moved, and interlace is already managed in the current code:

     //Stored height
     mxf_write_local_tag(s, 4, 0x3202);
     avio_wb32(pb, stored_height>>sc->interlaced);
[...]
    //Display height
     mxf_write_local_tag(s, 4, 0x3208);
     avio_wb32(pb, display_height>>sc->interlaced);

The patch disables the rounding for some formats, it is not intended to 
change the behavior for MPEG-2 Video and AVC formats as it seems fine 
(FFmpeg has the same behavior as other muxers, at least for MPEG-2 
Video, also for interlaced content).



More information about the ffmpeg-devel mailing list