void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic)

{

    int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean);



    pic->tf.f = &pic->f;

    /* WM Image / Screen codecs allocate internal buffers with different

     * dimensions / colorspaces; ignore user-defined callbacks for these. */

    if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&

        s->codec_id != AV_CODEC_ID_VC1IMAGE  &&

        s->codec_id != AV_CODEC_ID_MSS2)

        ff_thread_release_buffer(s->avctx, &pic->tf);

    else

        av_frame_unref(&pic->f);



    av_buffer_unref(&pic->hwaccel_priv_buf);



    if (pic->needs_realloc)

        ff_free_picture_tables(pic);



    memset((uint8_t*)pic + off, 0, sizeof(*pic) - off);

}

void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic)

{

    int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean);



    pic->tf.f = &pic->f;

    



    if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&

        s->codec_id != AV_CODEC_ID_VC1IMAGE  &&

        s->codec_id != AV_CODEC_ID_MSS2)

        ff_thread_release_buffer(s->avctx, &pic->tf);

    else

        av_frame_unref(&pic->f);



    av_buffer_unref(&pic->hwaccel_priv_buf);



    if (pic->needs_realloc)

        ff_free_picture_tables(pic);



    memset((uint8_t*)pic + off, 0, sizeof(*pic) - off);

}

    pic->tf.f = &pic->f;     pic->tf.f = &pic->f;         av_frame_unref(&pic->f);
void FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1)

{

    int VAR_2 = offsetof(Picture, mb_mean) + sizeof(VAR_1->mb_mean);



    VAR_1->tf.f = &VAR_1->f;

    



    if (VAR_0->codec_id != AV_CODEC_ID_WMV3IMAGE &&

        VAR_0->codec_id != AV_CODEC_ID_VC1IMAGE  &&

        VAR_0->codec_id != AV_CODEC_ID_MSS2)

        ff_thread_release_buffer(VAR_0->avctx, &VAR_1->tf);

    else

        av_frame_unref(&VAR_1->f);



    av_buffer_unref(&VAR_1->hwaccel_priv_buf);



    if (VAR_1->needs_realloc)

        ff_free_picture_tables(VAR_1);



    memset((uint8_t*)VAR_1 + VAR_2, 0, sizeof(*VAR_1) - VAR_2);

}

void FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1)
{ int VAR_2 = offsetof(Picture, mb_mean) + sizeof(VAR_1->mb_mean); VAR_1->tf.f = &VAR_1->f; if (VAR_0->codec_id != AV_CODEC_ID_WMV3IMAGE &&
VAR_0->codec_id != AV_CODEC_ID_VC1IMAGE  &&
VAR_0->codec_id != AV_CODEC_ID_MSS2)
ff_thread_release_buffer(VAR_0->avctx, &VAR_1->tf); else
av_frame_unref(&VAR_1->f); av_buffer_unref(&VAR_1->hwaccel_priv_buf); if (VAR_1->needs_realloc)
ff_free_picture_tables(VAR_1); memset((uint8_t*)VAR_1 + VAR_2, 0, sizeof(*VAR_1) - VAR_2); }