diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-09 14:12:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-09 14:19:24 +0100 |
commit | 2830f287e2f271bcf773f645e5d9cb9aa5204f7f (patch) | |
tree | ceda9d20e4c2e19e32e1c092e36dc8558fb0f0e2 /libavcodec/mpegvideo.c | |
parent | bba73f5574afd3095e017f70bca1547dd43f702f (diff) | |
parent | ebfe622bb1ca57cecb932e42926745cba7161913 (diff) | |
download | ffmpeg-2830f287e2f271bcf773f645e5d9cb9aa5204f7f.tar.gz |
Merge commit 'ebfe622bb1ca57cecb932e42926745cba7161913'
* commit 'ebfe622bb1ca57cecb932e42926745cba7161913':
mpegvideo: drop support for real (non-emulated) edges
Conflicts:
libavcodec/mpegvideo.c
libavcodec/mpegvideo_motion.c
libavcodec/wmv2.c
If this is slower on a major platform then it should be investigated
and potentially reverted.
See: 8fc52a5ef94712d900fc8fe7503cf9c9ba635143
See: 3969b4b861ce8152e3195e8f8c3437abd273b90a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 56 |
1 files changed, 2 insertions, 54 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d9d3602f29..d96dac40b0 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1852,32 +1852,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) /* called after a frame has been decoded. */ void ff_MPV_frame_end(MpegEncContext *s) { - if ((s->er.error_count || !(s->avctx->codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND)) && - !s->avctx->hwaccel && - !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) && - s->unrestricted_mv && - s->current_picture.reference && - !s->intra_only && - !(s->flags & CODEC_FLAG_EMU_EDGE) && - !s->avctx->lowres - ) { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt); - int hshift = desc->log2_chroma_w; - int vshift = desc->log2_chroma_h; - s->dsp.draw_edges(s->current_picture.f.data[0], s->current_picture.f.linesize[0], - s->h_edge_pos, s->v_edge_pos, - EDGE_WIDTH, EDGE_WIDTH, - EDGE_TOP | EDGE_BOTTOM); - s->dsp.draw_edges(s->current_picture.f.data[1], s->current_picture.f.linesize[1], - s->h_edge_pos >> hshift, s->v_edge_pos >> vshift, - EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift, - EDGE_TOP | EDGE_BOTTOM); - s->dsp.draw_edges(s->current_picture.f.data[2], s->current_picture.f.linesize[2], - s->h_edge_pos >> hshift, s->v_edge_pos >> vshift, - EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift, - EDGE_TOP | EDGE_BOTTOM); - } - emms_c(); if (s->current_picture.reference) @@ -3031,11 +3005,10 @@ void ff_MPV_decode_mb(MpegEncContext *s, int16_t block[12][64]){ */ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur, Picture *last, int y, int h, int picture_structure, - int first_field, int draw_edges, int low_delay, + int first_field, int low_delay, int v_edge_pos, int h_edge_pos) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); - int hshift = desc->log2_chroma_w; int vshift = desc->log2_chroma_h; const int field_pic = picture_structure != PICT_FRAME; if(field_pic){ @@ -3043,30 +3016,6 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur, y <<= 1; } - if (!avctx->hwaccel && - !(avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) && - draw_edges && - cur->reference && - !(avctx->flags & CODEC_FLAG_EMU_EDGE)) { - int *linesize = cur->f.linesize; - int sides = 0, edge_h; - if (y==0) sides |= EDGE_TOP; - if (y + h >= v_edge_pos) - sides |= EDGE_BOTTOM; - - edge_h= FFMIN(h, v_edge_pos - y); - - dsp->draw_edges(cur->f.data[0] + y * linesize[0], - linesize[0], h_edge_pos, edge_h, - EDGE_WIDTH, EDGE_WIDTH, sides); - dsp->draw_edges(cur->f.data[1] + (y >> vshift) * linesize[1], - linesize[1], h_edge_pos >> hshift, edge_h >> vshift, - EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift, sides); - dsp->draw_edges(cur->f.data[2] + (y >> vshift) * linesize[2], - linesize[2], h_edge_pos >> hshift, edge_h >> vshift, - EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift, sides); - } - h = FFMIN(h, avctx->height - y); if(field_pic && first_field && !(avctx->slice_flags&SLICE_FLAG_ALLOW_FIELD)) return; @@ -3106,10 +3055,9 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur, void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h) { - int draw_edges = s->unrestricted_mv && !s->intra_only; ff_draw_horiz_band(s->avctx, &s->dsp, s->current_picture_ptr, s->last_picture_ptr, y, h, s->picture_structure, - s->first_field, draw_edges, s->low_delay, + s->first_field, s->low_delay, s->v_edge_pos, s->h_edge_pos); } |