[FFmpeg-devel] [PATCH] Add 4x4 IDCT

Kostya kostya.shishkov
Sat Dec 8 13:45:20 CET 2007


On Sat, Dec 08, 2007 at 11:13:19AM +0000, M?ns Rullg?rd wrote:
> Kostya <kostya.shishkov at gmail.com> writes:
> 
> > Here's a patch that adds missing 4x4 IDCT (will be used by VC-1 decoder).
> >
> > Index: simple_idct.c
> > ===================================================================
> > --- simple_idct.c	(revision 11185)
> > +++ simple_idct.c	(working copy)
> > @@ -585,3 +585,17 @@
> >      }
> >  }
> >
> > +void simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block)
> 
> We should prefix all new non-API functions with ff_, even if it is
> inconsistent with the rest of the file.
> 
> > +{
> > +    int i;
> > +
> > +    /* IDCT4 on each line */
> > +    for(i=0; i<4; i++) {
> > +        idct4row(block + i*8);
> > +    }
> > +
> > +    /* IDCT8 and store */
> 
> That comment is wrong.
> 
> > +    for(i=0; i<4; i++){
> > +        idct4col_add(dest + i, line_size, block + i);
> > +    }
> > +}
> > Index: simple_idct.h
> > ===================================================================
> > --- simple_idct.h	(revision 11125)
> > +++ simple_idct.h	(working copy)
> > @@ -42,5 +42,6 @@
> >
> >  void simple_idct84_add(uint8_t *dest, int line_size, DCTELEM *block);
> >  void simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block);
> > +void simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block);
> >
> >  #endif /* FFMPEG_SIMPLE_IDCT_H */
> 
> Apart from the above, I can see nothing wrong with this, but do wait
> for an OK from Michael before committing.

Here's a new patch and thank you for review.
 
> -- 
> M?ns Rullg?rd
> mans at mansr.com
-------------- next part --------------
Index: simple_idct.h
===================================================================
--- simple_idct.h	(revision 11125)
+++ simple_idct.h	(working copy)
@@ -42,5 +42,6 @@
 
 void simple_idct84_add(uint8_t *dest, int line_size, DCTELEM *block);
 void simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block);
+void ff_simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block);
 
 #endif /* FFMPEG_SIMPLE_IDCT_H */
Index: simple_idct.c
===================================================================
--- simple_idct.c	(revision 11185)
+++ simple_idct.c	(working copy)
@@ -585,3 +585,17 @@
     }
 }
 
+void ff_simple_idct44_add(uint8_t *dest, int line_size, DCTELEM *block)
+{
+    int i;
+
+    /* IDCT4 on each line */
+    for(i=0; i<4; i++) {
+        idct4row(block + i*8);
+    }
+
+    /* IDCT4 and store */
+    for(i=0; i<4; i++){
+        idct4col_add(dest + i, line_size, block + i);
+    }
+}



More information about the ffmpeg-devel mailing list