On Wed, Apr 13, 2011 at 11:47:44AM +0200, Alberto Delmás wrote:
> 2011/4/13 Kostya <[email protected]>:
> > Unfortunately, that's the problem with decoder, or rather libraries around 
> > it.
> > Display dimensions are supposed to be for the picture what codec _shows_, 
> > not
> > decodes. In theory avctx->coded_{width,height} should be used to set pucture
> > dimensions so cropping to display size can de done later. In practice it's
> > not.
> 
> {width,height} can differ from coded_{width,height} when lowres is
> used (and in that case you do want a smaller buffer). However, there's
> no place to specify display dimensions other than sample_aspect_ratio.
> The Matroska demuxer (which also deals with display dimensions)
> follows the same approach and translates them to SAR.

lowres is a hack made too global - it works passably only on 8x8 DCT codecs
and causes problems for everything else

> > Since display dimensions are not optional there (and not allowed to be zero
> > either), one should blame {him/her/it}self for encoding bad values (lavc
> > silently failing is another issue).
> >
> > As for the patch, approach seems to be correct but why it's done only for
> > standard aspect ratios?
> 
> I'm not sure I follow you here - if there's explicit SAR information,
> it is used and display dimensions are ignored. Otherwise, display
> dimensions are converted to the corresponding SAR. This is done for
> any aspect ratio.

I've seen display information used for cropping - e.g. adjust picture
dimensions for odd dimensions. But probably the best is to ignore them
completely indeed and your patch may be correct (I don't know).
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to