static int get_buffer_sao(HEVCContext *s, AVFrame *frame, const HEVCSPS *sps)

{

    int ret, i;



    frame->width  = s->avctx->width  + 2;

    frame->height = s->avctx->height + 2;

    if ((ret = ff_get_buffer(s->avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)

        return ret;

    for (i = 0; frame->data[i]; i++) {

        int offset = frame->linesize[i] + (1 << sps->pixel_shift);

        frame->data[i] += offset;

    }

    frame->width  = s->avctx->width;

    frame->height = s->avctx->height;



    return 0;

}

static int get_buffer_sao(HEVCContext *s, AVFrame *frame, const HEVCSPS *sps)

{

    int ret, i;



    frame->width  = s->avctx->width  + 2;

    frame->height = s->avctx->height + 2;

    if ((ret = ff_get_buffer(s->avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)

        return ret;

    for (i = 0; frame->data[i]; i++) {

        int offset = frame->linesize[i] + (1 << sps->pixel_shift);

        frame->data[i] += offset;

    }

    frame->width  = s->avctx->width;

    frame->height = s->avctx->height;



    return 0;

}

    frame->width  = s->avctx->width  + 2;     frame->height = s->avctx->height + 2;     frame->width  = s->avctx->width;     frame->height = s->avctx->height;
static int FUNC_0(HEVCContext *VAR_0, AVFrame *VAR_1, const HEVCSPS *VAR_2)

{

    int VAR_3, VAR_4;



    VAR_1->width  = VAR_0->avctx->width  + 2;

    VAR_1->height = VAR_0->avctx->height + 2;

    if ((VAR_3 = ff_get_buffer(VAR_0->avctx, VAR_1, AV_GET_BUFFER_FLAG_REF)) < 0)

        return VAR_3;

    for (VAR_4 = 0; VAR_1->data[VAR_4]; VAR_4++) {

        int offset = VAR_1->linesize[VAR_4] + (1 << VAR_2->pixel_shift);

        VAR_1->data[VAR_4] += offset;

    }

    VAR_1->width  = VAR_0->avctx->width;

    VAR_1->height = VAR_0->avctx->height;



    return 0;

}

static int FUNC_0(HEVCContext *VAR_0, AVFrame *VAR_1, const HEVCSPS *VAR_2)
{ int VAR_3, VAR_4; VAR_1->width  = VAR_0->avctx->width  + 2; VAR_1->height = VAR_0->avctx->height + 2; if ((VAR_3 = ff_get_buffer(VAR_0->avctx, VAR_1, AV_GET_BUFFER_FLAG_REF)) < 0)
return VAR_3; for (VAR_4 = 0; VAR_1->data[VAR_4]; VAR_4++) { int offset = VAR_1->linesize[VAR_4] + (1 << VAR_2->pixel_shift); VAR_1->data[VAR_4] += offset; } VAR_1->width  = VAR_0->avctx->width; VAR_1->height = VAR_0->avctx->height; return 0; }