[FFmpeg-devel] [RFC]lavc/mjpegenc_common: Fix aspect ratio
george at nsup.org
Mon Dec 10 18:38:37 EET 2018
Moritz Barsnick (2018-12-10):
> That was my interpretation. It's a density, if units != 0, otherwise
> the aspect ratio. (Would a density not correspond to the SAR? I.e. not
> make sense with square pixels?)
I did not follow the beginning of the discussion, but just in case it
can help and was not obvious in the first place:
Having a density makes sense even for square pixels to carry the
information of the physical size of the image. It makes sense if the
original has a well-defined physical size, like a scanned document.
Also, the density can give the aspect ratio, but there is a catch: if
the density is 20 px/mm horizontally and 10 px/mm vertically, that means
pixels are (1/20)×(1/10) mm², hence their aspect ratio is 10/20 = 1/2,
not 20/10 = 2/1.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Digital signature
More information about the ffmpeg-devel