[FFmpeg-soc] avfilter: what data ought to be available for configuration?

Michael Niedermayer michaelni at gmx.at
Sat May 17 23:17:26 CEST 2008


On Sat, May 17, 2008 at 09:15:10PM +0100, vmrsss wrote:
> I am forwarding for general discussion a thread I started privately  
> with Vitor. Please, read below.
> 
> Begin forwarded message:
> > vmrsss wrote:
> >> Hi Vitor,
> >>    I am trying to access from config_input the SAR of the source  
> >> picture as in:
> >>> static int config_input(AVFilterLink *link)
> >>> {
> >>>    PadContext *pad = link->dst->priv;
> >>>    int width = link->w;
> >>>    int height = link->h;
> >> ...
> >>>      if ( pad->a > 0.0f ) {
> >>>        float aspect = pad->a;
> >>>        aspect *= (double)link->srcpic->pixel_aspect.num/link- 
> >>> >srcpic->pixel_aspect.den;
> >> ....
> >> bad idea because link->srcpic == NULL at that stage of the filter  
> >> chain. Do you know how to get that information there? (The reason I  
> >> need it is that without the SAR, I can't really compute the final  
> >> aspect in the padding filter.)
> >
> > The problem is that the way the pixel_aspect is handled in lavf, it is
> > a field of each one of the pictures (I wonder what is the use of that,
> > if you can't change dimensions on the fly, why would you need to  
> > change
> > the pixel aspect ratio?). 

Well, maybe we one day will fully support changing dimensions on the fly.
Adding a sample_aspect_ratio to AVCodecContext would surely be possible
if this solves the problem.

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

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080517/01456b10/attachment.pgp>


More information about the FFmpeg-soc mailing list