static int dxva2_mpeg2_start_frame(AVCodecContext *avctx,

                                   av_unused const uint8_t *buffer,

                                   av_unused uint32_t size)

{

    const struct MpegEncContext *s = avctx->priv_data;

    AVDXVAContext *ctx = avctx->hwaccel_context;

    struct dxva2_picture_context *ctx_pic =

        s->current_picture_ptr->hwaccel_picture_private;



    if (!DXVA_CONTEXT_VALID(avctx, ctx))

        return -1;

    assert(ctx_pic);



    fill_picture_parameters(avctx, ctx, s, &ctx_pic->pp);

    fill_quantization_matrices(avctx, ctx, s, &ctx_pic->qm);



    ctx_pic->slice_count    = 0;

    ctx_pic->bitstream_size = 0;

    ctx_pic->bitstream      = NULL;

    return 0;

}

static int dxva2_mpeg2_start_frame(AVCodecContext *avctx,

                                   av_unused const uint8_t *buffer,

                                   av_unused uint32_t size)

{

    const struct MpegEncContext *s = avctx->priv_data;

    AVDXVAContext *ctx = avctx->hwaccel_context;

    struct dxva2_picture_context *ctx_pic =

        s->current_picture_ptr->hwaccel_picture_private;



    if (!DXVA_CONTEXT_VALID(avctx, ctx))

        return -1;

    assert(ctx_pic);



    fill_picture_parameters(avctx, ctx, s, &ctx_pic->pp);

    fill_quantization_matrices(avctx, ctx, s, &ctx_pic->qm);



    ctx_pic->slice_count    = 0;

    ctx_pic->bitstream_size = 0;

    ctx_pic->bitstream      = NULL;

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0,

                                   av_unused const VAR_1 *buffer,

                                   av_unused uint32_t size)

{

    const struct MpegEncContext *VAR_2 = VAR_0->priv_data;

    AVDXVAContext *ctx = VAR_0->hwaccel_context;

    struct dxva2_picture_context *VAR_3 =

        VAR_2->current_picture_ptr->hwaccel_picture_private;



    if (!DXVA_CONTEXT_VALID(VAR_0, ctx))

        return -1;

    assert(VAR_3);



    fill_picture_parameters(VAR_0, ctx, VAR_2, &VAR_3->pp);

    fill_quantization_matrices(VAR_0, ctx, VAR_2, &VAR_3->qm);



    VAR_3->slice_count    = 0;

    VAR_3->bitstream_size = 0;

    VAR_3->bitstream      = NULL;

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0,
av_unused const VAR_1 *buffer,
av_unused uint32_t size)
{ const struct MpegEncContext *VAR_2 = VAR_0->priv_data; AVDXVAContext *ctx = VAR_0->hwaccel_context; struct dxva2_picture_context *VAR_3 =
VAR_2->current_picture_ptr->hwaccel_picture_private; if (!DXVA_CONTEXT_VALID(VAR_0, ctx))
return -1; assert(VAR_3); fill_picture_parameters(VAR_0, ctx, VAR_2, &VAR_3->pp); fill_quantization_matrices(VAR_0, ctx, VAR_2, &VAR_3->qm); VAR_3->slice_count    = 0; VAR_3->bitstream_size = 0; VAR_3->bitstream      = NULL; return 0; }