[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.92,1.93

Alex Beregszaszi alex at mplayerhq.hu
Fri May 23 15:10:47 CEST 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv10751

Modified Files:
	vd_ffmpeg.c 
Log Message:
removed obsolete (and currently non-working) scaling functions, after that it works correctly with YV12,422P and 444P mjpegs

Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- vd_ffmpeg.c	19 May 2003 13:40:50 -0000	1.92
+++ vd_ffmpeg.c	23 May 2003 13:10:20 -0000	1.93
@@ -23,9 +23,6 @@
 
 LIBVD_EXTERN(ffmpeg)
 
-#include "../postproc/rgb2rgb.h"
-
-
 #ifdef USE_LIBAVCODEC_SO
 #include <ffmpeg/avcodec.h>
 #else
@@ -120,13 +117,7 @@
 	    if(avctx->pix_fmt==PIX_FMT_YUV420P) return CONTROL_TRUE;// u/v swap
 	    if(avctx->pix_fmt==PIX_FMT_YUV422P) return CONTROL_TRUE;// half stride
 	    break;
-#if 1
-        case IMGFMT_YUY2:
-	    // converted using yuv422ptoyuy2()
-	    if(avctx->pix_fmt==PIX_FMT_YUV422P) return CONTROL_TRUE;
-	    break;
 	}
-#endif
         return CONTROL_FALSE;
     }
     return CONTROL_UNKNOWN;
@@ -374,8 +365,6 @@
 	}
     	if (!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h, ctx->best_csp))
     		return -1;
-	ctx->convert=(sh->codec->outfmt[sh->outfmtidx]==IMGFMT_YUY2
-	    && ctx->best_csp!=IMGFMT_YUY2); // yuv422p->yuy2 conversion
     }
     return 0;
 }
@@ -541,7 +530,7 @@
 
     avctx->draw_horiz_band=NULL;
     avctx->opaque=sh;
-    if(ctx->vo_inited && !ctx->convert && !(flags&3) && !dr1){
+    if(ctx->vo_inited && !(flags&3) && !dr1){
 	mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE |
 	    (ctx->do_slices?MP_IMGFLAG_DRAW_CALLBACK:0),
 	    sh->disp_w, sh->disp_h);
@@ -661,17 +650,6 @@
         mpi= (mp_image_t*)pic->opaque;
     }
         
-    if(!mpi && ctx->convert){
-	// do yuv422p -> yuy2 conversion:
-        mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
-	    avctx->width, avctx->height);
-	if(!mpi) return NULL;
-	yuv422ptoyuy2(pic->data[0],pic->data[1],pic->data[2],
-	    mpi->planes[0],avctx->width,avctx->height,
-	    pic->linesize[0],pic->linesize[1],mpi->stride[0]);
-	return mpi;
-    }
-    
     if(!mpi)
     mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE,
 	avctx->width, avctx->height);
@@ -707,4 +685,3 @@
 }
 
 #endif
-



More information about the MPlayer-cvslog mailing list