You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
vp9: use aligned size to write segmentation map into cache.
The unaligned size is not handled in setctx_2d(), causing edges of images to have improper segmentation prediction, which causes visual artifacts at image edges a few frames later.
This commit is contained in:
committed by
Michael Niedermayer
parent
3de13d5212
commit
ed45edb2f6
@@ -1352,8 +1352,8 @@ static void decode_mode(AVCodecContext *ctx)
|
|||||||
VP9Block *b = s->b;
|
VP9Block *b = s->b;
|
||||||
int row = s->row, col = s->col, row7 = s->row7;
|
int row = s->row, col = s->col, row7 = s->row7;
|
||||||
enum TxfmMode max_tx = max_tx_for_bl_bp[b->bs];
|
enum TxfmMode max_tx = max_tx_for_bl_bp[b->bs];
|
||||||
int w4 = FFMIN(s->cols - col, bwh_tab[1][b->bs][0]);
|
int bw4 = bwh_tab[1][b->bs][0], w4 = FFMIN(s->cols - col, bw4);
|
||||||
int h4 = FFMIN(s->rows - row, bwh_tab[1][b->bs][1]), y;
|
int bh4 = bwh_tab[1][b->bs][1], h4 = FFMIN(s->rows - row, bh4), y;
|
||||||
int have_a = row > 0, have_l = col > s->tiling.tile_col_start;
|
int have_a = row > 0, have_l = col > s->tiling.tile_col_start;
|
||||||
int vref, filter_id;
|
int vref, filter_id;
|
||||||
|
|
||||||
@@ -1395,7 +1395,7 @@ static void decode_mode(AVCodecContext *ctx)
|
|||||||
if (s->segmentation.enabled &&
|
if (s->segmentation.enabled &&
|
||||||
(s->segmentation.update_map || s->keyframe || s->intraonly)) {
|
(s->segmentation.update_map || s->keyframe || s->intraonly)) {
|
||||||
setctx_2d(&s->frames[CUR_FRAME].segmentation_map[row * 8 * s->sb_cols + col],
|
setctx_2d(&s->frames[CUR_FRAME].segmentation_map[row * 8 * s->sb_cols + col],
|
||||||
w4, h4, 8 * s->sb_cols, b->seg_id);
|
bw4, bh4, 8 * s->sb_cols, b->seg_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
b->skip = s->segmentation.enabled &&
|
b->skip = s->segmentation.enabled &&
|
||||||
|
Reference in New Issue
Block a user