avcodec/huffyuvdec: don't prepare unnecessary joint tables

The number of planes can be lower than 4.
pull/390/head
Christophe Gisquet 9 years ago committed by Paul B Mahol
parent 67d392b979
commit 8028b8260e
  1. 3
      libavcodec/huffyuvdec.c

@ -168,8 +168,9 @@ static int generate_joint_tables(HYuvDecContext *s)
len = (uint8_t *)(bits + (1 << VLC_BITS));
if (s->bitstream_bpp < 24 || s->version > 2) {
int count = 1 + s->alpha + 2 * s->chroma;
int p, i, y, u;
for (p = 0; p < 4; p++) {
for (p = 0; p < count; p++) {
int p0 = s->version > 2 ? p : 0;
for (i = y = 0; y < s->vlc_n; y++) {
int len0 = s->len[p0][y];

Loading…
Cancel
Save