[Mplayer-cvslog] CVS: main/postproc rgb2rgb.c,1.48,1.49 rgb2rgb.h,1.20,1.21 rgb2rgb_template.c,1.50,1.51 swscale.c,1.90,1.91 swscale_template.c,1.77,1.78 yuv2rgb.c,1.10,1.11 yuv2rgb_mlib.c,1.2,1.3 yuv2rgb_template.c,1.10,1.11

Michael Niedermayer michaelni at gmx.at
Sat Jun 22 15:01:03 CEST 2002


Hi

On Saturday 22 June 2002 10:49, Arpi of Ize wrote:
> Update of /cvsroot/mplayer/main/postproc
> In directory mail:/var/tmp.root/cvs-serv17336
>
> Modified Files:
> 	rgb2rgb.c rgb2rgb.h rgb2rgb_template.c swscale.c
> 	swscale_template.c yuv2rgb.c yuv2rgb_mlib.c yuv2rgb_template.c
> Log Message:
> sync with mplayer xp
> - partial yvu9 support (copy only)
> - rgb 15/16 -> 24/32 converters
> - int->unsigned changes
[...]

> -  mm_end = end - 23;
>    __asm __volatile("movq	%0, %%mm7"::"m"(mask32):"memory");
> +  mm_end = (uint8_t*)((((unsigned long)end)/24)*24);
hmm, this (and the follwing changes to mm_end) might reverse a fix of several 
memory corruption bugs, i spended some time verifying and fixing these 
routines, did nick or u check that too? if yes than i have no problem with 
this change

[...]
>  //FIXME replace this with something faster
> -#define isPlanarYUV(x) ((x)==IMGFMT_YV12 || (x)==IMGFMT_I420)
> -#define isYUV(x)       ((x)==IMGFMT_YUY2 || isPlanarYUV(x))
> -#define isHalfChrV(x)  ((x)==IMGFMT_YV12 || (x)==IMGFMT_I420)
> +#define isBGR(x)       ((x)==IMGFMT_BGR32|| (x)==IMGFMT_BGR24||
> (x)==IMGFMT_BGR16|| (x)==IMGFMT_BGR15) 
> +#define isRGB(x)      ((x)==IMGFMT_RGB32|| (x)==IMGFMT_RGB24|| 
> (x)==IMGFMT_RGB16|| (x)==IMGFMT_RGB15)
((x)&IMGFMT_BGR_MASK)==IMGFMT_BGR would be faster

> +#define isPlanarYUV(x) ((x)==IMGFMT_YV12 ||
> (x)==IMGFMT_I420 || (x)==IMGFMT_IYUV|| (x)==IMGFMT_YVU9 ||
> (x)==IMGFMT_IF09) 
unneeded dupplicate checks

[...]

> +#define isHalfChrV(x)  ((x)==IMGFMT_YV12 || (x)==IMGFMT_I420 ||
> (x)==IMGFMT_IYUV)
unneeded dupplicate checks

[...]

> +#define isSupportedUnscaledOut(x) ((x)==IMGFMT_YV12 || (x)==IMGFMT_I420 ||
> (x) == IMGFMT_YUY2 \ 
> +			|| (x)==IMGFMT_BGR32|| (x)==IMGFMT_BGR24||
> (x)==IMGFMT_BGR16|| (x)==IMGFMT_BGR15)
i dont like half supported formats, imho we should allways support scaling if 
a format is supported

[...]
> +static void bgr24to15Wrapper(SwsContext *c, uint8_t* src[], int
[...]
> +static void bgr24to16Wrapper(SwsContext *c, uint8_t* src[], int
[...]
> +static void bgr32to16Wrapper(SwsContext *c, uint8_t* src[], int
[...]
> +static void bgr32to15Wrapper(SwsContext *c, uint8_t* src[], int
lower quality as there is no dithering in the unscaled versions, that was 
indeed the reason why i didnt add these unscaled converter functions ...

[...]
> -	if(c->dstFormat == IMGFMT_I420){
> +	if(c->dstFormat == IMGFMT_I420 || c->dstFormat == IMGFMT_IYUV){
nonsense (there is no IYUV here)

[...]
> -	else if(isPacked(c->srcFormat)){
> +	else if(isPacked(c->srcFormat) || isBGR(c->srcFormat) ||
> isRGB(c->srcFormat)){ src[0]=
nonsense

i guess i have to fix some of the nonsese added to the swscaler, and add clean 
sclaled & unscaled support for planar yuv formats (independant of the chroma 
subsampling used) ...

Michael



More information about the MPlayer-cvslog mailing list