Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-20 14:20:24 +0400
committerAnton Khirnov <anton@khirnov.net>2014-01-09 12:41:19 +0400
commitebfe622bb1ca57cecb932e42926745cba7161913 (patch)
treea63aa02a42854db02d71b05b97123ddc400e8df7 /libavcodec/mpegvideo.c
parent952d3187d8eda7067fcd73f1d5f17837fa65eb34 (diff)
mpegvideo: drop support for real (non-emulated) edges
Several decoders disable those anyway and they are not measurably faster on x86. They might be somewhat faster on other platforms due to missing emu edge SIMD, but the gain is not large enough (and those decoders relevant enough) to justify the added complexity.
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c51
1 files changed, 2 insertions, 49 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 583a83e7ac..6ecfd727c1 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1832,28 +1832,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
} else
FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_XVMC */
- if (s->er.error_count &&
- !s->avctx->hwaccel &&
- s->unrestricted_mv &&
- s->current_picture.reference &&
- !s->intra_only &&
- !(s->flags & CODEC_FLAG_EMU_EDGE)) {
- 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->linesize,
- 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->uvlinesize,
- 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->uvlinesize,
- s->h_edge_pos >> hshift, s->v_edge_pos >> vshift,
- EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift,
- EDGE_TOP | EDGE_BOTTOM);
- }
emms_c();
@@ -2318,11 +2296,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){
@@ -2330,29 +2307,6 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,
y <<= 1;
}
- if (!avctx->hwaccel &&
- 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;
@@ -2392,10 +2346,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,
&s->last_picture, 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);
}