[MPlayer-cvslog] r31298 - in trunk: libmpcodecs/vf_palette.c libswscale/rgb2rgb.c libswscale/rgb2rgb.h

siretart subversion at mplayerhq.hu
Tue Jun 1 08:53:56 CEST 2010


Author: siretart
Date: Tue Jun  1 08:53:56 2010
New Revision: 31298

Log:
remove palette8torgb15 and palette8tobgr15

They contain exactly the same code as their 16bit variants, so this is
effectively code de-duplication.

Modified:
   trunk/libmpcodecs/vf_palette.c

Changes in other areas also in this revision:
Modified:
   trunk/libswscale/rgb2rgb.c
   trunk/libswscale/rgb2rgb.h

Modified: trunk/libmpcodecs/vf_palette.c
==============================================================================
--- trunk/libmpcodecs/vf_palette.c	Mon May 31 23:24:00 2010	(r31297)
+++ trunk/libmpcodecs/vf_palette.c	Tue Jun  1 08:53:56 2010	(r31298)
@@ -114,11 +114,6 @@ static int put_image(struct vf_instance 
 	// no stride conversion needed
 	switch(IMGFMT_RGB_DEPTH(dmpi->imgfmt)){
 	case 15:
-	    if (IMGFMT_IS_BGR(dmpi->imgfmt))
-		palette8tobgr15(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]);
-	    else
-		palette8torgb15(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]);
-	    break;
 	case 16:
 	    if (IMGFMT_IS_BGR(dmpi->imgfmt))
 		palette8tobgr16(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]);
@@ -145,11 +140,6 @@ static int put_image(struct vf_instance 
 	    unsigned char* dst=dmpi->planes[0]+y*dmpi->stride[0];
 	    switch(IMGFMT_RGB_DEPTH(dmpi->imgfmt)){
 	    case 15:
-		if (IMGFMT_IS_BGR(dmpi->imgfmt))
-		    palette8tobgr15(src,dst,mpi->w,mpi->planes[1]);
-		else
-		    palette8torgb15(src,dst,mpi->w,mpi->planes[1]);
-		break;
 	    case 16:
 		if (IMGFMT_IS_BGR(dmpi->imgfmt))
 		    palette8tobgr16(src,dst,mpi->w,mpi->planes[1]);


More information about the MPlayer-cvslog mailing list