[XviD-devel] api 3.0 branch

peter ross xvid-devel@xvid.org
Mon, 23 Sep 2002 22:53:15 +1000


> > the new api's auto width/height detection code works rather well; ive
> > modified the dshow frontend to support the ligos .mp4 splitter. the
> > splitter only supports certain .mp4 types, urgh, but its a start.
>
>Is there an API description already? I was waiting for this feature
>for xvid-raw decoder.

ive posted the v3 "xvid.h" to this mailinglist, but the supporting
code sits on my computer. when its done i will commit to dev-api-3, 
currently it breaks everything BUT decoding.

> > this leads me to another question (well its already been mentioned):
> > i think its time we implement buffer underrun detection. eg. when the
> > decoder runs out of bits when decoding an image/header. it shouldnt be
> > too difficult to implement using setjmps,etc.
>
>Yes, would be a good idea.

gonna require some changes to the api though.
iam also debating with myself how to better implement VOL, VOP
and other mpeg4 data types (e.g. mesh,fba ?) into the decoder.
one way be be to be use a libmpeg2-style api :

struct
{
   int general;        /* [in]      general flags */
   void * bitstream;   /* [in]      input bitstream */
   void length;        /* [in]      input bitstream length (bytes
                          [out]     bitstream bytes consumed */
   void * data;        /* [out]     ptr to data struct */
} XVID_DEC_FRAME;

e.g.

retry:
    result = xvid_decore (...XVID_DEC_DECODE...)
    switch(result)

     case XVID_DEC_MOREBITS :
         /* load more bits into buffer */
         goto retry;

     case XVID_DEC_INFO :
         /* data-> points to some vol info */
         goto retry;

     case XVID_DEC_IMAGE :
         /* data-> points to the internal xvid yv12 image structure */
         /* the application must then convert yv12 to the desired
              colorspace */
         break;

     case XVID_DEC_XXX :  /* some other mpeg4 data type */
         /* data->points to the structure */
         break;

     default :
         /* error */
         break;
}

xvid then needs to provide colorspace conversion routines.
btw, this kinda breaks albans render-by-slice support.

comments welcome!

-- pete

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com