diff options
author | Fei Wang <fei.w.wang@intel.com> | 2021-10-12 16:23:56 +0800 |
---|---|---|
committer | Wolfgang Haupt <haupt.wolfgang@gmail.com> | 2021-12-28 20:04:52 +0100 |
commit | 8aab15a91d6e8ca726580e969ff71828ad63baaa (patch) | |
tree | 625d66ffbb2fa4403440418c381a4da284a50bae /libavcodec | |
parent | cc33e73618a981de7fd96385ecb34719de031f16 (diff) | |
download | ffmpeg-8aab15a91d6e8ca726580e969ff71828ad63baaa.tar.gz |
cbs_av1: fix incorrect data type
Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be
most 128. And similar return value for cbs_av1_get_relative_dist.
So if plus them and use int8_t for the result may lose its precision.
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit e7ff5722b1abae4284e79da707e71ff82b409699)
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cbs_av1_syntax_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index 6fe6e9a4f3..d98d3d42de 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax_template.c @@ -355,7 +355,7 @@ static int FUNC(set_frame_refs)(CodedBitstreamContext *ctx, RWContext *rw, AV1_REF_FRAME_ALTREF2, AV1_REF_FRAME_ALTREF }; int8_t ref_frame_idx[AV1_REFS_PER_FRAME], used_frame[AV1_NUM_REF_FRAMES]; - int8_t shifted_order_hints[AV1_NUM_REF_FRAMES]; + int16_t shifted_order_hints[AV1_NUM_REF_FRAMES]; int cur_frame_hint, latest_order_hint, earliest_order_hint, ref; int i, j; |