[FFmpeg-devel] [PATCH] [MXF] - Set aspect ratio for jpeg2000 images

Tomas Härdin git at haerdin.se
Tue Jan 30 11:47:17 EET 2024


fre 2024-01-26 klockan 10:12 -0800 skrev Pierre-Anthony Lemieux:
> On Fri, Jan 26, 2024 at 10:02 AM Cédric Le Barz <clebarz at ektacom.com>
> wrote:
> > 
> > Set aspect ratio for jpeg2000 images.
> 
> "The image area on the reference grid is defined by its upper left
> hand reference grid point at location (XOsiz, YOsiz), and its lower
> right hand reference grid point at location (Xsiz – 1, Ysiz – 1)"
> (15444-1, 8.2)
> 
> AFAIK setting the MXF aspect ratio item to the ratio of the image
> pixel dimensions only works if (a) the pixel aspect ratio is 1 and
> (b)
> the video is not interlaced -- see 6.2.1.2 and Annex H at
> https://pub.smpte.org/doc/st2067-21/20221124-pub/.

You also need to know the display rectangle. If for example VBI lines
are present then these might also need be cropped, in addition to the
cropping done at the J2K level. Sometimes container and essence
disagree on what SAR is, which affects the DAR. Which value is the
correct one typically depends on business logic

A demuxer is the wrong place to put logic like this

/Tomas


More information about the ffmpeg-devel mailing list