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.

> 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.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to