libavcodec/hevc_filter.c:442: error: Uninitialized Value
  The value read from left_beta_offset was never initialized.

libavcodec/hevc_filter.c:442:31: 
440. 
441.                 tc_offset   = x >= x0 ? cur_tc_offset : left_tc_offset;
442.                 beta_offset = x >= x0 ? cur_beta_offset : left_beta_offset;
                                   ^
443. 
444.                 beta = betatable[av_clip(qp + beta_offset, 0, MAX_QP)];

static void deblocking_filter_CTB(HEVCContext *s, int x0, int y0)
{
    uint8_t *src;
    int x, y, x_end, y_end, chroma;
    int c_tc[2], tc[2], beta;
    uint8_t no_p[2] = { 0 };
    uint8_t no_q[2] = { 0 };
    int log2_ctb_size = s->sps->log2_ctb_size;
    int ctb_size        = 1 << log2_ctb_size;
    int ctb             = (x0 >> log2_ctb_size) +
                          (y0 >> log2_ctb_size) * s->sps->ctb_width;
    int cur_tc_offset   = s->deblock[ctb].tc_offset;
    int cur_beta_offset = s->deblock[ctb].beta_offset;
    int tc_offset, left_tc_offset, beta_offset, left_beta_offset;
    int pcmf = (s->sps->pcm_enabled_flag &&
                s->sps->pcm.loop_filter_disable_flag) ||
               s->pps->transquant_bypass_enable_flag;
    if (x0) {
        left_tc_offset   = s->deblock[ctb - 1].tc_offset;
        left_beta_offset = s->deblock[ctb - 1].beta_offset;
    }
    x_end = x0 + ctb_size;
    if (x_end > s->sps->width)
        x_end = s->sps->width;
    y_end = y0 + ctb_size;
    if (y_end > s->sps->height)
        y_end = s->sps->height;
    tc_offset   = cur_tc_offset;
    beta_offset = cur_beta_offset;
    for (y = y0; y < y_end; y += 8) {
        for (x = x0 ? x0 : 8; x < x_end; x += 8) {
            const int bs0 = s->vertical_bs[(x >> 3) + (y       >> 2) * s->bs_width];
            const int bs1 = s->vertical_bs[(x >> 3) + ((y + 4) >> 2) * s->bs_width];
            if (bs0 || bs1) {
                const int qp = (get_qPy(s, x - 1, y)     + get_qPy(s, x, y)     + 1) >> 1;
                beta = betatable[av_clip(qp + beta_offset, 0, MAX_QP)];
                tc[0]   = bs0 ? TC_CALC(qp, bs0) : 0;
                tc[1]   = bs1 ? TC_CALC(qp, bs1) : 0;
                src     = &s->frame->data[LUMA][y * s->frame->linesize[LUMA] + (x << s->sps->pixel_shift)];
                if (pcmf) {
                    no_p[0] = get_pcm(s, x - 1, y);
                    no_p[1] = get_pcm(s, x - 1, y + 4);
                    no_q[0] = get_pcm(s, x, y);
                    no_q[1] = get_pcm(s, x, y + 4);
                    s->hevcdsp.hevc_v_loop_filter_luma_c(src,
                                                         s->frame->linesize[LUMA],
                                                         beta, tc, no_p, no_q);
                } else
                    s->hevcdsp.hevc_v_loop_filter_luma(src,
                                                       s->frame->linesize[LUMA],
                                                       beta, tc, no_p, no_q);
            }
        }
    }
    for (chroma = 1; chroma <= 2; chroma++) {
        for (y = y0; y < y_end; y += 16) {
            for (x = x0 ? x0 : 16; x < x_end; x += 16) {
                const int bs0 = s->vertical_bs[(x >> 3) + (y       >> 2) * s->bs_width];
                const int bs1 = s->vertical_bs[(x >> 3) + ((y + 8) >> 2) * s->bs_width];
                if ((bs0 == 2) || (bs1 == 2)) {
                    const int qp0 = (get_qPy(s, x - 1, y)     + get_qPy(s, x, y)     + 1) >> 1;
                    const int qp1 = (get_qPy(s, x - 1, y + 8) + get_qPy(s, x, y + 8) + 1) >> 1;
                    c_tc[0] = (bs0 == 2) ? chroma_tc(s, qp0, chroma, tc_offset) : 0;
                    c_tc[1] = (bs1 == 2) ? chroma_tc(s, qp1, chroma, tc_offset) : 0;
                    src     = &s->frame->data[chroma][y / 2 * s->frame->linesize[chroma] + ((x / 2) << s->sps->pixel_shift)];
                    if (pcmf) {
                        no_p[0] = get_pcm(s, x - 1, y);
                        no_p[1] = get_pcm(s, x - 1, y + 8);
                        no_q[0] = get_pcm(s, x, y);
                        no_q[1] = get_pcm(s, x, y + 8);
                        s->hevcdsp.hevc_v_loop_filter_chroma_c(src,
                                                               s->frame->linesize[chroma],
                                                               c_tc, no_p, no_q);
                    } else
                        s->hevcdsp.hevc_v_loop_filter_chroma(src,
                                                             s->frame->linesize[chroma],
                                                             c_tc, no_p, no_q);
                }
            }
        }
    }
    if (x_end != s->sps->width)
        x_end -= 8;
    for (y = y0 ? y0 : 8; y < y_end; y += 8) {
        for (x = x0 ? x0 - 8 : 0; x < x_end; x += 8) {
            const int bs0 = s->horizontal_bs[(x +     y * s->bs_width) >> 2];
            const int bs1 = s->horizontal_bs[(x + 4 + y * s->bs_width) >> 2];
            if (bs0 || bs1) {
                const int qp = (get_qPy(s, x, y - 1)     + get_qPy(s, x, y)     + 1) >> 1;
                tc_offset   = x >= x0 ? cur_tc_offset : left_tc_offset;
                beta_offset = x >= x0 ? cur_beta_offset : left_beta_offset;
                beta = betatable[av_clip(qp + beta_offset, 0, MAX_QP)];
                tc[0]   = bs0 ? TC_CALC(qp, bs0) : 0;
                tc[1]   = bs1 ? TC_CALC(qp, bs1) : 0;
                src     = &s->frame->data[LUMA][y * s->frame->linesize[LUMA] + (x << s->sps->pixel_shift)];
                if (pcmf) {
                    no_p[0] = get_pcm(s, x, y - 1);
                    no_p[1] = get_pcm(s, x + 4, y - 1);
                    no_q[0] = get_pcm(s, x, y);
                    no_q[1] = get_pcm(s, x + 4, y);
                    s->hevcdsp.hevc_h_loop_filter_luma_c(src,
                                                         s->frame->linesize[LUMA],
                                                         beta, tc, no_p, no_q);
                } else
                    s->hevcdsp.hevc_h_loop_filter_luma(src,
                                                       s->frame->linesize[LUMA],
                                                       beta, tc, no_p, no_q);
            }
        }
    }
    for (chroma = 1; chroma <= 2; chroma++) {
        for (y = y0 ? y0 : 16; y < y_end; y += 16) {
            for (x = x0 - 8; x < x_end; x += 16) {
                int bs0, bs1;
                if (x < 0) {
                    bs0 = 0;
                    bs1 = s->horizontal_bs[(x + 8 + y * s->bs_width) >> 2];
                } else if (x >= x_end - 8) {
                    bs0 = s->horizontal_bs[(x +     y * s->bs_width) >> 2];
                    bs1 = 0;
                } else {
                    bs0 = s->horizontal_bs[(x + y     * s->bs_width) >> 2];
                    bs1 = s->horizontal_bs[(x + 8 + y * s->bs_width) >> 2];
                }
                if ((bs0 == 2) || (bs1 == 2)) {
                    const int qp0 = bs0 == 2 ? (get_qPy(s, x,     y - 1) + get_qPy(s, x,     y) + 1) >> 1 : 0;
                    const int qp1 = bs1 == 2 ? (get_qPy(s, x + 8, y - 1) + get_qPy(s, x + 8, y) + 1) >> 1 : 0;
                    tc_offset = x >= x0 ? cur_tc_offset : left_tc_offset;
                    c_tc[0]   = bs0 == 2 ? chroma_tc(s, qp0, chroma, tc_offset)     : 0;
                    c_tc[1]   = bs1 == 2 ? chroma_tc(s, qp1, chroma, cur_tc_offset) : 0;
                    src       = &s->frame->data[chroma][y / 2 * s->frame->linesize[chroma] + ((x / 2) << s->sps->pixel_shift)];
                    if (pcmf) {
                        no_p[0] = get_pcm(s, x, y - 1);
                        no_p[1] = get_pcm(s, x + 8, y - 1);
                        no_q[0] = get_pcm(s, x, y);
                        no_q[1] = get_pcm(s, x + 8, y);
                        s->hevcdsp.hevc_h_loop_filter_chroma_c(src,
                                                               s->frame->linesize[chroma],
                                                               c_tc, no_p, no_q);
                    } else
                        s->hevcdsp.hevc_h_loop_filter_chroma(src,
                                                             s->frame->linesize[chroma],
                                                             c_tc, no_p, no_q);
                }
            }
        }
    }
}
['static void deblocking_filter_CTB(HEVCContext *s, int x0, int y0)\n{\n    uint8_t *src;\n    int x, y, x_end, y_end, chroma;\n    int c_tc[2], tc[2], beta;\n    uint8_t no_p[2] = { 0 };\n    uint8_t no_q[2] = { 0 };\n    int log2_ctb_size = s->sps->log2_ctb_size;\n    int ctb_size        = 1 << log2_ctb_size;\n    int ctb             = (x0 >> log2_ctb_size) +\n                          (y0 >> log2_ctb_size) * s->sps->ctb_width;\n    int cur_tc_offset   = s->deblock[ctb].tc_offset;\n    int cur_beta_offset = s->deblock[ctb].beta_offset;\n    int tc_offset, left_tc_offset, beta_offset, left_beta_offset;\n    int pcmf = (s->sps->pcm_enabled_flag &&\n                s->sps->pcm.loop_filter_disable_flag) ||\n               s->pps->transquant_bypass_enable_flag;\n    if (x0) {\n        left_tc_offset   = s->deblock[ctb - 1].tc_offset;\n        left_beta_offset = s->deblock[ctb - 1].beta_offset;\n    }\n    x_end = x0 + ctb_size;\n    if (x_end > s->sps->width)\n        x_end = s->sps->width;\n    y_end = y0 + ctb_size;\n    if (y_end > s->sps->height)\n        y_end = s->sps->height;\n    tc_offset   = cur_tc_offset;\n    beta_offset = cur_beta_offset;\n    for (y = y0; y < y_end; y += 8) {\n        for (x = x0 ? x0 : 8; x < x_end; x += 8) {\n            const int bs0 = s->vertical_bs[(x >> 3) + (y       >> 2) * s->bs_width];\n            const int bs1 = s->vertical_bs[(x >> 3) + ((y + 4) >> 2) * s->bs_width];\n            if (bs0 || bs1) {\n                const int qp = (get_qPy(s, x - 1, y)     + get_qPy(s, x, y)     + 1) >> 1;\n                beta = betatable[av_clip(qp + beta_offset, 0, MAX_QP)];\n                tc[0]   = bs0 ? TC_CALC(qp, bs0) : 0;\n                tc[1]   = bs1 ? TC_CALC(qp, bs1) : 0;\n                src     = &s->frame->data[LUMA][y * s->frame->linesize[LUMA] + (x << s->sps->pixel_shift)];\n                if (pcmf) {\n                    no_p[0] = get_pcm(s, x - 1, y);\n                    no_p[1] = get_pcm(s, x - 1, y + 4);\n                    no_q[0] = get_pcm(s, x, y);\n                    no_q[1] = get_pcm(s, x, y + 4);\n                    s->hevcdsp.hevc_v_loop_filter_luma_c(src,\n                                                         s->frame->linesize[LUMA],\n                                                         beta, tc, no_p, no_q);\n                } else\n                    s->hevcdsp.hevc_v_loop_filter_luma(src,\n                                                       s->frame->linesize[LUMA],\n                                                       beta, tc, no_p, no_q);\n            }\n        }\n    }\n    for (chroma = 1; chroma <= 2; chroma++) {\n        for (y = y0; y < y_end; y += 16) {\n            for (x = x0 ? x0 : 16; x < x_end; x += 16) {\n                const int bs0 = s->vertical_bs[(x >> 3) + (y       >> 2) * s->bs_width];\n                const int bs1 = s->vertical_bs[(x >> 3) + ((y + 8) >> 2) * s->bs_width];\n                if ((bs0 == 2) || (bs1 == 2)) {\n                    const int qp0 = (get_qPy(s, x - 1, y)     + get_qPy(s, x, y)     + 1) >> 1;\n                    const int qp1 = (get_qPy(s, x - 1, y + 8) + get_qPy(s, x, y + 8) + 1) >> 1;\n                    c_tc[0] = (bs0 == 2) ? chroma_tc(s, qp0, chroma, tc_offset) : 0;\n                    c_tc[1] = (bs1 == 2) ? chroma_tc(s, qp1, chroma, tc_offset) : 0;\n                    src     = &s->frame->data[chroma][y / 2 * s->frame->linesize[chroma] + ((x / 2) << s->sps->pixel_shift)];\n                    if (pcmf) {\n                        no_p[0] = get_pcm(s, x - 1, y);\n                        no_p[1] = get_pcm(s, x - 1, y + 8);\n                        no_q[0] = get_pcm(s, x, y);\n                        no_q[1] = get_pcm(s, x, y + 8);\n                        s->hevcdsp.hevc_v_loop_filter_chroma_c(src,\n                                                               s->frame->linesize[chroma],\n                                                               c_tc, no_p, no_q);\n                    } else\n                        s->hevcdsp.hevc_v_loop_filter_chroma(src,\n                                                             s->frame->linesize[chroma],\n                                                             c_tc, no_p, no_q);\n                }\n            }\n        }\n    }\n    if (x_end != s->sps->width)\n        x_end -= 8;\n    for (y = y0 ? y0 : 8; y < y_end; y += 8) {\n        for (x = x0 ? x0 - 8 : 0; x < x_end; x += 8) {\n            const int bs0 = s->horizontal_bs[(x +     y * s->bs_width) >> 2];\n            const int bs1 = s->horizontal_bs[(x + 4 + y * s->bs_width) >> 2];\n            if (bs0 || bs1) {\n                const int qp = (get_qPy(s, x, y - 1)     + get_qPy(s, x, y)     + 1) >> 1;\n                tc_offset   = x >= x0 ? cur_tc_offset : left_tc_offset;\n                beta_offset = x >= x0 ? cur_beta_offset : left_beta_offset;\n                beta = betatable[av_clip(qp + beta_offset, 0, MAX_QP)];\n                tc[0]   = bs0 ? TC_CALC(qp, bs0) : 0;\n                tc[1]   = bs1 ? TC_CALC(qp, bs1) : 0;\n                src     = &s->frame->data[LUMA][y * s->frame->linesize[LUMA] + (x << s->sps->pixel_shift)];\n                if (pcmf) {\n                    no_p[0] = get_pcm(s, x, y - 1);\n                    no_p[1] = get_pcm(s, x + 4, y - 1);\n                    no_q[0] = get_pcm(s, x, y);\n                    no_q[1] = get_pcm(s, x + 4, y);\n                    s->hevcdsp.hevc_h_loop_filter_luma_c(src,\n                                                         s->frame->linesize[LUMA],\n                                                         beta, tc, no_p, no_q);\n                } else\n                    s->hevcdsp.hevc_h_loop_filter_luma(src,\n                                                       s->frame->linesize[LUMA],\n                                                       beta, tc, no_p, no_q);\n            }\n        }\n    }\n    for (chroma = 1; chroma <= 2; chroma++) {\n        for (y = y0 ? y0 : 16; y < y_end; y += 16) {\n            for (x = x0 - 8; x < x_end; x += 16) {\n                int bs0, bs1;\n                if (x < 0) {\n                    bs0 = 0;\n                    bs1 = s->horizontal_bs[(x + 8 + y * s->bs_width) >> 2];\n                } else if (x >= x_end - 8) {\n                    bs0 = s->horizontal_bs[(x +     y * s->bs_width) >> 2];\n                    bs1 = 0;\n                } else {\n                    bs0 = s->horizontal_bs[(x + y     * s->bs_width) >> 2];\n                    bs1 = s->horizontal_bs[(x + 8 + y * s->bs_width) >> 2];\n                }\n                if ((bs0 == 2) || (bs1 == 2)) {\n                    const int qp0 = bs0 == 2 ? (get_qPy(s, x,     y - 1) + get_qPy(s, x,     y) + 1) >> 1 : 0;\n                    const int qp1 = bs1 == 2 ? (get_qPy(s, x + 8, y - 1) + get_qPy(s, x + 8, y) + 1) >> 1 : 0;\n                    tc_offset = x >= x0 ? cur_tc_offset : left_tc_offset;\n                    c_tc[0]   = bs0 == 2 ? chroma_tc(s, qp0, chroma, tc_offset)     : 0;\n                    c_tc[1]   = bs1 == 2 ? chroma_tc(s, qp1, chroma, cur_tc_offset) : 0;\n                    src       = &s->frame->data[chroma][y / 2 * s->frame->linesize[chroma] + ((x / 2) << s->sps->pixel_shift)];\n                    if (pcmf) {\n                        no_p[0] = get_pcm(s, x, y - 1);\n                        no_p[1] = get_pcm(s, x + 8, y - 1);\n                        no_q[0] = get_pcm(s, x, y);\n                        no_q[1] = get_pcm(s, x + 8, y);\n                        s->hevcdsp.hevc_h_loop_filter_chroma_c(src,\n                                                               s->frame->linesize[chroma],\n                                                               c_tc, no_p, no_q);\n                    } else\n                        s->hevcdsp.hevc_h_loop_filter_chroma(src,\n                                                             s->frame->linesize[chroma],\n                                                             c_tc, no_p, no_q);\n                }\n            }\n        }\n    }\n}']