mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
mpegvideo/h264: drop period_since_free
This should not be needed anymore Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4c587b4f30
commit
7b3ca7ae8b
@ -196,7 +196,6 @@ static void unref_picture(H264Context *h, Picture *pic)
|
||||
if (!pic->f.data[0])
|
||||
return;
|
||||
|
||||
pic->period_since_free = 0;
|
||||
ff_thread_release_buffer(h->avctx, &pic->tf);
|
||||
av_buffer_unref(&pic->hwaccel_priv_buf);
|
||||
|
||||
@ -276,7 +275,6 @@ static int ref_picture(H264Context *h, Picture *dst, Picture *src)
|
||||
dst->needs_realloc = src->needs_realloc;
|
||||
dst->reference = src->reference;
|
||||
dst->sync = src->sync;
|
||||
dst->period_since_free = src->period_since_free;
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
@ -395,10 +393,6 @@ fail:
|
||||
|
||||
static inline int pic_is_unused(H264Context *h, Picture *pic)
|
||||
{
|
||||
if ( (h->avctx->active_thread_type & FF_THREAD_FRAME)
|
||||
&& pic->f.qscale_table //check if the frame has anything allocated
|
||||
&& pic->period_since_free < h->avctx->thread_count)
|
||||
return 0;
|
||||
if (pic->f.data[0] == NULL)
|
||||
return 1;
|
||||
if (pic->needs_realloc && !(pic->reference & DELAYED_PIC_REF))
|
||||
@ -1727,7 +1721,6 @@ static int decode_update_thread_context(AVCodecContext *dst,
|
||||
h->low_delay = h1->low_delay;
|
||||
|
||||
for (i = 0; h->DPB && i < MAX_PICTURE_COUNT; i++) {
|
||||
h->DPB[i].period_since_free ++;
|
||||
unref_picture(h, &h->DPB[i]);
|
||||
if (h1->DPB[i].f.data[0] &&
|
||||
(ret = ref_picture(h, &h->DPB[i], &h1->DPB[i])) < 0)
|
||||
|
@ -435,7 +435,6 @@ fail:
|
||||
void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic)
|
||||
{
|
||||
int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean);
|
||||
pic->period_since_free = 0;
|
||||
|
||||
pic->tf.f = &pic->f;
|
||||
/* WM Image / Screen codecs allocate internal buffers with different
|
||||
@ -701,7 +700,6 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
|
||||
if (s1->picture[i].f.data[0] &&
|
||||
(ret = ff_mpeg_ref_picture(s, &s->picture[i], &s1->picture[i])) < 0)
|
||||
return ret;
|
||||
s->picture[i].period_since_free ++;
|
||||
}
|
||||
|
||||
#define UPDATE_PICTURE(pic)\
|
||||
@ -1400,10 +1398,6 @@ void ff_release_unused_pictures(MpegEncContext*s, int remove_current)
|
||||
|
||||
static inline int pic_is_unused(MpegEncContext *s, Picture *pic)
|
||||
{
|
||||
if ( (s->avctx->active_thread_type & FF_THREAD_FRAME)
|
||||
&& pic->f.qscale_table //check if the frame has anything allocated
|
||||
&& pic->period_since_free < s->avctx->thread_count)
|
||||
return 0;
|
||||
if (pic == s->last_picture_ptr)
|
||||
return 0;
|
||||
if (pic->f.data[0] == NULL)
|
||||
|
@ -171,7 +171,6 @@ typedef struct Picture{
|
||||
|
||||
int b_frame_score; /* */
|
||||
int needs_realloc; ///< Picture needs to be reallocated (eg due to a frame size change)
|
||||
int period_since_free; ///< "cycles" since this Picture has been freed
|
||||
|
||||
int reference;
|
||||
int shared;
|
||||
|
Loading…
Reference in New Issue
Block a user