[Ffmpeg-devel] DAR and SAR FFmpeg option confusion

Michael Niedermayer michaelni
Thu Mar 15 14:37:19 CET 2007


Hi

On Wed, Mar 14, 2007 at 09:02:30PM -0700, Roman Shaposhnik wrote:
> Hi
> 
> On Tue, 2007-03-13 at 20:14 +0100, Michael Niedermayer wrote:
> > >   I don't think its just DV, but that aside -- it seems that we've got
> > > three ways of solving this issue:
> > >   
> > >     * as you and M?ns pointed out admitting that the DAR is 15:11 will
> > >       do the trick. I guess it'll mean lots of FAQing, but that's ok
> > > 
> > >     * somehow make libavcodec aware that there's a smaller DISPLAY area
> > >       embedded inside the coded frame. And for that area the SAR is 
> > >       (obviously!) the same, but the DAR is what everybody expects it
> > >       to be
> > 
> > there is AVFrame.pan_scan to specify display areaS though i dont see how
> > that would affect the DAR disscussion
> 
>   My thinking was that if we start using those everything that has to do
> with calculating SARs based on geometry and DARs could first check
> for the DISPLAY geometry (perhaps that's what AVFrame.pan_scan should be
> used for) and only if its not set check for the regular height and
> width. That way, the math that initiated this very thread would still
> work and not only that but everybody can happily use 4:3 as the DAR
> instead  of some weird #s.

there is just one little problem what do you do if there are multiple
display resolutions? thats perfectly valid in some codecs also it makes
practical sense, if your file is supposed to be playable on several different
devices which have different resolutions (and display aspect ratios)
then storing the location of the rectangle which is intended for display
makes sense ...


> 
>   Now, should I start filling AVFrame.pan_scan in DV codec ? IOW,
> was introduced to handle exactly what I'm talking about here or
> is it just one of those MPEG2/MPEG4 oddities ?

you can fill pan_scan with the display size and position if that differs from
the whole frame, yes

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070315/686375be/attachment.pgp>



More information about the ffmpeg-devel mailing list