diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 14:13:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 14:13:20 +0100 |
commit | 131b9c924d6df2b52ca5821a13ddf6fdb49fe76c (patch) | |
tree | 9dfba94c2fb8f998a75b9bba1f2338681b333ef1 | |
parent | 0a707da37b4101730debda1a5600022bbb0b736e (diff) | |
parent | 68f930d2188aba5b32624887dcbf688c23482834 (diff) | |
download | ffmpeg-131b9c924d6df2b52ca5821a13ddf6fdb49fe76c.tar.gz |
Merge commit '68f930d2188aba5b32624887dcbf688c23482834'
* commit '68f930d2188aba5b32624887dcbf688c23482834':
h264: simplify calls to ff_er_add_slice().
Conflicts:
libavcodec/h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index f171e0733c..d82ee9057e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3740,8 +3740,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) { H264Context *h = *(void **)arg; MpegEncContext *const s = &h->s; - const int part_mask = s->partitioned_frame ? (ER_AC_END | ER_AC_ERROR) - : 0x7F; int lf_x_start = s->mb_x; s->mb_skip_run = -1; @@ -3787,7 +3785,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) if ((s->workaround_bugs & FF_BUG_TRUNCATED) && h->cabac.bytestream > h->cabac.bytestream_end + 2) { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x - 1, - s->mb_y, ER_MB_END & part_mask); + s->mb_y, ER_MB_END); if (s->mb_x >= lf_x_start) loop_filter(h, lf_x_start, s->mb_x + 1); return 0; @@ -3800,7 +3798,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) s->mb_x, s->mb_y, h->cabac.bytestream_end - h->cabac.bytestream); ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, - s->mb_y, ER_MB_ERROR & part_mask); + s->mb_y, ER_MB_ERROR); return -1; } @@ -3820,7 +3818,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits); ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x - 1, - s->mb_y, ER_MB_END & part_mask); + s->mb_y, ER_MB_END); if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x); return 0; @@ -3847,7 +3845,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y); ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, - s->mb_y, ER_MB_ERROR & part_mask); + s->mb_y, ER_MB_ERROR); return -1; } @@ -3869,13 +3867,13 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) || get_bits_left(&s->gb) > 0 && !(s->avctx->err_recognition & AV_EF_AGGRESSIVE)) { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x - 1, s->mb_y, - ER_MB_END & part_mask); + ER_MB_END); return 0; } else { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, - ER_MB_END & part_mask); + ER_MB_END); return -1; } @@ -3888,14 +3886,14 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) if (get_bits_left(&s->gb) == 0) { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x - 1, s->mb_y, - ER_MB_END & part_mask); + ER_MB_END); if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x); return 0; } else { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, - s->mb_y, ER_MB_ERROR & part_mask); + s->mb_y, ER_MB_ERROR); return -1; } |