summaryrefslogtreecommitdiff
path: root/libavcodec/snowenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-16 04:10:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-16 04:20:59 +0200
commit8156e036e52777532b15d509c3962fb883dabbc9 (patch)
tree1001926bea1f9909549771cd2e023382bf6b024b /libavcodec/snowenc.c
parentb67a0e99ee82bc30af0b0d5f5e3a40bf584470f2 (diff)
avcodec/snowdec: remove mpegvideoencdsp dependency
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r--libavcodec/snowenc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index cb8382154d..0911392785 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;