]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp3dsp.c
aacenc: fix typo in sync extension constant in 8ae0fa2
[ffmpeg] / libavcodec / vp3dsp.c
index 87b64de385eac865b3b7600220989a31e03e6e49..94efa3b1d25b53bf2adc6502a596ea42614cb212 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 /**
- * @file libavcodec/vp3dsp.c
+ * @file
  * Standard C DSP-oriented functions cribbed from the original VP3
  * source code.
  */
@@ -223,6 +223,23 @@ void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*
     idct(dest, line_size, block, 2);
 }
 
+void ff_vp3_idct_dc_add_c(uint8_t *dest/*align 8*/, int line_size, const DCTELEM *block/*align 16*/){
+    int i, dc = (block[0] + 15) >> 5;
+    const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + dc;
+
+    for(i = 0; i < 8; i++){
+        dest[0] = cm[dest[0]];
+        dest[1] = cm[dest[1]];
+        dest[2] = cm[dest[2]];
+        dest[3] = cm[dest[3]];
+        dest[4] = cm[dest[4]];
+        dest[5] = cm[dest[5]];
+        dest[6] = cm[dest[6]];
+        dest[7] = cm[dest[7]];
+        dest += line_size;
+    }
+}
+
 void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values)
 {
     unsigned char *end;