[FFmpeg-cvslog] r16153 - in trunk/libavcodec: Makefile error_resilience.c mpeg12.c mpegvideo.c

diego subversion
Mon Dec 15 23:22:51 CET 2008


Author: diego
Date: Mon Dec 15 23:22:51 2008
New Revision: 16153

Log:
Switch xvmc over to a CONFIG_ option.


Modified:
   trunk/libavcodec/Makefile
   trunk/libavcodec/error_resilience.c
   trunk/libavcodec/mpeg12.c
   trunk/libavcodec/mpegvideo.c

Modified: trunk/libavcodec/Makefile
==============================================================================
--- trunk/libavcodec/Makefile	(original)
+++ trunk/libavcodec/Makefile	Mon Dec 15 23:22:51 2008
@@ -242,6 +242,7 @@ OBJS-$(CONFIG_XAN_WC3_DECODER)         +
 OBJS-$(CONFIG_XAN_WC4_DECODER)         += xan.o
 OBJS-$(CONFIG_XL_DECODER)              += xl.o
 OBJS-$(CONFIG_XSUB_DECODER)            += xsubdec.o
+OBJS-$(CONFIG_XVMC)                    += xvmcvideo.o
 OBJS-$(CONFIG_ZLIB_DECODER)            += lcldec.o
 OBJS-$(CONFIG_ZLIB_ENCODER)            += lclenc.o
 OBJS-$(CONFIG_ZMBV_DECODER)            += zmbv.o
@@ -389,8 +390,6 @@ OBJS-$(HAVE_OS2THREADS)                +
 OBJS-$(HAVE_PTHREADS)                  += pthread.o
 OBJS-$(HAVE_W32THREADS)                += w32thread.o
 
-OBJS-$(HAVE_XVMC)                      += xvmcvideo.o
-
 # processor-specific code
 MMX-OBJS-$(CONFIG_CAVS_DECODER)        += i386/cavsdsp_mmx.o
 MMX-OBJS-$(CONFIG_ENCODERS)            += i386/dsputilenc_mmx.o

Modified: trunk/libavcodec/error_resilience.c
==============================================================================
--- trunk/libavcodec/error_resilience.c	(original)
+++ trunk/libavcodec/error_resilience.c	Mon Dec 15 23:22:51 2008
@@ -563,7 +563,7 @@ static int is_intra_more_likely(MpegEncC
 
     if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
     //prevent dsp.sad() check, that requires access to the image
     if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1;
 #endif
@@ -934,7 +934,7 @@ void ff_er_frame_end(MpegEncContext *s){
     }else
         guess_mv(s);
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
     /* the filters below are not XvMC compatible, skip them */
     if(s->avctx->xvmc_acceleration) goto ec_clean;
 #endif
@@ -1023,7 +1023,7 @@ void ff_er_frame_end(MpegEncContext *s){
         v_block_filter(s, s->current_picture.data[2], s->mb_width  , s->mb_height  , s->uvlinesize, 0);
     }
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
 ec_clean:
 #endif
     /* clean a few tables */

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	(original)
+++ trunk/libavcodec/mpeg12.c	Mon Dec 15 23:22:51 2008
@@ -303,7 +303,7 @@ static int mpeg_decode_mb(MpegEncContext
         }else
             memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
         s->mb_intra = 1;
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
         //if 1, we memcpy blocks in xvmcvideo
         if(s->avctx->xvmc_acceleration > 1){
             XVMC_pack_pblocks(s,-1);//inter are always full blocks
@@ -516,7 +516,7 @@ static int mpeg_decode_mb(MpegEncContext
                 return -1;
             }
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
             //if 1, we memcpy blocks in xvmcvideo
             if(s->avctx->xvmc_acceleration > 1){
                 XVMC_pack_pblocks(s,cbp);
@@ -1639,7 +1639,7 @@ static int mpeg_field_start(MpegEncConte
                 }
             }
     }
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
 // MPV_frame_start will call this function too,
 // but we need to call it on every field
     if(s->avctx->xvmc_acceleration)
@@ -1730,7 +1730,7 @@ static int mpeg_decode_slice(Mpeg1Contex
     }
 
     for(;;) {
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
         //If 1, we memcpy blocks in xvmcvideo.
         if(s->avctx->xvmc_acceleration > 1)
             XVMC_init_block(s);//set s->block
@@ -1912,7 +1912,7 @@ static int slice_end(AVCodecContext *avc
     if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr)
         return 0;
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
     if(s->avctx->xvmc_acceleration)
         XVMC_field_end(s);
 #endif
@@ -2472,7 +2472,7 @@ AVCodec mpegvideo_decoder = {
     .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"),
 };
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
 static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
     Mpeg1Context *s;
 

Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c	(original)
+++ trunk/libavcodec/mpegvideo.c	Mon Dec 15 23:22:51 2008
@@ -939,7 +939,7 @@ alloc:
         update_noise_reduction(s);
     }
 
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
     if(s->avctx->xvmc_acceleration)
         return XVMC_field_start(s, avctx);
 #endif
@@ -951,7 +951,7 @@ void MPV_frame_end(MpegEncContext *s)
 {
     int i;
     /* draw edge for correct motion prediction if outside */
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
 //just to make sure that all data is rendered.
     if(s->avctx->xvmc_acceleration){
         XVMC_field_end(s);
@@ -1732,7 +1732,7 @@ void MPV_decode_mb_internal(MpegEncConte
 {
     int mb_x, mb_y;
     const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
-#ifdef HAVE_XVMC
+#ifdef CONFIG_XVMC
     if(s->avctx->xvmc_acceleration){
         XVMC_decode_mb(s);//xvmc uses pblocks
         return;




More information about the ffmpeg-cvslog mailing list