libavcodec/qdm2.c:979: error: Uninitialized Value
  The value read from samples[_] was never initialized.

libavcodec/qdm2.c:979:33: 
977.                                     q->tone_level[1][sb][(j + k) / 2] * -samples[k];
978.                             else
979.                                 q->sb_samples[1][j + k][sb] =
                                     ^
980.                                     q->tone_level[1][sb][(j + k) / 2] * samples[k];
981.                         }

static void synthfilt_build_sb_samples(QDM2Context *q, GetBitContext *gb,
                                       int length, int sb_min, int sb_max)
{
    int sb, j, k, n, ch, run, channels;
    int joined_stereo, zero_encoding;
    int type34_first;
    float type34_div = 0;
    float type34_predictor;
    float samples[10], sign_bits[16];
    if (length == 0) {
        for (sb=sb_min; sb < sb_max; sb++)
            build_sb_samples_from_noise (q, sb);
        return;
    }
    for (sb = sb_min; sb < sb_max; sb++) {
        channels = q->nb_channels;
        if (q->nb_channels <= 1 || sb < 12)
            joined_stereo = 0;
        else if (sb >= 24)
            joined_stereo = 1;
        else
            joined_stereo = (get_bits_left(gb) >= 1) ? get_bits1 (gb) : 0;
        if (joined_stereo) {
            if (get_bits_left(gb) >= 16)
                for (j = 0; j < 16; j++)
                    sign_bits[j] = get_bits1 (gb);
            for (j = 0; j < 64; j++)
                if (q->coding_method[1][sb][j] > q->coding_method[0][sb][j])
                    q->coding_method[0][sb][j] = q->coding_method[1][sb][j];
            if (fix_coding_method_array(sb, q->nb_channels,
                                            q->coding_method)) {
                build_sb_samples_from_noise(q, sb);
                continue;
            }
            channels = 1;
        }
        for (ch = 0; ch < channels; ch++) {
            FIX_NOISE_IDX(q->noise_idx);
            zero_encoding = (get_bits_left(gb) >= 1) ? get_bits1(gb) : 0;
            type34_predictor = 0.0;
            type34_first = 1;
            for (j = 0; j < 128; ) {
                switch (q->coding_method[ch][sb][j / 2]) {
                    case 8:
                        if (get_bits_left(gb) >= 10) {
                            if (zero_encoding) {
                                for (k = 0; k < 5; k++) {
                                    if ((j + 2 * k) >= 128)
                                        break;
                                    samples[2 * k] = get_bits1(gb) ? dequant_1bit[joined_stereo][2 * get_bits1(gb)] : 0;
                                }
                            } else {
                                n = get_bits(gb, 8);
                                for (k = 0; k < 5; k++)
                                    samples[2 * k] = dequant_1bit[joined_stereo][random_dequant_index[n][k]];
                            }
                            for (k = 0; k < 5; k++)
                                samples[2 * k + 1] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        } else {
                            for (k = 0; k < 10; k++)
                                samples[k] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        }
                        run = 10;
                        break;
                    case 10:
                        if (get_bits_left(gb) >= 1) {
                            float f = 0.81;
                            if (get_bits1(gb))
                                f = -f;
                            f -= noise_samples[((sb + 1) * (j +5 * ch + 1)) & 127] * 9.0 / 40.0;
                            samples[0] = f;
                        } else {
                            samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        }
                        run = 1;
                        break;
                    case 16:
                        if (get_bits_left(gb) >= 10) {
                            if (zero_encoding) {
                                for (k = 0; k < 5; k++) {
                                    if ((j + k) >= 128)
                                        break;
                                    samples[k] = (get_bits1(gb) == 0) ? 0 : dequant_1bit[joined_stereo][2 * get_bits1(gb)];
                                }
                            } else {
                                n = get_bits (gb, 8);
                                for (k = 0; k < 5; k++)
                                    samples[k] = dequant_1bit[joined_stereo][random_dequant_index[n][k]];
                            }
                        } else {
                            for (k = 0; k < 5; k++)
                                samples[k] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        }
                        run = 5;
                        break;
                    case 24:
                        if (get_bits_left(gb) >= 7) {
                            n = get_bits(gb, 7);
                            for (k = 0; k < 3; k++)
                                samples[k] = (random_dequant_type24[n][k] - 2.0) * 0.5;
                        } else {
                            for (k = 0; k < 3; k++)
                                samples[k] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        }
                        run = 3;
                        break;
                    case 30:
                        if (get_bits_left(gb) >= 4) {
                            unsigned index = qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1);
                            if (index < FF_ARRAY_ELEMS(type30_dequant)) {
                                samples[0] = type30_dequant[index];
                            } else
                                samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        } else
                            samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        run = 1;
                        break;
                    case 34:
                        if (get_bits_left(gb) >= 7) {
                            if (type34_first) {
                                type34_div = (float)(1 << get_bits(gb, 2));
                                samples[0] = ((float)get_bits(gb, 5) - 16.0) / 15.0;
                                type34_predictor = samples[0];
                                type34_first = 0;
                            } else {
                                unsigned index = qdm2_get_vlc(gb, &vlc_tab_type34, 0, 1);
                                if (index < FF_ARRAY_ELEMS(type34_delta)) {
                                    samples[0] = type34_delta[index] / type34_div + type34_predictor;
                                    type34_predictor = samples[0];
                                } else
                                    samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
                            }
                        } else {
                            samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        }
                        run = 1;
                        break;
                    default:
                        samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);
                        run = 1;
                        break;
                }
                if (joined_stereo) {
                    for (k = 0; k < run && j + k < 128; k++) {
                        q->sb_samples[0][j + k][sb] =
                            q->tone_level[0][sb][(j + k) / 2] * samples[k];
                        if (q->nb_channels == 2) {
                            if (sign_bits[(j + k) / 8])
                                q->sb_samples[1][j + k][sb] =
                                    q->tone_level[1][sb][(j + k) / 2] * -samples[k];
                            else
                                q->sb_samples[1][j + k][sb] =
                                    q->tone_level[1][sb][(j + k) / 2] * samples[k];
                        }
                    }
                } else {
                    for (k = 0; k < run; k++)
                        if ((j + k) < 128)
                            q->sb_samples[ch][j + k][sb] = q->tone_level[ch][sb][(j + k)/2] * samples[k];
                }
                j += run;
            }
        }
    }
}
['static void synthfilt_build_sb_samples(QDM2Context *q, GetBitContext *gb,\n                                       int length, int sb_min, int sb_max)\n{\n    int sb, j, k, n, ch, run, channels;\n    int joined_stereo, zero_encoding;\n    int type34_first;\n    float type34_div = 0;\n    float type34_predictor;\n    float samples[10], sign_bits[16];\n    if (length == 0) {\n        for (sb=sb_min; sb < sb_max; sb++)\n            build_sb_samples_from_noise (q, sb);\n        return;\n    }\n    for (sb = sb_min; sb < sb_max; sb++) {\n        channels = q->nb_channels;\n        if (q->nb_channels <= 1 || sb < 12)\n            joined_stereo = 0;\n        else if (sb >= 24)\n            joined_stereo = 1;\n        else\n            joined_stereo = (get_bits_left(gb) >= 1) ? get_bits1 (gb) : 0;\n        if (joined_stereo) {\n            if (get_bits_left(gb) >= 16)\n                for (j = 0; j < 16; j++)\n                    sign_bits[j] = get_bits1 (gb);\n            for (j = 0; j < 64; j++)\n                if (q->coding_method[1][sb][j] > q->coding_method[0][sb][j])\n                    q->coding_method[0][sb][j] = q->coding_method[1][sb][j];\n            if (fix_coding_method_array(sb, q->nb_channels,\n                                            q->coding_method)) {\n                build_sb_samples_from_noise(q, sb);\n                continue;\n            }\n            channels = 1;\n        }\n        for (ch = 0; ch < channels; ch++) {\n            FIX_NOISE_IDX(q->noise_idx);\n            zero_encoding = (get_bits_left(gb) >= 1) ? get_bits1(gb) : 0;\n            type34_predictor = 0.0;\n            type34_first = 1;\n            for (j = 0; j < 128; ) {\n                switch (q->coding_method[ch][sb][j / 2]) {\n                    case 8:\n                        if (get_bits_left(gb) >= 10) {\n                            if (zero_encoding) {\n                                for (k = 0; k < 5; k++) {\n                                    if ((j + 2 * k) >= 128)\n                                        break;\n                                    samples[2 * k] = get_bits1(gb) ? dequant_1bit[joined_stereo][2 * get_bits1(gb)] : 0;\n                                }\n                            } else {\n                                n = get_bits(gb, 8);\n                                for (k = 0; k < 5; k++)\n                                    samples[2 * k] = dequant_1bit[joined_stereo][random_dequant_index[n][k]];\n                            }\n                            for (k = 0; k < 5; k++)\n                                samples[2 * k + 1] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        } else {\n                            for (k = 0; k < 10; k++)\n                                samples[k] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        }\n                        run = 10;\n                        break;\n                    case 10:\n                        if (get_bits_left(gb) >= 1) {\n                            float f = 0.81;\n                            if (get_bits1(gb))\n                                f = -f;\n                            f -= noise_samples[((sb + 1) * (j +5 * ch + 1)) & 127] * 9.0 / 40.0;\n                            samples[0] = f;\n                        } else {\n                            samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        }\n                        run = 1;\n                        break;\n                    case 16:\n                        if (get_bits_left(gb) >= 10) {\n                            if (zero_encoding) {\n                                for (k = 0; k < 5; k++) {\n                                    if ((j + k) >= 128)\n                                        break;\n                                    samples[k] = (get_bits1(gb) == 0) ? 0 : dequant_1bit[joined_stereo][2 * get_bits1(gb)];\n                                }\n                            } else {\n                                n = get_bits (gb, 8);\n                                for (k = 0; k < 5; k++)\n                                    samples[k] = dequant_1bit[joined_stereo][random_dequant_index[n][k]];\n                            }\n                        } else {\n                            for (k = 0; k < 5; k++)\n                                samples[k] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        }\n                        run = 5;\n                        break;\n                    case 24:\n                        if (get_bits_left(gb) >= 7) {\n                            n = get_bits(gb, 7);\n                            for (k = 0; k < 3; k++)\n                                samples[k] = (random_dequant_type24[n][k] - 2.0) * 0.5;\n                        } else {\n                            for (k = 0; k < 3; k++)\n                                samples[k] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        }\n                        run = 3;\n                        break;\n                    case 30:\n                        if (get_bits_left(gb) >= 4) {\n                            unsigned index = qdm2_get_vlc(gb, &vlc_tab_type30, 0, 1);\n                            if (index < FF_ARRAY_ELEMS(type30_dequant)) {\n                                samples[0] = type30_dequant[index];\n                            } else\n                                samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        } else\n                            samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        run = 1;\n                        break;\n                    case 34:\n                        if (get_bits_left(gb) >= 7) {\n                            if (type34_first) {\n                                type34_div = (float)(1 << get_bits(gb, 2));\n                                samples[0] = ((float)get_bits(gb, 5) - 16.0) / 15.0;\n                                type34_predictor = samples[0];\n                                type34_first = 0;\n                            } else {\n                                unsigned index = qdm2_get_vlc(gb, &vlc_tab_type34, 0, 1);\n                                if (index < FF_ARRAY_ELEMS(type34_delta)) {\n                                    samples[0] = type34_delta[index] / type34_div + type34_predictor;\n                                    type34_predictor = samples[0];\n                                } else\n                                    samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                            }\n                        } else {\n                            samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        }\n                        run = 1;\n                        break;\n                    default:\n                        samples[0] = SB_DITHERING_NOISE(sb,q->noise_idx);\n                        run = 1;\n                        break;\n                }\n                if (joined_stereo) {\n                    for (k = 0; k < run && j + k < 128; k++) {\n                        q->sb_samples[0][j + k][sb] =\n                            q->tone_level[0][sb][(j + k) / 2] * samples[k];\n                        if (q->nb_channels == 2) {\n                            if (sign_bits[(j + k) / 8])\n                                q->sb_samples[1][j + k][sb] =\n                                    q->tone_level[1][sb][(j + k) / 2] * -samples[k];\n                            else\n                                q->sb_samples[1][j + k][sb] =\n                                    q->tone_level[1][sb][(j + k) / 2] * samples[k];\n                        }\n                    }\n                } else {\n                    for (k = 0; k < run; k++)\n                        if ((j + k) < 128)\n                            q->sb_samples[ch][j + k][sb] = q->tone_level[ch][sb][(j + k)/2] * samples[k];\n                }\n                j += run;\n            }\n        }\n    }\n}']