[MPlayer-dev-eng] About the future - libvo2...

Ivan Kalvatchev iive at yahoo.com
Wed Nov 7 19:28:56 CET 2001


--- Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
> 
> On Wednesday 07 November 2001 13:48, Ivan Kalvatchev
> wrote:
> > --- Arpi <arpi at thot.banki.hu> wrote:
> >
> > How about
> > struct Frame{
> > int imgfmt;//RGB, BGR,yv12,yuyv
> > void * base0;//R or B or Y
> > void * base1;//G or      V or U
> > void * base2;//B or R of U or V
> > void * base3;//Quantizatio for pp
> uint8_t * seems to be a better choice imho
> uint8_t *rgb, *y, *u, *v, *yuv;
> uint32_t *qp;
> 
> > int x,y;
> int width, height or w, h (x, y can be
> missunderstood)
> 
> > int stride0;
> > int stride1;
> ok and which base uses which stride?!
> int yStride, uStride, vStride, packedStride;
> int qpStride; // for pp
let it be
stride0;//yStride,packedStride,rgbStride
stride1;//uStride=vStride, as far as i know
stride2;//qpStride, i thought it is fixed
i don't like unions, but it could be done as you say,
one variable for each

> 
> > int flags;//can we write in this frame? (minimize
> > coping of frames)
> > ...//more ideas
> > };
> >
> > int convert(struct Frame *dst,struct Frame *src){
> > if( dst->imgfmt==src->imgfmt) return OK;//
> > ...
> > }
> we should support converting a just few lines at a
> time, this would be faster 
> because of fewer memory accesses
> we really need a init function (to select the best
> combination of converters 
> and to init some stuff (palette conversion, look up
> tables, mmx2 scaler)
>
> Michael

I don't see any problem here. Just make so:
int  negotiate(struct Frame *src, struct Frame *dst
struct vo2_hadle_t * video_dev);//fill dst with best
img_fmt for video_device
struct * ci  convert_init(struct Frame *dst,struct
Frame);
int convert_slice(struct  covinfo * ci, int starty,int
endy);
int convert_end(struct convinf *ci);


Why i made negotiate and covert_init? 
We should be able to have some control over dst image,
like crop, center, scale etc..
More, negotiate must be configureable.

Best Regards
   Ivan Kalvachev
p.s. find some better name than 'Frame'



__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com



More information about the MPlayer-dev-eng mailing list