jgh lrhg | 1 Dec 2007 02:52
Picon
Favicon

Re: add logo to video

could you help me patch it?

----- Original Message ----
From: Bobby Bingham <uhmmmm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: ffmpeg-soc-4+PuYLO5yA7jufZW15ZwLg@public.gmane.org
Sent: Friday, November 30, 2007 7:38:05 PM
Subject: Re: [FFmpeg-soc] add logo to video

On Thu, 29 Nov 2007 22:07:23 -0800 (PST)
jgh lrhg <nguyenbamanh31-/E1597aS9LQ@public.gmane.orgm> wrote:

>
>
> Hi all!
> I want add logo or watermark to video.
> Víctor wrote :
> <
> The logo filter should be a "source filter": you can resurrect
> vsrc_ppm.c and use it as an example:
>
> svn copy --revision 1075
> svn://svn.mplayerhq.hu/soc/libavfilter/vsrc_ppm.c vsrc_ppm.c
>
> >
> I downloaed libavfilter revision 1075 and build with ffmeg revision
> 10118 but I can't see file patch for ffmpeg.c. How can I add logo or
> watermark to video with current libbavfilter revison or anyone help
> me patch ffmpeg.c in ffmpeg revsion 10118? Thanks.
>

You should probably use a current version of both ffmpeg and
libavfilter.  You can use that old vsrc_ppm.c as a basis for building a
new filter which works with the current filter system.  I don't think
it should require too many changes.

Then, the overlay filter can be used to apply the watermark.  It
doesn't support any sort of alpha channel however, which might give
better results for what you want.  Patch welcome.

--
Bobby Bingham
Never trust atoms.  Or anything made of atoms.
このメールは再利用されたバイトでできている。
_______________________________________________
FFmpeg-soc mailing list
FFmpeg-soc-4+PuYLO5yA7jufZW15ZwLg@public.gmane.org
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc


Never miss a thing. Make Yahoo your homepage.
_______________________________________________
FFmpeg-soc mailing list
FFmpeg-soc@...
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
kostya | 1 Dec 2007 08:20
Picon

[soc]: r1482 - in rv40: rv30.c rv34.h rv40.c

Author: kostya
Date: Sat Dec  1 08:20:47 2007
New Revision: 1482

Log:
Remove unused header_size

Modified:
   rv40/rv30.c
   rv40/rv34.h
   rv40/rv40.c

Modified: rv40/rv30.c
==============================================================================
--- rv40/rv30.c	(original)
+++ rv40/rv30.c	Sat Dec  1 08:20:47 2007
 <at>  <at>  -55,7 +55,6  <at>  <at>  static int rv30_parse_slice_header(RV34D
     mb_bits = ff_rv34_get_start_offset(gb, mb_size);
     si->start = get_bits(gb, mb_bits);
     get_bits1(gb);
-    si->header_size = get_bits_count(gb);
     return 0;
 }

Modified: rv40/rv34.h
==============================================================================
--- rv40/rv34.h	(original)
+++ rv40/rv34.h	Sat Dec  1 08:20:47 2007
 <at>  <at>  -73,7 +73,6  <at>  <at>  typedef struct SliceInfo{
     int quant;             ///< quantizer used for this slice
     int vlc_set;           ///< VLCs used for this slice
     int start, end;        ///< start and end macroblocks of the slice
-    int header_size;       ///< header size in bits
     int width;             ///< coded width
     int height;            ///< coded height
 }SliceInfo;

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Sat Dec  1 08:20:47 2007
 <at>  <at>  -128,7 +128,6  <at>  <at>  static int rv40_parse_slice_header(RV34D
     mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
     mb_bits = ff_rv34_get_start_offset(gb, mb_size);
     si->start = get_bits(gb, mb_bits);
-    si->header_size = get_bits_count(gb);

     return 0;
 }
kostya | 1 Dec 2007 08:21
Picon

[soc]: r1483 - rv40/rv40.c

Author: kostya
Date: Sat Dec  1 08:21:14 2007
New Revision: 1483

Log:
This macro is for RV40 only

Modified:
   rv40/rv40.c

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Sat Dec  1 08:21:14 2007
 <at>  <at>  -291,7 +291,7  <at>  <at>  static inline void rv40_weak_loop_filter
  * parameter  sub - index of the value with coefficient = 25
  * parameter last - index of the value with coefficient 25 or 51
  */
