diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-07 02:57:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-07 03:22:49 +0100 |
commit | 6df42f98746be06c883ce683563e07c9a2af983f (patch) | |
tree | 6bb893aaf179526515cfb3b1cc933721317dcf6f /libavcodec/error_resilience.c | |
parent | 57986c501e8c97d4bd2e1b7ce9e9037c4ae06245 (diff) | |
parent | b5161908e06b4497bf663510fb495ba97a6fd2b5 (diff) | |
download | ffmpeg-6df42f98746be06c883ce683563e07c9a2af983f.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
SBR DSP: fix SSE code to not use SSE2 instructions.
cpu: initialize mask to -1, so that by default, optimizations are used.
error_resilience: initialize s->block_index[].
svq3: protect against negative quantizers.
Don't use ff_cropTbl[] for IDCT.
swscale: make filterPos 32bit.
FATE: add CPUFLAGS variable, mapping to -cpuflags avconv option.
avconv: add -cpuflags option for setting supported cpuflags.
cpu: add av_set_cpu_flags_mask().
libx264: Allow overriding the sliced threads option
avconv: fix counting encoded video size.
Conflicts:
doc/APIchanges
doc/fate.texi
doc/ffmpeg.texi
ffmpeg.c
libavcodec/h264idct_template.c
libavcodec/svq3.c
libavutil/avutil.h
libavutil/cpu.c
libavutil/cpu.h
libswscale/swscale.c
tests/Makefile
tests/fate-run.sh
tests/regression-funcs.sh
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 1c1420f93c..35825581af 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -440,9 +440,14 @@ static void guess_mv(MpegEncContext *s) if ((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) || num_avail <= mb_width / 2) { for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + s->mb_x = 0; + s->mb_y = mb_y; + ff_init_block_index(s); for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int mb_xy = mb_x + mb_y * s->mb_stride; + ff_update_block_index(s); + if (IS_INTRA(s->current_picture.f.mb_type[mb_xy])) continue; if (!(s->error_status_table[mb_xy] & ER_MV_ERROR)) @@ -477,6 +482,9 @@ static void guess_mv(MpegEncContext *s) changed = 0; for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + s->mb_x = 0; + s->mb_y = mb_y; + ff_init_block_index(s); for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int mb_xy = mb_x + mb_y * s->mb_stride; int mv_predictor[8][2] = { { 0 } }; @@ -488,6 +496,8 @@ static void guess_mv(MpegEncContext *s) const int mot_index = (mb_x + mb_y * mot_stride) * mot_step; int prev_x, prev_y, prev_ref; + ff_update_block_index(s); + if ((mb_x ^ mb_y ^ pass) & 1) continue; @@ -1098,11 +1108,16 @@ void ff_er_frame_end(MpegEncContext *s) /* handle inter blocks with damaged AC */ for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + s->mb_x = 0; + s->mb_y = mb_y; + ff_init_block_index(s); for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int mb_xy = mb_x + mb_y * s->mb_stride; const int mb_type = s->current_picture.f.mb_type[mb_xy]; int dir = !s->last_picture.f.data[0]; + ff_update_block_index(s); + error = s->error_status_table[mb_xy]; if (IS_INTRA(mb_type)) @@ -1140,11 +1155,16 @@ void ff_er_frame_end(MpegEncContext *s) /* guess MVs */ if (s->pict_type == AV_PICTURE_TYPE_B) { for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + s->mb_x = 0; + s->mb_y = mb_y; + ff_init_block_index(s); for (mb_x = 0; mb_x < s->mb_width; mb_x++) { int xy = mb_x * 2 + mb_y * 2 * s->b8_stride; const int mb_xy = mb_x + mb_y * s->mb_stride; const int mb_type = s->current_picture.f.mb_type[mb_xy]; + ff_update_block_index(s); + error = s->error_status_table[mb_xy]; if (IS_INTRA(mb_type)) |