summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-03-04 12:02:27 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-03-16 23:01:00 +0100
commit75af13a0e4c54ee780249e16c8e14983614e2f25 (patch)
treef22e9cc8efac6c09d4528407b2c6e070041e97fd /libavcodec
parent3b1c9eb0ffb680174ffaebb47b773a4628a2be6a (diff)
mpegvideo: directly use frames in ff_draw_horiz_band()
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c17
-rw-r--r--libavcodec/mpegvideo.h2
-rw-r--r--libavcodec/svq3.c4
3 files changed, 12 insertions, 11 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 73778f51b4..59c64b8e95 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2313,8 +2313,9 @@ void ff_MPV_decode_mb(MpegEncContext *s, int16_t block[12][64]){
/**
* @param h is the normal height, this will be reduced automatically if needed for the last row
*/
-void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
- Picture *last, int y, int h, int picture_structure,
+void ff_draw_horiz_band(AVCodecContext *avctx,
+ AVFrame *cur, AVFrame *last,
+ int y, int h, int picture_structure,
int first_field, int low_delay)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
@@ -2334,15 +2335,15 @@ void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
int offset[AV_NUM_DATA_POINTERS];
int i;
- if(cur->f.pict_type == AV_PICTURE_TYPE_B || low_delay ||
+ if (cur->pict_type == AV_PICTURE_TYPE_B || low_delay ||
(avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
- src = &cur->f;
+ src = cur;
else if (last)
- src = &last->f;
+ src = last;
else
return;
- if (cur->f.pict_type == AV_PICTURE_TYPE_B &&
+ if (cur->pict_type == AV_PICTURE_TYPE_B &&
picture_structure == PICT_FRAME &&
avctx->codec_id != AV_CODEC_ID_SVQ3) {
for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
@@ -2364,8 +2365,8 @@ void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
{
- ff_draw_horiz_band(s->avctx, &s->current_picture,
- &s->last_picture, y, h, s->picture_structure,
+ ff_draw_horiz_band(s->avctx, &s->current_picture.f,
+ &s->last_picture.f, y, h, s->picture_structure,
s->first_field, s->low_delay);
}
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index f88870052f..6b924f560a 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -784,7 +784,7 @@ void ff_MPV_common_init_x86(MpegEncContext *s);
void ff_MPV_common_init_arm(MpegEncContext *s);
void ff_MPV_common_init_ppc(MpegEncContext *s);
void ff_clean_intra_table_entries(MpegEncContext *s);
-void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur, Picture *last,
+void ff_draw_horiz_band(AVCodecContext *avctx, AVFrame *cur, AVFrame *last,
int y, int h, int picture_structure, int first_field,
int low_delay);
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h);
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index fac95eed53..12752886eb 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1267,8 +1267,8 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
(h->pict_type == AV_PICTURE_TYPE_P && mb_type < 8) ? (mb_type - 1) : -1;
}
- ff_draw_horiz_band(avctx, s->cur_pic,
- s->last_pic->f.data[0] ? s->last_pic : NULL,
+ ff_draw_horiz_band(avctx, &s->cur_pic->f,
+ s->last_pic->f.data[0] ? &s->last_pic->f : NULL,
16 * h->mb_y, 16, h->picture_structure, 0,
h->low_delay);
}