avcodec/hq: Include alpha in cbp VLC table

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2025-04-09 16:30:57 +02:00
parent e38616c4ac
commit 12c9ffa569
3 changed files with 1 additions and 4 deletions

View File

@ -19,7 +19,7 @@
#include "hq_common.h"
#define REPEAT(x) x x
#define ELEM(_sym, _len) {.sym = _sym, .len = _len },
#define ELEM(_sym, _len) {.sym = _sym << 4 | _sym, .len = _len },
#define LEN5(sym) ELEM(sym, 5)
#define LEN4(sym) REPEAT(ELEM(sym, 4))
#define LEN2(sym) REPEAT(REPEAT(REPEAT(ELEM(sym, 2))))

View File

@ -206,7 +206,6 @@ static int hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup,
if (cbp) {
flag = get_bits1(gb);
cbp |= cbp << 4;
if (cbp & 0x3)
cbp |= 0x500;
if (cbp & 0xC)

View File

@ -234,7 +234,6 @@ static int hqx_decode_422a(HQXContext *ctx, int slice_no, int x, int y)
quants = hqx_quants[get_bits(gb, 4)];
cbp |= cbp << 4; // alpha CBP
if (cbp & 0x3) // chroma CBP - top
cbp |= 0x500;
if (cbp & 0xC) // chroma CBP - bottom
@ -319,7 +318,6 @@ static int hqx_decode_444a(HQXContext *ctx, int slice_no, int x, int y)
quants = hqx_quants[get_bits(gb, 4)];
cbp |= cbp << 4; // alpha CBP
cbp |= cbp << 8; // chroma CBP
for (i = 0; i < 16; i++) {
if (!(i & 3))