mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
vp9: ignore reference segmentation map if error_resilience flag is set.
Fixes ffvp9_fails_where_libvpx.succeeds.webm from ticket 3849. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8fcd9386ec
commit
14e3025518
@ -278,7 +278,7 @@ static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame *f)
|
||||
|
||||
// retain segmentation map if it doesn't update
|
||||
if (s->segmentation.enabled && !s->segmentation.update_map &&
|
||||
!s->intraonly && !s->keyframe) {
|
||||
!s->intraonly && !s->keyframe && !s->errorres) {
|
||||
memcpy(f->segmentation_map, s->frames[LAST_FRAME].segmentation_map, sz);
|
||||
}
|
||||
|
||||
@ -1344,6 +1344,7 @@ static void decode_mode(AVCodecContext *ctx)
|
||||
vp56_rac_get_prob_branchy(&s->c,
|
||||
s->prob.segpred[s->above_segpred_ctx[col] +
|
||||
s->left_segpred_ctx[row7]]))) {
|
||||
if (!s->errorres) {
|
||||
int pred = 8, x;
|
||||
uint8_t *refsegmap = s->frames[LAST_FRAME].segmentation_map;
|
||||
|
||||
@ -1354,6 +1355,9 @@ static void decode_mode(AVCodecContext *ctx)
|
||||
pred = FFMIN(pred, refsegmap[(y + row) * 8 * s->sb_cols + x + col]);
|
||||
av_assert1(pred < 8);
|
||||
b->seg_id = pred;
|
||||
} else {
|
||||
b->seg_id = 0;
|
||||
}
|
||||
|
||||
memset(&s->above_segpred_ctx[col], 1, w4);
|
||||
memset(&s->left_segpred_ctx[row7], 1, h4);
|
||||
|
Loading…
Reference in New Issue
Block a user