[FFmpeg-devel] [PATCH] RV40 Decoder - 3/3 - RV30/40 enabling patch

Kostya kostya.shishkov
Sun Nov 30 13:29:10 CET 2008


After we find the way to perform rv40_luma_mc33, RV40 decoder
can be enabled. RV30 is not as good but we can enable it too
or leave disabled until I perfect it.
-------------- next part --------------
Index: Changelog
===================================================================
--- Changelog	(revision 15958)
+++ Changelog	(working copy)
@@ -140,6 +140,7 @@
 - liba52 wrapper removed
 - Speex decoding via libspeex
 - Electronic Arts TGQ decoder
+- RV30 and RV40 decoder
 
 version 0.4.9-pre1:
 
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile	(revision 15951)
+++ libavcodec/Makefile	(working copy)
@@ -177,6 +177,8 @@
 OBJS-$(CONFIG_RV10_ENCODER)            += rv10.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
 OBJS-$(CONFIG_RV20_DECODER)            += rv10.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
 OBJS-$(CONFIG_RV20_ENCODER)            += rv10.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
+OBJS-$(CONFIG_RV30_DECODER)            += rv30.o rv34.o h264pred.o rv30dsp.o
+OBJS-$(CONFIG_RV40_DECODER)            += rv40.o rv34.o h264pred.o rv40dsp.o
 OBJS-$(CONFIG_SGI_DECODER)             += sgidec.o
 OBJS-$(CONFIG_SGI_ENCODER)             += sgienc.o rle.o
 OBJS-$(CONFIG_SHORTEN_DECODER)         += shorten.o
Index: libavcodec/dsputil.c
===================================================================
--- libavcodec/dsputil.c	(revision 15951)
+++ libavcodec/dsputil.c	(working copy)
@@ -2743,6 +2743,9 @@
 /* H264 specific */
 void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);
 
+void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
+void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx);
+
 static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
     int i;
@@ -4411,6 +4414,12 @@
 #if defined(CONFIG_H264_ENCODER)
     ff_h264dspenc_init(c,avctx);
 #endif
+#if defined(CONFIG_RV30_DECODER)
+    ff_rv30dsp_init(c,avctx);
+#endif
+#if defined(CONFIG_RV40_DECODER)
+    ff_rv40dsp_init(c,avctx);
+#endif
 
     c->put_mspel_pixels_tab[0]= put_mspel8_mc00_c;
     c->put_mspel_pixels_tab[1]= put_mspel8_mc10_c;
Index: libavcodec/dsputil.h
===================================================================
--- libavcodec/dsputil.h	(revision 15951)
+++ libavcodec/dsputil.h	(working copy)
@@ -484,6 +484,15 @@
      * @param shift number of bits to discard from product
      */
     int32_t (*scalarproduct_int16)(int16_t *v1, int16_t *v2/*align 16*/, int len, int shift);
+
+    /* rv30 functions */
+    qpel_mc_func put_rv30_tpel_pixels_tab[4][16];
+    qpel_mc_func avg_rv30_tpel_pixels_tab[4][16];
+    /* rv40 functions */
+    qpel_mc_func put_rv40_qpel_pixels_tab[4][16];
+    qpel_mc_func avg_rv40_qpel_pixels_tab[4][16];
+    h264_chroma_mc_func put_rv40_chroma_pixels_tab[3];
+    h264_chroma_mc_func avg_rv40_chroma_pixels_tab[3];
 } DSPContext;
 
 void dsputil_static_init(void);
Index: libavcodec/allcodecs.c
===================================================================
--- libavcodec/allcodecs.c	(revision 15951)
+++ libavcodec/allcodecs.c	(working copy)
@@ -142,6 +142,8 @@
     REGISTER_DECODER (RPZA, rpza);
     REGISTER_ENCDEC  (RV10, rv10);
     REGISTER_ENCDEC  (RV20, rv20);
+    REGISTER_DECODER (RV30, rv30);
+    REGISTER_DECODER (RV40, rv40);
     REGISTER_ENCDEC  (SGI, sgi);
     REGISTER_DECODER (SMACKER, smacker);
     REGISTER_DECODER (SMC, smc);
Index: doc/general.texi
===================================================================
--- doc/general.texi	(revision 15951)
+++ doc/general.texi	(working copy)
@@ -288,6 +288,9 @@
     @tab fourccs: QPEG, Q1.0, Q1.1
 @item RealVideo 1.0          @tab  X  @tab  X
 @item RealVideo 2.0          @tab  X  @tab  X
+ at item RealVideo 3.0          @tab     @tab  X
+    @tab not completely working
+ at item RealVideo 4.0          @tab     @tab  X
 @item Renderware TXD         @tab     @tab  X
     @tab Texture dictionaries used by the Renderware Engine.
 @item RTjpeg                 @tab     @tab  X



More information about the ffmpeg-devel mailing list