[FFmpeg-cvslog] r16071 - trunk/libavcodec/dnxhdenc.c

bcoudurier subversion
Fri Dec 12 01:12:59 CET 2008


Author: bcoudurier
Date: Fri Dec 12 01:12:59 2008
New Revision: 16071

Log:
move get_pixels_8x4 before init func to avoid useless future declaration

Modified:
   trunk/libavcodec/dnxhdenc.c

Modified: trunk/libavcodec/dnxhdenc.c
==============================================================================
--- trunk/libavcodec/dnxhdenc.c	(original)
+++ trunk/libavcodec/dnxhdenc.c	Fri Dec 12 01:12:59 2008
@@ -33,6 +33,23 @@ int dct_quantize_c(MpegEncContext *s, DC
 
 #define LAMBDA_FRAC_BITS 10
 
+static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
+{
+    int i;
+    for (i = 0; i < 4; i++) {
+        block[0] = pixels[0]; block[1] = pixels[1];
+        block[2] = pixels[2]; block[3] = pixels[3];
+        block[4] = pixels[4]; block[5] = pixels[5];
+        block[6] = pixels[6]; block[7] = pixels[7];
+        pixels += line_size;
+        block += 8;
+    }
+    memcpy(block   , block- 8, sizeof(*block)*8);
+    memcpy(block+ 8, block-16, sizeof(*block)*8);
+    memcpy(block+16, block-24, sizeof(*block)*8);
+    memcpy(block+24, block-32, sizeof(*block)*8);
+}
+
 static int dnxhd_init_vlc(DNXHDEncContext *ctx)
 {
     int i, j, level, run;
@@ -330,23 +347,6 @@ static av_always_inline int dnxhd_calc_a
     return bits;
 }
 
-static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
-{
-    int i;
-    for (i = 0; i < 4; i++) {
-        block[0] = pixels[0]; block[1] = pixels[1];
-        block[2] = pixels[2]; block[3] = pixels[3];
-        block[4] = pixels[4]; block[5] = pixels[5];
-        block[6] = pixels[6]; block[7] = pixels[7];
-        pixels += line_size;
-        block += 8;
-    }
-    memcpy(block   , block- 8, sizeof(*block)*8);
-    memcpy(block+ 8, block-16, sizeof(*block)*8);
-    memcpy(block+16, block-24, sizeof(*block)*8);
-    memcpy(block+24, block-32, sizeof(*block)*8);
-}
-
 static av_always_inline void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y)
 {
     const uint8_t *ptr_y = ctx->thread[0]->src[0] + ((mb_y << 4) * ctx->m.linesize)   + (mb_x << 4);




More information about the ffmpeg-cvslog mailing list