[FFmpeg-cvslog] dsputil: remove non-8bpp draw_edge.

Ronald S. Bultje git at videolan.org
Fri Mar 15 04:48:11 CET 2013


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Thu Mar 14 10:01:52 2013 -0700| [8a523cfa8b922885ba4f2e9a5e7a2ac3b7bcb54b] | committer: Michael Niedermayer

dsputil: remove non-8bpp draw_edge.

It is never used.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a523cfa8b922885ba4f2e9a5e7a2ac3b7bcb54b
---

 libavcodec/dsputil.c          |    8 ++++----
 libavcodec/dsputil_template.c |   10 ++--------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index d425933..b56af0e 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2920,11 +2920,11 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
 #define FUNCC(f, depth) f ## _ ## depth ## _c
 
 #define BIT_DEPTH_FUNCS(depth) \
-    c->get_pixels                    = FUNCC(get_pixels,   depth);\
-    c->draw_edges                    = FUNCC(draw_edges,   depth);
+    c->get_pixels                    = FUNCC(get_pixels,   depth);
 
-    c->clear_block                   = FUNCC(clear_block, 8);\
-    c->clear_blocks                  = FUNCC(clear_blocks, 8);\
+    c->draw_edges                    = FUNCC(draw_edges, 8);
+    c->clear_block                   = FUNCC(clear_block, 8);
+    c->clear_blocks                  = FUNCC(clear_blocks, 8);
 
     switch (avctx->bits_per_raw_sample) {
     case 9:
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c
index 6830ec3..349da7d 100644
--- a/libavcodec/dsputil_template.c
+++ b/libavcodec/dsputil_template.c
@@ -29,6 +29,7 @@
 
 #include "bit_depth_template.c"
 
+#if BIT_DEPTH == 8
 /* draw the edges of width 'w' of an image of size width, height */
 //FIXME check that this is ok for mpeg4 interlaced
 static void FUNCC(draw_edges)(uint8_t *p_buf, int p_wrap, int width, int height, int w, int h, int sides)
@@ -41,16 +42,8 @@ static void FUNCC(draw_edges)(uint8_t *p_buf, int p_wrap, int width, int height,
     /* left and right */
     ptr = buf;
     for(i=0;i<height;i++) {
-#if BIT_DEPTH > 8
-        int j;
-        for (j = 0; j < w; j++) {
-            ptr[j-w] = ptr[0];
-            ptr[j+width] = ptr[width-1];
-        }
-#else
         memset(ptr - w, ptr[0], w);
         memset(ptr + width, ptr[width-1], w);
-#endif
         ptr += wrap;
     }
 
@@ -64,6 +57,7 @@ static void FUNCC(draw_edges)(uint8_t *p_buf, int p_wrap, int width, int height,
         for (i = 0; i < h; i++)
             memcpy(last_line + (i + 1) * wrap, last_line, (width + w + w) * sizeof(pixel)); // bottom
 }
+#endif
 
 static void FUNCC(get_pixels)(int16_t *av_restrict block,
                               const uint8_t *_pixels,



More information about the ffmpeg-cvslog mailing list