Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-03 17:39:46 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-05 15:22:30 +0300
commit6b1a7fc8bd473aa4e644a64335eb93044647f96d (patch)
tree93225e5baf1c177b2fa73b85e56b18a42ace6913 /libavcodec/cfhddata.c
parent2ed5925e26f77fc377cedcefb3864dc1a4712210 (diff)
avcodec/cfhd, cfhddata: Simplify check for escape
cfhd.c checked for level being equal to a certain codebook- dependent constant and to run being two. The first check is actually redundant, as all codebooks contain only one (real) entry with run == 2 (as is usual with VLCs, this one real entry has several corresponding entries in the table). But given that no entry has a run of zero (except incomplete entries which just signal that one needs to do another round of parsing), one can actually use that as sentinel. This patch does so. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/cfhddata.c')
-rw-r--r--libavcodec/cfhddata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cfhddata.c b/libavcodec/cfhddata.c
index 67bd8e66db..212dccadb9 100644
--- a/libavcodec/cfhddata.c
+++ b/libavcodec/cfhddata.c
@@ -72,7 +72,7 @@ static const uint16_t table_9_vlc_run[NB_VLC_TABLE_9] = {
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2,
+ 1, 0,
};
static const uint8_t table_9_vlc_level[NB_VLC_TABLE_9] = {
@@ -226,7 +226,7 @@ static const uint16_t table_18_vlc_run[NB_VLC_TABLE_18] = {
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 0,
};
static const uint8_t table_18_vlc_level[NB_VLC_TABLE_18] = {