You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/error_resilience: Factor block parity check out
This makes the code noticably faster when there are lots of blocks Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -450,7 +450,7 @@ static void guess_mv(ERContext *s)
|
|||||||
|
|
||||||
changed = 0;
|
changed = 0;
|
||||||
for (mb_y = 0; mb_y < mb_height; mb_y++) {
|
for (mb_y = 0; mb_y < mb_height; mb_y++) {
|
||||||
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
|
for (mb_x = (mb_y ^ pass) & 1; mb_x < s->mb_width; mb_x+=2) {
|
||||||
const int mb_xy = mb_x + mb_y * s->mb_stride;
|
const int mb_xy = mb_x + mb_y * s->mb_stride;
|
||||||
int mv_predictor[8][2] = { { 0 } };
|
int mv_predictor[8][2] = { { 0 } };
|
||||||
int ref[8] = { 0 };
|
int ref[8] = { 0 };
|
||||||
@@ -461,9 +461,6 @@ static void guess_mv(ERContext *s)
|
|||||||
const int mot_index = (mb_x + mb_y * mot_stride) * mot_step;
|
const int mot_index = (mb_x + mb_y * mot_stride) * mot_step;
|
||||||
int prev_x = 0, prev_y = 0, prev_ref = 0;
|
int prev_x = 0, prev_y = 0, prev_ref = 0;
|
||||||
|
|
||||||
if ((mb_x ^ mb_y ^ pass) & 1)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (fixed[mb_xy] == MV_FROZEN)
|
if (fixed[mb_xy] == MV_FROZEN)
|
||||||
continue;
|
continue;
|
||||||
av_assert1(!IS_INTRA(s->cur_pic.mb_type[mb_xy]));
|
av_assert1(!IS_INTRA(s->cur_pic.mb_type[mb_xy]));
|
||||||
|
Reference in New Issue
Block a user