int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)

{

    struct vaapi_context * const vactx = avctx->hwaccel_context;

    MpegEncContext *s = avctx->priv_data;

    int ret;



    ret = ff_vaapi_commit_slices(vactx);

    if (ret < 0)

        goto finish;



    ret = ff_vaapi_render_picture(vactx,

                                  ff_vaapi_get_surface_id(&s->current_picture_ptr->f));

    if (ret < 0)

        goto finish;



    ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);



finish:

    ff_vaapi_common_end_frame(avctx);

    return ret;

}

int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)

{

    struct vaapi_context * const vactx = avctx->hwaccel_context;

    MpegEncContext *s = avctx->priv_data;

    int ret;



    ret = ff_vaapi_commit_slices(vactx);

    if (ret < 0)

        goto finish;



    ret = ff_vaapi_render_picture(vactx,

                                  ff_vaapi_get_surface_id(&s->current_picture_ptr->f));

    if (ret < 0)

        goto finish;



    ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);



finish:

    ff_vaapi_common_end_frame(avctx);

    return ret;

}

                                  ff_vaapi_get_surface_id(&s->current_picture_ptr->f));
int FUNC_0(AVCodecContext *VAR_0)

{

    struct vaapi_context * const VAR_1 = VAR_0->hwaccel_context;

    MpegEncContext *s = VAR_0->priv_data;

    int VAR_2;



    VAR_2 = ff_vaapi_commit_slices(VAR_1);

    if (VAR_2 < 0)

        goto finish;



    VAR_2 = ff_vaapi_render_picture(VAR_1,

                                  ff_vaapi_get_surface_id(&s->current_picture_ptr->f));

    if (VAR_2 < 0)

        goto finish;



    ff_mpeg_draw_horiz_band(s, 0, s->VAR_0->height);



finish:

    ff_vaapi_common_end_frame(VAR_0);

    return VAR_2;

}

int FUNC_0(AVCodecContext *VAR_0)
{ struct vaapi_context * const VAR_1 = VAR_0->hwaccel_context; MpegEncContext *s = VAR_0->priv_data; int VAR_2; VAR_2 = ff_vaapi_commit_slices(VAR_1); if (VAR_2 < 0)
goto finish; VAR_2 = ff_vaapi_render_picture(VAR_1,
ff_vaapi_get_surface_id(&s->current_picture_ptr->f)); if (VAR_2 < 0)
goto finish; ff_mpeg_draw_horiz_band(s, 0, s->VAR_0->height); finish:
ff_vaapi_common_end_frame(VAR_0); return VAR_2; }