You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/hq_hqa: Include implicit +1 run in RL VLC table
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -88,7 +88,7 @@ static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64],
|
||||
}
|
||||
|
||||
OPEN_READER(re, gb);
|
||||
for (int pos = 1;;) {
|
||||
for (int pos = 0;;) {
|
||||
int level, run;
|
||||
UPDATE_CACHE(re, gb);
|
||||
GET_RL_VLC(level, run, re, gb, hq_ac_rvlc, 9, 2, 0);
|
||||
@ -101,7 +101,6 @@ static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64],
|
||||
if (pos >= 64)
|
||||
break;
|
||||
block[ff_zigzag_direct[pos]] = (int)(level * (unsigned)q[pos]) >> 12;
|
||||
pos++;
|
||||
}
|
||||
CLOSE_READER(re, gb);
|
||||
|
||||
@ -387,7 +386,7 @@ static av_cold void hq_init_static(void)
|
||||
|
||||
if (len > 0) {
|
||||
level = hq_ac_syms[sym];
|
||||
run = hq_ac_skips[sym];
|
||||
run = hq_ac_skips[sym] + 1;
|
||||
} else if (len < 0) { // More bits needed
|
||||
run = 0;
|
||||
} else { // Invalid code
|
||||
|
@ -1155,7 +1155,7 @@ static const uint8_t hq_quant_map[NUM_HQ_QUANTS][2][4] =
|
||||
{ { QMAT3A, QMAT48, QMAT4C, QMAT4C }, { QMAT3B, QMAT49, QMAT4D, QMAT4D } },
|
||||
};
|
||||
|
||||
#define HQ_AC_INVALID_RUN 128
|
||||
#define HQ_AC_INVALID_RUN 0
|
||||
|
||||
static const uint8_t hq_ac_bits[NUM_HQ_AC_ENTRIES] = {
|
||||
3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6,
|
||||
|
Reference in New Issue
Block a user