diff options
author | Mans Rullgard <mans@mansr.com> | 2011-12-19 00:41:42 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-12-19 02:14:33 +0400 |
commit | 8400b126acb153329c418433c377d96afd1d1e02 (patch) | |
tree | f793e22dc029484f1105e2c80448195364f22542 /libavcodec/utils.c | |
parent | bc78ceec2be6613c265387017221c7ceda15aa7d (diff) |
avcodec: deprecate AVFrame.age
This was intended as an optimisation for skipped blocks in MPEG2
P-frames and never used elsewhere. Removing this "optimisation"
speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9).
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 68fc525184..9d17ee4edb 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -346,7 +346,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) int w= s->width; int h= s->height; InternalBuffer *buf; - int *picture_number; AVCodecInternal *avci = s->internal; if(pic->data[0]!=NULL) { @@ -367,8 +366,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) } buf = &avci->buffer[avci->buffer_count]; - picture_number = &(avci->buffer[INTERNAL_BUFFER_SIZE]).last_pic_num; //FIXME ugly hack - (*picture_number)++; if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){ if(s->active_thread_type&FF_THREAD_FRAME) { @@ -382,10 +379,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) } } - if(buf->base[0]){ - pic->age= *picture_number - buf->last_pic_num; - buf->last_pic_num= *picture_number; - }else{ + if (!buf->base[0]) { int h_chroma_shift, v_chroma_shift; int size[4] = {0}; int tmpsize; @@ -424,7 +418,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) size[i] = picture.data[i+1] - picture.data[i]; size[i] = tmpsize - (picture.data[i] - picture.data[0]); - buf->last_pic_num= -256*256*256*64; memset(buf->base, 0, sizeof(buf->base)); memset(buf->data, 0, sizeof(buf->data)); @@ -453,7 +446,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) buf->width = s->width; buf->height = s->height; buf->pix_fmt= s->pix_fmt; - pic->age= 256*256*256*64; } pic->type= FF_BUFFER_TYPE_INTERNAL; |