diff options
author | Frank Plowman <post@frankplowman.com> | 2024-11-28 22:17:27 +0000 |
---|---|---|
committer | Nuo Mi <nuomi2021@gmail.com> | 2024-12-03 10:22:55 +0800 |
commit | 499896ca2f3665d936f5892dee4a9d37b03fbea2 (patch) | |
tree | 2c8b120d10436b8305a2b69dd9725d3e02f429d0 | |
parent | 699322519c9dd62a00177a518c0cdfa238ca3fcd (diff) | |
download | ffmpeg-499896ca2f3665d936f5892dee4a9d37b03fbea2.tar.gz |
lavc/vvc: Fix derivation of LmcsMaxBinIdx
Per H.266 (V3) section 7.4.3.19, LmcsMaxBinIdx is set equal to
15 - lmcs_delta_max_bin_idx. The previous code instead had it equal to
15 - lmcs_min_bin_idx. This could cause decoder mismatches.
Signed-off-by: Frank Plowman <post@frankplowman.com>
-rw-r--r-- | libavcodec/vvc/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index 14cedfd1b3..2dfa680884 100644 --- a/libavcodec/vvc/ps.c +++ b/libavcodec/vvc/ps.c @@ -742,7 +742,7 @@ static int lmcs_derive_lut(VVCLMCS *lmcs, const H266RawAPS *rlmcs, const H266Raw return AVERROR_INVALIDDATA; lmcs->min_bin_idx = rlmcs->lmcs_min_bin_idx; - lmcs->max_bin_idx = LMCS_MAX_BIN_SIZE - 1 - rlmcs->lmcs_min_bin_idx; + lmcs->max_bin_idx = LMCS_MAX_BIN_SIZE - 1 - rlmcs->lmcs_delta_max_bin_idx; memset(cw, 0, sizeof(cw)); for (int i = lmcs->min_bin_idx; i <= lmcs->max_bin_idx; i++) |