[Ffmpeg-devel] [Ffmpeg-devel-old] Question aboutinterlaced_frame and top_field_first

Luca Abeni lucabe72
Mon Jan 30 10:17:01 CET 2006


Hi Michael,

On Sun, 2006-01-29 at 04:05 +0100, Michael Niedermayer wrote:
[...] 
> > If I understand well, interlaced_frame and top_field_first are set by
> > the video codec (CODEC_ID_RAWVIDEO): how can the input format tell the
> > video codec how to set such fields? I immagine I can modify
> > raw_init_decoder() to properly set interlaced_frame and top_field_first
> > in priv_data.pic... But how can it decide if frames will be interlaced
> > or not? Should I add a new field to AVCodecContext? Or there is a simple
> > way that I am not seeing?
> 
> maybe try to set the flags in AVCodecContext.coded_frame but dont forger
> to check for NULL
I tried this, but it does not work... If I understand well, the raw
decoder does not use coded_frame at all (but maybe I am misreading
something): it sets up codec_frame in the _init function, but then it
does not use such fields in the decode() function.

So, I think raw_decode() should be fixed to copy the fields form
coded_frame to the decoded frame... Or am I misunderstanding how things
work?

BTW, I see that raw_decode() does this:
static int raw_decode(AVCodecContext *avctx,
                            void *data, int *data_size,
                            uint8_t *buf, int buf_size)
{
    RawVideoContext *context = avctx->priv_data;
    int bytesNeeded;

    AVPicture * picture = (AVPicture *) data;
[...]

I think this "AVPicture * picture" should be changed in "AVFrame *",
right?
I'll try to patch raw.c in such way, to see if this idea works.


			Thanks,
				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Novit? per telefonare risparmiando: Email.it Phone Card, clicca e scopri i vantaggi
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2689&d=30-1





More information about the ffmpeg-devel mailing list