wmv2: drop non emu edge mode
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 28 Mar 2013 20:56:02 +0000 (21:56 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 28 Mar 2013 20:59:23 +0000 (21:59 +0100)
slightly (~ 0.5%) faster, tested with time ./ffmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmv2.c
libavcodec/wmv2dec.c

index b5d0512..918d438 100644 (file)
@@ -116,7 +116,6 @@ void ff_mspel_motion(MpegEncContext *s,
     uvlinesize = s->uvlinesize;
     ptr = ref_picture[0] + (src_y * linesize) + src_x;
 
-    if(s->flags&CODEC_FLAG_EMU_EDGE || src_y <= -15 || src_y >= s->height - 1)
         if(src_x<1 || src_y<1 || src_x + 17  >= s->h_edge_pos
                               || src_y + h+1 >= v_edge_pos){
             s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr - 1 - s->linesize, s->linesize, 19, 19,
index fccb1bb..099cc36 100644 (file)
@@ -446,6 +446,8 @@ int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64])
 static av_cold int wmv2_decode_init(AVCodecContext *avctx){
     Wmv2Context * const w= avctx->priv_data;
 
+    avctx->flags |= CODEC_FLAG_EMU_EDGE;
+
     if(ff_msmpeg4_decode_init(avctx) < 0)
         return -1;