[FFmpeg-cvslog] avcodec/snowdec: remove mpegvideoencdsp dependency

Michael Niedermayer git at videolan.org
Wed Jul 16 04:21:44 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul 16 04:10:25 2014 +0200| [8156e036e52777532b15d509c3962fb883dabbc9] | committer: Michael Niedermayer

avcodec/snowdec: remove mpegvideoencdsp dependency

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

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

 configure            |    2 +-
 libavcodec/snow.c    |   15 ---------------
 libavcodec/snowenc.c |   19 +++++++++++++++++++
 3 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/configure b/configure
index 4ed43a0..0a6666c 100755
--- a/configure
+++ b/configure
@@ -2157,7 +2157,7 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_e
 rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_er mpegvideo videodsp"
 shorten_decoder_select="golomb"
 sipr_decoder_select="lsp"
-snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder mpegvideoenc"
+snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder"
 snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rangecoder"
 sonic_decoder_select="golomb rangecoder"
 sonic_encoder_select="golomb rangecoder"
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 711d1a4..e3518eb 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -433,7 +433,6 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
     ff_videodsp_init(&s->vdsp, 8);
     ff_dwt_init(&s->dwt);
     ff_h264qpel_init(&s->h264qpel, 8);
-    ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
 
 #define mcf(dx,dy)\
     s->qdsp.put_qpel_pixels_tab       [0][dy+dx/4]=\
@@ -642,20 +641,6 @@ int ff_snow_frame_start(SnowContext *s){
    int w= s->avctx->width; //FIXME round up to x16 ?
    int h= s->avctx->height;
 
-    if (s->current_picture->data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) {
-        s->mpvencdsp.draw_edges(s->current_picture->data[0],
-                                s->current_picture->linesize[0], w   , h   ,
-                                EDGE_WIDTH  , EDGE_WIDTH  , EDGE_TOP | EDGE_BOTTOM);
-        if (s->current_picture->data[2]) {
-            s->mpvencdsp.draw_edges(s->current_picture->data[1],
-                                    s->current_picture->linesize[1], w>>s->chroma_h_shift, h>>s->chroma_v_shift,
-                                    EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM);
-            s->mpvencdsp.draw_edges(s->current_picture->data[2],
-                                    s->current_picture->linesize[2], w>>s->chroma_h_shift, h>>s->chroma_v_shift,
-                                    EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM);
-        }
-    }
-
     ff_snow_release_buffer(s->avctx);
 
     tmp= s->last_picture[s->max_ref_frames-1];
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index cb83821..0911392 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -64,6 +64,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
         ff_snow_common_end(avctx->priv_data);
         return ret;
     }
+    ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
+
     ff_snow_alloc_blocks(s);
 
     s->version=0;
@@ -1602,6 +1604,23 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         s->lambda = 0;
     }//else keep previous frame's qlog until after motion estimation
 
+    if (s->current_picture->data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) {
+        int w = s->avctx->width;
+        int h = s->avctx->height;
+
+        s->mpvencdsp.draw_edges(s->current_picture->data[0],
+                                s->current_picture->linesize[0], w   , h   ,
+                                EDGE_WIDTH  , EDGE_WIDTH  , EDGE_TOP | EDGE_BOTTOM);
+        if (s->current_picture->data[2]) {
+            s->mpvencdsp.draw_edges(s->current_picture->data[1],
+                                    s->current_picture->linesize[1], w>>s->chroma_h_shift, h>>s->chroma_v_shift,
+                                    EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM);
+            s->mpvencdsp.draw_edges(s->current_picture->data[2],
+                                    s->current_picture->linesize[2], w>>s->chroma_h_shift, h>>s->chroma_v_shift,
+                                    EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM);
+        }
+    }
+
     ff_snow_frame_start(s);
     avctx->coded_frame= s->current_picture;
 



More information about the ffmpeg-cvslog mailing list