[FFmpeg-devel] [PATCH] wmv3 encoder : msmpeg4.c changes

Michael Niedermayer michaelni
Wed Jun 20 21:29:22 CEST 2007


Hi

On Wed, Jun 20, 2007 at 08:45:11PM +0200, Denis Fortin wrote:
> Michael Niedermayer a ?crit :
> >Hi
> >
> >On Tue, Jun 19, 2007 at 09:54:48PM +0200, Denis Fortin wrote:
> >>This patch includes changes useful for wmv3 encoder.
> >>Remove some static inline (this has been previously discussed and 
> >>benchmarked)
> >>Add wmv3 specific behavior (it won't affect anything else)
> >
> >[...]
> >>@@ -593,7 +593,7 @@
> >>         s->misc_bits += get_bits_diff(s);
> >> 
> >>         for (i = 0; i < 6; i++) {
> >>-            msmpeg4_encode_block(s, block[i], i);
> >>+            ff_msmpeg4_encode_block(s, block[i], i);
> >>         }
> >>         s->i_tex_bits += get_bits_diff(s);
> >>         s->i_count++;
> >>@@ -783,7 +783,8 @@
> >> static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int 
> >> *dir_ptr)
> >> {
> >>     int sign, code;
> >>-    int pred;
> >>+    int pred, extquant;
> >>+    int extrabits = 0;
> >> 
> >>     if(s->msmpeg4_version==1){
> >>         int32_t *dc_val;
> >>@@ -825,7 +826,16 @@
> >>         code = level;
> >>         if (code > DC_MAX)
> >>             code = DC_MAX;
> >>-
> >>+        else if( s->msmpeg4_version>=6 ) {
> >>+            if( s->qscale == 1 ) {
> >>+                extquant = (level + 3) & 0x3;
> >>+                code  = ((level+3)>>2);
> >>+            } else if( s->qscale == 2 ) {
> >>+                extquant = (level + 1) & 0x1;
> >>+                code  = ((level+1)>>1);
> >>+            }
> >>+        }
> >>+        
> >>         if (s->dc_table_index == 0) {
> >
> >trailing whitespace, and the static X -> ff_X change belongs into a
> >seperate patch
> 
> static X -> ff_X patch attached

looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070620/cc7df3d8/attachment.pgp>



More information about the ffmpeg-devel mailing list