diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-09 16:36:47 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-09 17:18:46 +0400 |
commit | 59a53842d360ddaf883a0415b11013038fa57da0 (patch) | |
tree | bec280eb85d158ae75e54268cef1ebdd47be563c /libavcodec/mpeg12dec.c | |
parent | 60ef0c6f909703ae4dc021f6857d254c7badc1ec (diff) | |
parent | f6774f905fb3cfdc319523ac640be30b14c1bc55 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
mpegvideo: operate with pointers to AVFrames instead of whole structs
Conflicts:
libavcodec/h261dec.c
libavcodec/h263dec.c
libavcodec/intrax8.c
libavcodec/mpeg12enc.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/mpegvideo_xvmc.c
libavcodec/msmpeg4.c
libavcodec/ratecontrol.c
libavcodec/vaapi.c
libavcodec/vc1dec.c
libavcodec/vdpau_vc1.c
See: fc567ac49e17151f00f31b59030cd10f952612ef
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r-- | libavcodec/mpeg12dec.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index b99af17126..4d1585d957 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1403,8 +1403,8 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf, s->mpeg_f_code[1][0] = f_code; s->mpeg_f_code[1][1] = f_code; } - s->current_picture.f.pict_type = s->pict_type; - s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f->pict_type = s->pict_type; + s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, @@ -1566,8 +1566,8 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1) s->pict_type = AV_PICTURE_TYPE_P; } else s->pict_type = AV_PICTURE_TYPE_B; - s->current_picture.f.pict_type = s->pict_type; - s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f->pict_type = s->pict_type; + s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; } s->mpeg_f_code[0][0] += !s->mpeg_f_code[0][0]; s->mpeg_f_code[0][1] += !s->mpeg_f_code[0][1]; @@ -1621,19 +1621,19 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) ff_mpeg_er_frame_start(s); /* first check if we must repeat the frame */ - s->current_picture_ptr->f.repeat_pict = 0; + s->current_picture_ptr->f->repeat_pict = 0; if (s->repeat_first_field) { if (s->progressive_sequence) { if (s->top_field_first) - s->current_picture_ptr->f.repeat_pict = 4; + s->current_picture_ptr->f->repeat_pict = 4; else - s->current_picture_ptr->f.repeat_pict = 2; + s->current_picture_ptr->f->repeat_pict = 2; } else if (s->progressive_frame) { - s->current_picture_ptr->f.repeat_pict = 1; + s->current_picture_ptr->f->repeat_pict = 1; } } - pan_scan = av_frame_new_side_data(&s->current_picture_ptr->f, + pan_scan = av_frame_new_side_data(s->current_picture_ptr->f, AV_FRAME_DATA_PANSCAN, sizeof(s1->pan_scan)); if (!pan_scan) @@ -1642,7 +1642,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) if (s1->a53_caption) { AVFrameSideData *sd = av_frame_new_side_data( - &s->current_picture_ptr->f, AV_FRAME_DATA_A53_CC, + s->current_picture_ptr->f, AV_FRAME_DATA_A53_CC, s1->a53_caption_size); if (sd) memcpy(sd->data, s1->a53_caption, s1->a53_caption_size); @@ -1650,7 +1650,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) } if (s1->has_stereo3d) { - AVStereo3D *stereo = av_stereo3d_create_side_data(&s->current_picture_ptr->f); + AVStereo3D *stereo = av_stereo3d_create_side_data(s->current_picture_ptr->f); if (!stereo) return AVERROR(ENOMEM); @@ -1675,10 +1675,10 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) } for (i = 0; i < 4; i++) { - s->current_picture.f.data[i] = s->current_picture_ptr->f.data[i]; + s->current_picture.f->data[i] = s->current_picture_ptr->f->data[i]; if (s->picture_structure == PICT_BOTTOM_FIELD) - s->current_picture.f.data[i] += - s->current_picture_ptr->f.linesize[i]; + s->current_picture.f->data[i] += + s->current_picture_ptr->f->linesize[i]; } } @@ -2028,7 +2028,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) ff_MPV_frame_end(s); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { - int ret = av_frame_ref(pict, &s->current_picture_ptr->f); + int ret = av_frame_ref(pict, s->current_picture_ptr->f); if (ret < 0) return ret; ff_print_debug_info(s, s->current_picture_ptr, pict); @@ -2039,7 +2039,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) /* latency of 1 frame for I- and P-frames */ /* XXX: use another variable than picture_number */ if (s->last_picture_ptr != NULL) { - int ret = av_frame_ref(pict, &s->last_picture_ptr->f); + int ret = av_frame_ref(pict, s->last_picture_ptr->f); if (ret < 0) return ret; ff_print_debug_info(s, s->last_picture_ptr, pict); @@ -2682,7 +2682,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data, if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) { /* special case for last picture */ if (s2->low_delay == 0 && s2->next_picture_ptr) { - int ret = av_frame_ref(picture, &s2->next_picture_ptr->f); + int ret = av_frame_ref(picture, s2->next_picture_ptr->f); if (ret < 0) return ret; |