-#define RV34_STRONG_FILTER(src, step, start, last, sub) \
+#define RV40_STRONG_FILTER(src, step, start, last, sub) \
      26*(src[start*step] + src[(start+1)*step] + src[(start+2)*step] + src[(start+3)*step] +
src[last*step]) - src[last*step] - src[sub*step]
 /**
  * Deblocking filter, the alternated version from JVT-A003r1 H.26L draft.
 <at>  <at>  -343,8 +343,8  <at>  <at>  static inline void rv40_adaptive_loop_fi
             sflag = (mult * FFABS(t)) >> 7;
             if(sflag > 1) continue;

-            p0 = (RV34_STRONG_FILTER(src, step, -3, 1, -3) + rv40_dither_l[dmode + i]) >> 7;
-            p1 = (RV34_STRONG_FILTER(src, step, -1, 3, -1) + rv40_dither_r[dmode + i]) >> 7;
+            p0 = (RV40_STRONG_FILTER(src, step, -3, 1, -3) + rv40_dither_l[dmode + i]) >> 7;
+            p1 = (RV40_STRONG_FILTER(src, step, -1, 3, -1) + rv40_dither_r[dmode + i]) >> 7;
             if(!sflag){
                 src[-1*step] = p0;
                 src[ 0*step] = p1;
 <at>  <at>  -358,8 +358,8  <at>  <at>  static inline void rv40_adaptive_loop_fi
                 else
                     src[ 0*step] = src[-1*step];
             }
-            p0 = (RV34_STRONG_FILTER(src, step, -4, 0, -4) + rv40_dither_l[dmode + i]) >> 7;
-            p1 = (RV34_STRONG_FILTER(src, step, -1, 3, -1) + rv40_dither_r[dmode + i]) >> 7;
+            p0 = (RV40_STRONG_FILTER(src, step, -4, 0, -4) + rv40_dither_l[dmode + i]) >> 7;
+            p1 = (RV40_STRONG_FILTER(src, step, -1, 3, -1) + rv40_dither_r[dmode + i]) >> 7;
             if(!sflag){
                 src[-2*step] = p0;
                 src[ 1*step] = p1;
 <at>  <at>  -374,8 +374,8  <at>  <at>  static inline void rv40_adaptive_loop_fi
                     src[ 1*step] += v88;
             }
             if(!chroma){
-                src[-3*step] = (RV34_STRONG_FILTER(src, step, -4, -1, -3) + 64) >> 7;
-                src[ 2*step] = (RV34_STRONG_FILTER(src, step,  0,  0,  2) + 64) >> 7;
+                src[-3*step] = (RV40_STRONG_FILTER(src, step, -4, -1, -3) + 64) >> 7;
+                src[ 2*step] = (RV40_STRONG_FILTER(src, step,  0,  0,  2) + 64) >> 7;
             }
         }
     }else if(llim0 == 3 && llim1 == 3)
kostya | 1 Dec 2007 08:23
Picon

[soc]: r1484 - in rv40: rv30.c rv40.c

Author: kostya
Date: Sat Dec  1 08:23:29 2007
New Revision: 1484

Log:
Replace get_bits() calls with skip_bits() in cases of ignored result

Modified:
   rv40/rv30.c
   rv40/rv40.c

Modified: rv40/rv30.c
==============================================================================
--- rv40/rv30.c	(original)
+++ rv40/rv30.c	Sat Dec  1 08:23:29 2007
 <at>  <at>  -39,13 +39,13  <at>  <at>  static int rv30_parse_slice_header(RV34D
     int mb_size;

     memset(si, 0, sizeof(SliceInfo));
-    get_bits(gb, 3);
+    skip_bits(gb, 3);
     si->type = get_bits(gb, 2);
     if(si->type == 1) si->type = 0;
     if(get_bits1(gb))
         return -1;
     si->quant = get_bits(gb, 5);
-    get_bits1(gb);
+    skip_bits1(gb);
     t = get_bits(gb, 13);
     skip_bits(gb, r->rpr);
     si->vlc_set = 0;
 <at>  <at>  -54,7 +54,7  <at>  <at>  static int rv30_parse_slice_header(RV34D
     mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
     mb_bits = ff_rv34_get_start_offset(gb, mb_size);
     si->start = get_bits(gb, mb_bits);
-    get_bits1(gb);
+    skip_bits1(gb);
     return 0;
 }

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Sat Dec  1 08:23:29 2007
 <at>  <at>  -119,7 +119,7  <at>  <at>  static int rv40_parse_slice_header(RV34D
     if(get_bits(gb, 2))
         return -1;
     si->vlc_set = get_bits(gb, 2);
-    get_bits1(gb);
+    skip_bits1(gb);
     t = get_bits(gb, 13); /// ???
     if(!si->type || !get_bits1(gb))
         rv40_parse_picture_size(gb, &w, &h);
kostya | 1 Dec 2007 11:38
Picon

[soc]: r1485 - in rv40: rv30data.h rv34data.h rv40data.h rv40vlc2.h

Author: kostya
Date: Sat Dec  1 11:38:21 2007
New Revision: 1485

Log:
Sync with ffmpeg SVN

Modified:
   rv40/rv30data.h
   rv40/rv34data.h
   rv40/rv40data.h
   rv40/rv40vlc2.h

Modified: rv40/rv30data.h
==============================================================================
--- rv40/rv30data.h	(original)
+++ rv40/rv30data.h	Sat Dec  1 11:38:21 2007
 <at>  <at>  -21,7 +21,7  <at>  <at> 

 /**
  *  <at> file rv30data.h
- * Miscellaneous RV30 tables.
+ * miscellaneous RV30 tables
  */

 #ifndef FFMPEG_RV30DATA_H
 <at>  <at>  -36,8 +36,8  <at>  <at>  static const uint8_t rv30_luma_dc_quant[
 };

 /**
- * This table is used for storing differences
- * between predicted and real intra type.
+ * This table is used for storing the differences
+ * between the predicted and the real intra type.
  */
 static const uint8_t rv30_itype_code[9*9*2] = {
     0, 0, 0, 1, 1, 0, 1, 1, 0, 2, 2, 0, 0, 3, 3, 0, 1, 2,
 <at>  <at>  -52,13 +52,13  <at>  <at>  static const uint8_t rv30_itype_code[9*9
 };

 /**
- * This table is used for retrieving current intra type
- * basing on its neighbours and adjustment provided by
+ * This table is used for retrieving the current intra type
+ * based on its neighbors and adjustment provided by
  * code read and decoded before.
  *
- * This is really three-dimensional matrix with dimensions
- * [-1..9][-1..9][0..9], first and second coordinates
- * are detemined by top and left neighbours (-1 if unavailable).
+ * This is really a three-dimensional matrix with dimensions
+ * [-1..9][-1..9][0..9]. The first and second coordinates are
+ * detemined by the top and left neighbors (-1 if unavailable).
  */
 static const uint8_t rv30_itype_from_context[900] = {
     0, 9, 9, 9, 9, 9, 9, 9, 9,

Modified: rv40/rv34data.h
==============================================================================
--- rv40/rv34data.h	(original)
+++ rv40/rv34data.h	Sat Dec  1 11:38:21 2007
 <at>  <at>  -21,7 +21,7  <at>  <at> 

 /**
  *  <at> file rv34data.h
- * Miscellaneous RV30/40 tables.
+ * miscellaneous RV30/40 tables
  */

 #ifndef FFMPEG_RV34DATA_H
 <at>  <at>  -30,14 +30,14  <at>  <at> 
 #include <stdint.h>

 /**
- * Number of ones in nibble minus one
+ * number of ones in nibble minus one
  */
 static const uint8_t rv34_count_ones[16] = {
     0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3
 };

 /**
- * Values used to reconstruct coded block pattern
+ * Values used to reconstruct coded block pattern.
  */
 static const uint8_t rv34_cbp_code[16] = {
     0x00, 0x20, 0x10, 0x30, 0x02, 0x22, 0x12, 0x32,
 <at>  <at>  -45,10 +45,10  <at>  <at>  static const uint8_t rv34_cbp_code[16] =
 };

 /**
- * Precalculated results of division by three and modulo three for values 0-107
+ * precalculated results of division by three and modulo three for values 0-107
  *
- * A lot of four-tuples in RV40 are represented as c0*27+c1*9+c2*3+c3
- * This table allows conversion from value back to vector
+ * A lot of four-tuples in RV40 are represented as c0*27+c1*9+c2*3+c3.
+ * This table allows conversion from a value back to a vector.
  */
 static const uint8_t modulo_three_table[108][4] = {
  { 0, 0, 0, 0 }, { 0, 0, 0, 1 }, { 0, 0, 0, 2 }, { 0, 0, 1, 0 },
 <at>  <at>  -81,7 +81,7  <at>  <at>  static const uint8_t modulo_three_table[
 };

 /**
- * Quantizer values used for AC and DC coefficients in chroma blocks
+ * quantizer values used for AC and DC coefficients in chroma blocks
  */
 static const uint8_t rv34_chroma_quant[2][32] = {
  {  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
 <at>  <at>  -91,7 +91,7  <at>  <at>  static const uint8_t rv34_chroma_quant[2
 };

 /**
- * This table is used for dequantizing
+ * This table is used for dequantizing.
  */
 static const uint16_t rv34_qscale_tab[32] = {
   60,   67,   76,   85,   96,  108,  121,  136,
 <at>  <at>  -111,8 +111,8  <at>  <at>  static const uint8_t rv34_dezigzag[16] =
 };

 /**
- * Tables used to translate quantizer value into VLC set for decoding
- * First table is used for intraframes.
+ * tables used to translate a quantizer value into a VLC set for decoding
+ * The first table is used for intraframes.
  */
 static const uint8_t rv34_quant_to_vlc_set[2][31] = {
  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
 <at>  <at>  -122,8 +122,8  <at>  <at>  static const uint8_t rv34_quant_to_vlc_s
 };

 /**
- * Table for obtaining quantizer difference
- *  <at> todo replace it with modified_quant_tab from h263data.h
+ * table for obtaining the quantizer difference
+ *  <at> todo Replace it with modified_quant_tab from h263data.h.
  */
 static const int8_t rv34_dquant_tab[] = {
   0,  0,  2,  1, -1,  1, -1,  1, -1,  1, -1,  1, -1,  1, -1,  1,
 <at>  <at>  -133,13 +133,13  <at>  <at>  static const int8_t rv34_dquant_tab[] = 
 };

 /**
- * Maximum number of macroblocks for each of the possible slice offset sizes
- *  <at> todo this is the same as ff_mba_max, maybe use it instead
+ * maximum number of macroblocks for each of the possible slice offset sizes
+ *  <at> todo This is the same as ff_mba_max, maybe use it instead.
  */
 static const uint16_t rv34_mb_max_sizes[6] = { 0x2F, 0x68, 0x18B, 0x62F, 0x18BF, 0x23FF };
 /**
- * Bits needed to code slice offset for the given size
- *  <at> todo this is the same as ff_mba_length, maybe use it instead
+ * bits needed to code the slice offset for the given size
+ *  <at> todo This is the same as ff_mba_length, maybe use it instead.
  */
 static const uint8_t rv34_mb_bits_sizes[6] = { 6, 7, 9, 11, 13, 14 };

Modified: rv40/rv40data.h
==============================================================================
--- rv40/rv40data.h	(original)
+++ rv40/rv40data.h	Sat Dec  1 11:38:21 2007
 <at>  <at>  -21,7 +21,7  <at>  <at> 

 /**
  *  <at> file rv40data.h
- * Miscellaneous RV40 tables.
+ * miscellaneous RV40 tables
  */

 #ifndef FFMPEG_RV40DATA_H
 <at>  <at>  -30,7 +30,7  <at>  <at> 
 #include <stdint.h>

 /**
- * Standard widths and heights coded in RV40
+ * standard widths and heights coded in RV40
  */
 // <at> {
 static const int rv40_standard_widths[]   = { 160, 172, 240, 320, 352, 640, 704, 0};
 <at>  <at>  -40,10 +40,10  <at>  <at>  static const int rv40_standard_heights2[

 #define MODE2_PATTERNS_NUM 20
 /**
- * Intra types table
+ * intra types table
  *
  * These values are actually coded 3-tuples
- * used for detecting standard block configurations
+ * used for detecting standard block configurations.
  */
 static const uint16_t rv40_aic_table_index[MODE2_PATTERNS_NUM] = {
  0x000, 0x100, 0x200,
 <at>  <at>  -55,8 +55,8  <at>  <at>  static const uint16_t rv40_aic_table_ind
 };

 /**
- * Luma quantizer values
- * Second table is used for inter blocks
+ * luma quantizer values
+ * The second table is used for inter blocks.
  */
 static const uint8_t rv40_luma_dc_quant[2][32] = {
  {  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
 <at>  <at>  -66,18 +66,18  <at>  <at>  static const uint8_t rv40_luma_dc_quant[
 };

 /**
- *  <at> begingroup loopfilter coefficients used by RV40 loop filter
+ *  <at> begingroup loopfilter coefficients used by the RV40 loop filter
  *  <at> {
  */
 /**
- * Dither values for deblocking filter - left/top values
+ * dither values for deblocking filter - left/top values
  */
 static const uint8_t rv40_dither_l[16] = {
     0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30,
     0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40
 };
 /**
- * Dither values for deblocking filter - right/bottom values
+ * dither values for deblocking filter - right/bottom values
  */
 static const uint8_t rv40_dither_r[16] = {
     0x40, 0x30, 0x60, 0x20, 0x50, 0x30, 0x30, 0x40,

Modified: rv40/rv40vlc2.h
==============================================================================
--- rv40/rv40vlc2.h	(original)
+++ rv40/rv40vlc2.h	Sat Dec  1 11:38:21 2007
 <at>  <at>  -21,7 +21,7  <at>  <at> 

 /**
  *  <at> file rv40vlc2.h
- * RV40 VLC tables used for macroblock information decoding.
+ * RV40 VLC tables used for macroblock information decoding
  */

 #ifndef FFMPEG_RV40VLC2_H
 <at>  <at>  -30,7 +30,7  <at>  <at> 
 #include <stdint.h>

 /**
- * Codes used for the first four block types
+ * codes used for the first four block types
  */
 // <at> {
 #define AIC_TOP_BITS  8
 <at>  <at>  -46,7 +46,7  <at>  <at>  static const uint8_t rv40_aic_top_vlc_bi
 // <at> }

 /**
- * Codes used for determining pair of block types
+ * codes used for determining a pair of block types
  */
 // <at> {
 #define AIC_MODE2_NUM  20
 <at>  <at>  -634,7 +634,7  <at>  <at>  static const uint8_t aic_mode1_vlc_bits[

 #define PBTYPE_ESCAPE 0xFF

-/** Tables used for P-frame macroblock type decoding */
+/** tables used for P-frame macroblock type decoding */
 // <at> {
 #define NUM_PTYPE_VLCS 7
 #define PTYPE_VLC_SIZE 8
 <at>  <at>  -670,7 +670,7  <at>  <at>  static const uint8_t block_num_to_ptype_
 };
 // <at> }

-/** Tables used for P-frame macroblock type decoding */
+/** tables used for P-frame macroblock type decoding */
 // <at> {
 #define NUM_BTYPE_VLCS 6
 #define BTYPE_VLC_SIZE 7
Vitor | 1 Dec 2007 11:53
Picon

Re: add logo to video

Hi

jgh lrhg wrote:
> could you help me patch it?
> 

First of all, do *not* top-post (see 
http://en.wikipedia.org/wiki/Top-posting#Top-posting ). The less you 
follow netiquette, the less developers are helpful.

Then, it looks like you already know how to patch ffmpeg with the latest 
version of libavfilter. Do that.

Then, copy the file 
http://svn.mplayerhq.hu/soc/libavfilter/vsrc_ppm.c?revision=967&pathrev=1075 
to libavfitler/ and undo the ppm filter related changes made in 
http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2007-August/001288.html .

-Vitor
kostya | 1 Dec 2007 12:06
Picon

[soc]: r1486 - in rv40: rv34.c rv34vlc.h

Author: kostya
Date: Sat Dec  1 12:06:52 2007
New Revision: 1486

Log:
General VLC code used by RV3/4 is really Elias Gamma code

Modified:
   rv40/rv34.c
   rv40/rv34vlc.h

Modified: rv40/rv34.c
==============================================================================
--- rv40/rv34.c	(original)
+++ rv40/rv34.c	Sat Dec  1 12:06:52 2007
 <at>  <at>  -43,7 +43,6  <at>  <at>  static const int rv34_mb_type_to_lavc[12

 
 static RV34VLC intra_vlcs[NUM_INTRA_TABLES], inter_vlcs[NUM_INTER_TABLES];
-static VLC omega_part_vlc;

 /**
  *  <at> defgroup vlc RV30/40 VLC generating functions
 <at>  <at>  -117,11 +116,6  <at>  <at>  static void rv34_init_tables()
         }
         rv34_gen_vlc(rv34_inter_coeffvlc[i], COEFF_VLC_SIZE, &inter_vlcs[i].coefficient, NULL);
     }
-
-    init_vlc_sparse(&omega_part_vlc, OMEGA_BITS, NUM_OMEGA,
-                    omega_part_vlc_bits,  1, 1,
-                    omega_part_vlc_codes, 1, 1,
-                    omega_part_vlc_syms,  1, 1, INIT_VLC_USE_STATIC);
 }

 /**  <at> } */ // vlc group
 <at>  <at>  -390,31 +384,20  <at>  <at>  static inline RV34VLC* choose_vlc_set(in
 }

 /**
- * Decode variable-length code constructed from variable-length codes
- * similar to Even-Rodeh and Elias Omega codes.
- *
- * Code is constructed from bit chunks of even length (odd length means end of code)
- * and chunks are coded with variable-length codes too.
+ * Decode Levenstein (also known as Elias Gamma) code.
  */
 int ff_rv34_get_omega(GetBitContext *gb)
 {
-    int code = 1, t, tb;
+    int code = 1;

-    for(;;){
-        t = get_vlc2(gb, omega_part_vlc.table, OMEGA_BITS, 1);
-        tb = t >> 5;
-        code = (code << tb) | (t & 0xF);
-        if(t & 0x10) break;
+    while(!get_bits1(gb)){
+        code = (code << 1) | get_bits1(gb);
     }
     return code;
 }

 /**
- * Decode signed integer variable-length code constructed from variable-length codes
- * similar to Even-Rodeh and Elias Omega codes.
- *
- * Code is constructed from bit chunks of even length (odd length means end of code)
- * and chunks are coded with variable-length codes too.
+ * Decode Levenstein (also known as Elias Gamma) code as signed integer.
  */
 int ff_rv34_get_omega_signed(GetBitContext *gb)
 {

Modified: rv40/rv34vlc.h
==============================================================================
--- rv40/rv34vlc.h	(original)
+++ rv40/rv34vlc.h	Sat Dec  1 12:06:52 2007
 <at>  <at>  -4065,32 +4065,4  <at>  <at>  static const uint8_t rv34_inter_coeffvlc
 }
 };

-
-/** Tables used in variable code parts decoding */
-// <at> {
-#define NUM_OMEGA 31
-#define OMEGA_BITS 8
-
-static const uint8_t omega_part_vlc_codes[NUM_OMEGA] = {
- 0x00, 0x01, 0x01, 0x04, 0x05, 0x03, 0x01,
- 0x10, 0x11, 0x09, 0x14, 0x15, 0x0B, 0x03, 0x01,
- 0x40, 0x41, 0x21, 0x44, 0x45, 0x23, 0x09,
- 0x50, 0x51, 0x29, 0x54, 0x55, 0x2B, 0x0B, 0x03, 0x01
-};
-
-static const uint8_t omega_part_vlc_bits[NUM_OMEGA] = {
- 8, 8, 7, 8, 8, 7, 5,
- 8, 8, 7, 8, 8, 7, 5, 3,
- 8, 8, 7, 8, 8, 7, 5,
- 8, 8, 7, 8, 8, 7, 5, 3, 1
-};
-
-static const uint8_t omega_part_vlc_syms[NUM_OMEGA] = {
- 0x80, 0x81, 0x70, 0x82, 0x83, 0x71, 0x50,
- 0x84, 0x85, 0x72, 0x86, 0x87, 0x73, 0x51, 0x30,
- 0x88, 0x89, 0x74, 0x8A, 0x8B, 0x75, 0x52,
- 0x8C, 0x8D, 0x76, 0x8E, 0x8F, 0x77, 0x53, 0x31, 0x10
-};
-// <at> }
-
 #endif /* FFMPEG_RV34VLC_H */
kostya | 1 Dec 2007 12:12
Picon

[soc]: r1487 - in rv40: rv30.c rv34.c rv34.h rv40.c

Author: kostya
Date: Sat Dec  1 12:12:22 2007
New Revision: 1487

Log:
Change greek letter in function name

Modified:
   rv40/rv30.c
   rv40/rv34.c
   rv40/rv34.h
   rv40/rv40.c

Modified: rv40/rv30.c
==============================================================================
--- rv40/rv30.c	(original)
+++ rv40/rv30.c	Sat Dec  1 12:12:22 2007
 <at>  <at>  -71,7 +71,7  <at>  <at>  static int rv30_decode_intra_types(RV34D
     for(i = 0; i < 4; i++, dst += r->s.b4_stride){
         ptr = dst;
         for(j = 0; j < 4; j+= 2){
-            code = (ff_rv34_get_omega(gb) - 1) << 1;
+            code = (ff_rv34_get_gamma(gb) - 1) << 1;
             if(code >= 81*2){
                 av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n");
                 return -1;
 <at>  <at>  -101,7 +101,7  <at>  <at>  static int rv30_decode_mb_info(RV34DecCo
     GetBitContext *gb = &s->gb;
     int code;

-    code = ff_rv34_get_omega(gb) - 1;
+    code = ff_rv34_get_gamma(gb) - 1;
     if(code > 11){
         av_log(s->avctx, AV_LOG_ERROR, "Incorrect MB type code\n");
         return -1;

Modified: rv40/rv34.c
==============================================================================
--- rv40/rv34.c	(original)
+++ rv40/rv34.c	Sat Dec  1 12:12:22 2007
 <at>  <at>  -386,7 +386,7  <at>  <at>  static inline RV34VLC* choose_vlc_set(in
 /**
  * Decode Levenstein (also known as Elias Gamma) code.
  */
-int ff_rv34_get_omega(GetBitContext *gb)
+int ff_rv34_get_gamma(GetBitContext *gb)
 {
     int code = 1;

 <at>  <at>  -399,11 +399,11  <at>  <at>  int ff_rv34_get_omega(GetBitContext *gb)
 /**
  * Decode Levenstein (also known as Elias Gamma) code as signed integer.
  */
-int ff_rv34_get_omega_signed(GetBitContext *gb)
+int ff_rv34_get_gamma_signed(GetBitContext *gb)
 {
     int code;

-    code = ff_rv34_get_omega(gb);
+    code = ff_rv34_get_gamma(gb);
     if(code & 1)
         return -(code >> 1);
     else
 <at>  <at>  -872,8 +872,8  <at>  <at>  static int rv34_decode_mv(RV34DecContext

     memset(r->dmv, 0, sizeof(r->dmv));
     for(i = 0; i < num_mvs[block_type]; i++){
-        r->dmv[i][0] = ff_rv34_get_omega_signed(gb);
-        r->dmv[i][1] = ff_rv34_get_omega_signed(gb);
+        r->dmv[i][0] = ff_rv34_get_gamma_signed(gb);
+        r->dmv[i][1] = ff_rv34_get_gamma_signed(gb);
     }
     switch(block_type){
     case RV34_MB_TYPE_INTRA:

Modified: rv40/rv34.h
==============================================================================
--- rv40/rv34.h	(original)
+++ rv40/rv34.h	Sat Dec  1 12:12:22 2007
 <at>  <at>  -117,7 +117,7  <at>  <at>  typedef struct RV34DecContext{
  * common decoding functions
  */
 int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
-int ff_rv34_get_omega(GetBitContext *gb);
+int ff_rv34_get_gamma(GetBitContext *gb);
 int ff_rv34_decode_init(AVCodecContext *avctx);
 int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size);
 int ff_rv34_decode_end(AVCodecContext *avctx);

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Sat Dec  1 12:12:22 2007
 <at>  <at>  -209,7 +209,7  <at>  <at>  static int rv40_decode_mb_info(RV34DecCo
     int count = 0;

     if(!r->s.mb_skip_run)
-        r->s.mb_skip_run = ff_rv34_get_omega(gb);
+        r->s.mb_skip_run = ff_rv34_get_gamma(gb);

     if(--r-≥s.mb_skip_run)
          return RV34_MB_SKIP;
kostya | 1 Dec 2007 12:59
Picon

[soc]: r1488 - rv40/rv34.c

Author: kostya
Date: Sat Dec  1 12:59:58 2007
New Revision: 1488

Log:
Factorize transform functions

Modified:
   rv40/rv34.c

Modified: rv40/rv34.c
==============================================================================
--- rv40/rv34.c	(original)
+++ rv40/rv34.c	Sat Dec  1 12:59:58 2007
 <at>  <at>  -126,12 +126,8  <at>  <at>  static void rv34_init_tables()
  *  <at> {
  */

-/**
- * Real Video 4.0 inverse transform
- * Code is almost the same as in SVQ3, only scaling is different.
- */
-static void rv34_intra_inv_transform(DCTELEM *block, const int offset){
-    int temp[16];
+static void rv34_row_transform(int temp[16], DCTELEM *block, const int offset)
+{
     int i;

     for(i=0; i<4; i++){
 <at>  <at>  -145,6 +141,17  <at>  <at>  static void rv34_intra_inv_transform(DCT
         temp[4*i+2]= z1-z2;
         temp[4*i+3]= z0-z3;
     }
+}
+
+/**
+ * Real Video 4.0 inverse transform
+ * Code is almost the same as in SVQ3, only scaling is different.
+ */
+static void rv34_intra_inv_transform(DCTELEM *block, const int offset){
+    int temp[16];
+    int i;
+
+    rv34_row_transform(temp, block, offset);

     for(i=0; i<4; i++){
         const int z0= 13*(temp[4*0+i] +    temp[4*2+i]) + 0x200;
 <at>  <at>  -170,17 +177,7  <at>  <at>  static void rv34_intra_inv_transform_nor
     int temp[16];
     int i;

-    for(i=0; i<4; i++){
-        const int z0= 13*(block[offset+i+8*0] +    block[offset+i+8*2]);
-        const int z1= 13*(block[offset+i+8*0] -    block[offset+i+8*2]);
-        const int z2=  7* block[offset+i+8*1] - 17*block[offset+i+8*3];
-        const int z3= 17* block[offset+i+8*1] +  7*block[offset+i+8*3];
-
-        temp[4*i+0]= z0+z3;
-        temp[4*i+1]= z1+z2;
-        temp[4*i+2]= z1-z2;
-        temp[4*i+3]= z0-z3;
-    }
+    rv34_row_transform(temp, block, offset);

     for(i=0; i<4; i++){
         const int z0= 13*(temp[4*0+i] +    temp[4*2+i]);
kostya | 1 Dec 2007 13:57
Picon

[soc]: r1489 - rv40/rv34.c

Author: kostya
Date: Sat Dec  1 13:57:28 2007
New Revision: 1489

Log:
More generic MC function

Modified:
   rv40/rv34.c

Modified: rv40/rv34.c
==============================================================================
--- rv40/rv34.c	(original)
+++ rv40/rv34.c	Sat Dec  1 13:57:28 2007
 <at>  <at>  -631,14 +631,8  <at>  <at>  static void rv34_pred_mv_b(RV34DecContex
     switch(block_type){
     case RV34_MB_B_FORWARD:
         rv34_pred_b_vector(A[0], B[0], C[0], no_A[0], no_B[0], no_C[0], &mx[0], &my[0]);
-        r->dmv[1][0] = 0;
-        r->dmv[1][1] = 0;
         break;
     case RV34_MB_B_BACKWARD:
-        r->dmv[1][0] = r->dmv[0][0];
-        r->dmv[1][1] = r->dmv[0][1];
-        r->dmv[0][0] = 0;
-        r->dmv[0][1] = 0;
         rv34_pred_b_vector(A[1], B[1], C[1], no_A[1], no_B[1], no_C[1], &mx[1], &my[1]);
         break;
     case RV34_MB_B_BIDIR:
 <at>  <at>  -664,7 +658,7  <at>  <at>  static void rv34_pred_mv_b(RV34DecContex
 }

 /**
- * Generic motion compensation function - hopefully compiler will optimize it for each case.
+ * generic motion compensation function
  *
  *  <at> param r decoder context
  *  <at> param block_type type of the current block
 <at>  <at>  -676,18 +670,20  <at>  <at>  static void rv34_pred_mv_b(RV34DecContex
  */
 static inline void rv34_mc(RV34DecContext *r, const int block_type,
                           const int xoff, const int yoff, int mv_off,
-                          const int width, const int height)
+                          const int width, const int height, int dir,
+                          qpel_mc_func (*qpel_mc)[16],
+                          h264_chroma_mc_func (*chroma_mc))
 {
     MpegEncContext *s = &r->s;
     uint8_t *Y, *U, *V, *srcY, *srcU, *srcV;
     int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
     int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride + mv_off;

-    mx = s->current_picture_ptr->motion_val[0][mv_pos][0];
-    my = s->current_picture_ptr->motion_val[0][mv_pos][1];
-    srcY = s->last_picture_ptr->data[0];
-    srcU = s->last_picture_ptr->data[1];
-    srcV = s->last_picture_ptr->data[2];
+    mx = s->current_picture_ptr->motion_val[dir][mv_pos][0];
+    my = s->current_picture_ptr->motion_val[dir][mv_pos][1];
+    srcY = dir ? s->next_picture_ptr->data[0] : s->last_picture_ptr->data[0];
+    srcU = dir ? s->next_picture_ptr->data[1] : s->last_picture_ptr->data[1];
+    srcV = dir ? s->next_picture_ptr->data[2] : s->last_picture_ptr->data[2];
     src_x = s->mb_x * 16 + xoff + (mx >> 2);
     src_y = s->mb_y * 16 + yoff + (my >> 2);
     uvsrc_x = s->mb_x * 8 + (xoff >> 1) + (mx >> 3);
 <at>  <at>  -717,141 +713,44  <at>  <at>  static inline void rv34_mc(RV34DecContex
     U = s->dest[1] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
     V = s->dest[2] + (xoff>>1) + (yoff>>1)*s->uvlinesize;
     if(block_type == RV34_MB_P_16x8){
-        s->dsp.put_h264_qpel_pixels_tab[1][dxy](Y, srcY, s->linesize);
+        qpel_mc[1][dxy](Y, srcY, s->linesize);
         Y    += 8;
         srcY += 8;
-        s->dsp.put_h264_qpel_pixels_tab[1][dxy](Y, srcY, s->linesize);
-        s->dsp.put_h264_chroma_pixels_tab[0]   (U, srcU, s->uvlinesize, 4, uvmx, uvmy);
-        s->dsp.put_h264_chroma_pixels_tab[0]   (V, srcV, s->uvlinesize, 4, uvmx, uvmy);
+        qpel_mc[1][dxy](Y, srcY, s->linesize);
+        chroma_mc[0]   (U, srcU, s->uvlinesize, 4, uvmx, uvmy);
+        chroma_mc[0]   (V, srcV, s->uvlinesize, 4, uvmx, uvmy);
     }else if(block_type == RV34_MB_P_8x16){
-        s->dsp.put_h264_qpel_pixels_tab[1][dxy](Y, srcY, s->linesize);
+        qpel_mc[1][dxy](Y, srcY, s->linesize);
         Y    += 8 * s->linesize;
         srcY += 8 * s->linesize;
-        s->dsp.put_h264_qpel_pixels_tab[1][dxy](Y, srcY, s->linesize);
-        s->dsp.put_h264_chroma_pixels_tab[1]   (U, srcU, s->uvlinesize, 8, uvmx, uvmy);
-        s->dsp.put_h264_chroma_pixels_tab[1]   (V, srcV, s->uvlinesize, 8, uvmx, uvmy);
+        qpel_mc[1][dxy](Y, srcY, s->linesize);
+        chroma_mc[1]   (U, srcU, s->uvlinesize, 8, uvmx, uvmy);
+        chroma_mc[1]   (V, srcV, s->uvlinesize, 8, uvmx, uvmy);
     }else if(block_type == RV34_MB_P_8x8){
-        s->dsp.put_h264_qpel_pixels_tab[1][dxy](Y, srcY, s->linesize);
-        s->dsp.put_h264_chroma_pixels_tab[1]   (U, srcU, s->uvlinesize, 4, uvmx, uvmy);
-        s->dsp.put_h264_chroma_pixels_tab[1]   (V, srcV, s->uvlinesize, 4, uvmx, uvmy);
+        qpel_mc[1][dxy](Y, srcY, s->linesize);
+        chroma_mc[1]   (U, srcU, s->uvlinesize, 4, uvmx, uvmy);
+        chroma_mc[1]   (V, srcV, s->uvlinesize, 4, uvmx, uvmy);
     }else{
-        s->dsp.put_h264_qpel_pixels_tab[0][dxy](Y, srcY, s->linesize);
-        s->dsp.put_h264_chroma_pixels_tab[0]   (U, srcU, s->uvlinesize, 8, uvmx, uvmy);
-        s->dsp.put_h264_chroma_pixels_tab[0]   (V, srcV, s->uvlinesize, 8, uvmx, uvmy);
+        qpel_mc[0][dxy](Y, srcY, s->linesize);
+        chroma_mc[0]   (U, srcU, s->uvlinesize, 8, uvmx, uvmy);
+        chroma_mc[0]   (V, srcV, s->uvlinesize, 8, uvmx, uvmy);
     }
 }

-/**
- * B-frame specific motion compensation function
- *
- *  <at> param r decoder context
- *  <at> param block_type type of the current block
- */
-static inline void rv34_mc_b(RV34DecContext *r, const int block_type)
+static void rv34_mc_1mv(RV34DecContext *r, const int block_type,
+                        const int xoff, const int yoff, int mv_off,
+                        const int width, const int height, int dir)
 {
-    MpegEncContext *s = &r->s;
-    uint8_t *srcY, *srcU, *srcV;
-    int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
-    int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
-
-    if(block_type != RV34_MB_B_BACKWARD){
-        mx = s->current_picture_ptr->motion_val[0][mv_pos][0];
-        my = s->current_picture_ptr->motion_val[0][mv_pos][1];
-        srcY = s->last_picture_ptr->data[0];
-        srcU = s->last_picture_ptr->data[1];
-        srcV = s->last_picture_ptr->data[2];
-    }else{
-        mx = s->current_picture_ptr->motion_val[1][mv_pos][0];
-        my = s->current_picture_ptr->motion_val[1][mv_pos][1];
-        srcY = s->next_picture_ptr->data[0];
-        srcU = s->next_picture_ptr->data[1];
-        srcV = s->next_picture_ptr->data[2];
-    }
-    if(block_type == RV34_MB_B_DIRECT){
-        mx += (s->next_picture_ptr->motion_val[0][mv_pos][0] + 1) >> 1;
-        my += (s->next_picture_ptr->motion_val[0][mv_pos][1] + 1) >> 1;
-    }
-    src_x = s->mb_x * 16 + (mx >> 2);
-    src_y = s->mb_y * 16 + (my >> 2);
-    uvsrc_x = s->mb_x * 8 + (mx >> 3);
-    uvsrc_y = s->mb_y * 8 + (my >> 3);
-    srcY += src_y * s->linesize + src_x;
-    srcU += uvsrc_y * s->uvlinesize + uvsrc_x;
-    srcV += uvsrc_y * s->uvlinesize + uvsrc_x;
-    if(   (unsigned)(src_x - !!(mx&3)*2) > s->h_edge_pos - !!(mx&3)*2 - 16 - 3
-       || (unsigned)(src_y - !!(my&3)*2) > s->v_edge_pos - !!(my&3)*2 - 16 - 3){
-        uint8_t *uvbuf= s->edge_emu_buffer + 20 * s->linesize;
-
-        srcY -= 2 + 2*s->linesize;
-        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 16+4, 16+4,
-                            src_x - 2, src_y - 2, s->h_edge_pos, s->v_edge_pos);
-        srcY = s->edge_emu_buffer + 2 + 2*s->linesize;
-        ff_emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, 8+1, 8+1,
-                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
-        ff_emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1,
-                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
-        srcU = uvbuf;
-        srcV = uvbuf + 16;
-    }
-    dxy = ((my & 3) << 2) | (mx & 3);
-    uvmx = mx & 6;
-    uvmy = my & 6;
-    s->dsp.put_h264_qpel_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize);
-    s->dsp.put_h264_chroma_pixels_tab[0]   (s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
-    s->dsp.put_h264_chroma_pixels_tab[0]   (s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
+    rv34_mc(r, block_type, xoff, yoff, mv_off, width, height, dir,
+            r->s.dsp.put_h264_qpel_pixels_tab, r->s.dsp.put_h264_chroma_pixels_tab);
 }

-/**
- * B-frame specific motion compensation function - for direct/interpolated blocks
- *
- *  <at> param r decoder context
- *  <at> param block_type type of the current block
- */
-static inline void rv34_mc_b_interp(RV34DecContext *r, const int block_type)
+static void rv34_mc_2mv(RV34DecContext *r, const int block_type)
 {
-    MpegEncContext *s = &r->s;
-    uint8_t *srcY, *srcU, *srcV;
-    int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
-    int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
-
-    mx = s->current_picture_ptr->motion_val[1][mv_pos][0];
-    my = s->current_picture_ptr->motion_val[1][mv_pos][1];
-    if(block_type == RV34_MB_B_DIRECT){
-        mx -= s->next_picture_ptr->motion_val[0][mv_pos][0] >> 1;
-        my -= s->next_picture_ptr->motion_val[0][mv_pos][1] >> 1;
-    }
-    srcY = s->next_picture_ptr->data[0];
-    srcU = s->next_picture_ptr->data[1];
-    srcV = s->next_picture_ptr->data[2];
-
-    src_x = s->mb_x * 16 + (mx >> 2);
-    src_y = s->mb_y * 16 + (my >> 2);
-    uvsrc_x = s->mb_x * 8 + (mx >> 3);
-    uvsrc_y = s->mb_y * 8 + (my >> 3);
-    srcY += src_y * s->linesize + src_x;
-    srcU += uvsrc_y * s->uvlinesize + uvsrc_x;
-    srcV += uvsrc_y * s->uvlinesize + uvsrc_x;
-    if(   (unsigned)(src_x - !!(mx&3)*2) > s->h_edge_pos - !!(mx&3)*2 - 16 - 3
-       || (unsigned)(src_y - !!(my&3)*2) > s->v_edge_pos - !!(my&3)*2 - 16 - 3){
-        uint8_t *uvbuf= s->edge_emu_buffer + 20 * s->linesize;
-
-        srcY -= 2 + 2*s->linesize;
-        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 16+4, 16+4,
-                            src_x - 2, src_y - 2, s->h_edge_pos, s->v_edge_pos);
-        srcY = s->edge_emu_buffer + 2 + 2*s->linesize;
-        ff_emulated_edge_mc(uvbuf     , srcU, s->uvlinesize, 8+1, 8+1,
-                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
-        ff_emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1,
-                            uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1);
-        srcU = uvbuf;
-        srcV = uvbuf + 16;
-    }
-    dxy = ((my & 3) << 2) | (mx & 3);
-    uvmx = mx & 6;
-    uvmy = my & 6;
-    s->dsp.avg_h264_qpel_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize);
-    s->dsp.avg_h264_chroma_pixels_tab[0]   (s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
-    s->dsp.avg_h264_chroma_pixels_tab[0]   (s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
+    rv34_mc(r, block_type, 0, 0, 0, 2, 2, 0,
+            r->s.dsp.put_h264_qpel_pixels_tab, r->s.dsp.put_h264_chroma_pixels_tab);
+    rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1,
+            r->s.dsp.avg_h264_qpel_pixels_tab, r->s.dsp.avg_h264_chroma_pixels_tab);
 }

 /** number of motion vectors in each macroblock type */
 <at>  <at>  -885,23 +784,22  <at>  <at>  static int rv34_decode_mv(RV34DecContext
     case RV34_MB_SKIP:
         if(s->pict_type == P_TYPE){
             rv34_pred_mv(r, block_type, 0);
-            rv34_mc(r, block_type, 0, 0, 0, 2, 2);
+            rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0);
             break;
         }
     case RV34_MB_B_DIRECT:
         rv34_pred_mv_b  (r, RV34_MB_B_DIRECT);
-        rv34_mc_b       (r, RV34_MB_B_DIRECT);
-        rv34_mc_b_interp(r, RV34_MB_B_DIRECT);
+        rv34_mc_2mv     (r, RV34_MB_B_DIRECT);
         break;
     case RV34_MB_P_16x16:
     case RV34_MB_P_MIX16x16:
         rv34_pred_mv(r, block_type, 0);
-        rv34_mc(r, block_type, 0, 0, 0, 2, 2);
+        rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0);
         break;
     case RV34_MB_B_FORWARD:
     case RV34_MB_B_BACKWARD:
         rv34_pred_mv_b  (r, block_type);
-        rv34_mc_b       (r, block_type);
+        rv34_mc_1mv     (r, block_type, 0, 0, 0, 2, 2, block_type == RV34_MB_B_BACKWARD);
         break;
     case RV34_MB_P_16x8:
     case RV34_MB_P_8x16:
 <at>  <at>  -909,23 +807,22  <at>  <at>  static int rv34_decode_mv(RV34DecContext
         rv34_pred_mv(r, block_type, 0);
         rv34_pred_mv(r, block_type, 1);
         if(block_type == RV34_MB_P_16x8){
-            rv34_mc(r, block_type, 0, 0, 0,            2, 1);
-            rv34_mc(r, block_type, 0, 8, s->b8_stride, 2, 1);
+            rv34_mc_1mv(r, block_type, 0, 0, 0,            2, 1, 0);
+            rv34_mc_1mv(r, block_type, 0, 8, s->b8_stride, 2, 1, 0);
         }
         if(block_type == RV34_MB_P_8x16){
-            rv34_mc(r, block_type, 0, 0, 0, 1, 2);
-            rv34_mc(r, block_type, 8, 0, 1, 1, 2);
+            rv34_mc_1mv(r, block_type, 0, 0, 0, 1, 2, 0);
+            rv34_mc_1mv(r, block_type, 8, 0, 1, 1, 2, 0);
         }
         if(block_type == RV34_MB_B_BIDIR){
             rv34_pred_mv_b  (r, block_type);
-            rv34_mc_b       (r, block_type);
-            rv34_mc_b_interp(r, block_type);
+            rv34_mc_2mv     (r, block_type);
         }
         break;
     case RV34_MB_P_8x8:
         for(i=0;i< 4;i++){
             rv34_pred_mv(r, block_type, i);
-            rv34_mc(r, block_type, (i&1)<<3, (i&2)<<2, (i&1)+(i>>1)*s->b8_stride, 1, 1);
+            rv34_mc_1mv (r, block_type, (i&1)<<3, (i&2)<<2, (i&1)+(i>>1)*s->b8_stride, 1, 1, 0);
         }
         break;
     }

Gmane