mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-08 08:10:12 +00:00
avcodec/huffyuvdec: don't prepare unnecessary joint tables
The number of planes can be lower than 4.
This commit is contained in:
parent
67d392b979
commit
8028b8260e
@ -168,8 +168,9 @@ static int generate_joint_tables(HYuvDecContext *s)
|
|||||||
len = (uint8_t *)(bits + (1 << VLC_BITS));
|
len = (uint8_t *)(bits + (1 << VLC_BITS));
|
||||||
|
|
||||||
if (s->bitstream_bpp < 24 || s->version > 2) {
|
if (s->bitstream_bpp < 24 || s->version > 2) {
|
||||||
|
int count = 1 + s->alpha + 2 * s->chroma;
|
||||||
int p, i, y, u;
|
int p, i, y, u;
|
||||||
for (p = 0; p < 4; p++) {
|
for (p = 0; p < count; p++) {
|
||||||
int p0 = s->version > 2 ? p : 0;
|
int p0 = s->version > 2 ? p : 0;
|
||||||
for (i = y = 0; y < s->vlc_n; y++) {
|
for (i = y = 0; y < s->vlc_n; y++) {
|
||||||
int len0 = s->len[p0][y];
|
int len0 = s->len[p0][y];
|
||||||
|
Loading…
Reference in New Issue
Block a user