History

avcodec/mpegvideo: Shorten variable names

current_picture->cur_pic, last_picture->last_pic, similarly for new_picture and next_picture. Also rename the corresponding *_ptr fields.

Andreas Rheinhardt committed 3 years ago

Commit ec1eba71 parent 3a4e76950 files · +941 −947Browse files

Showing the changes to libavcodec (50 of 50 files). Show all

Unified · Split

50 files
  1. libavcodec/d3d12va_mpeg2.c +5 −5
  2. libavcodec/d3d12va_vc1.c +5 −5
  3. libavcodec/dxva2_mpeg2.c +8 −8
  4. libavcodec/dxva2_vc1.c +8 −8
  5. libavcodec/h261dec.c +13 −13
  6. libavcodec/h263.c +20 −20
  7. libavcodec/h263dec.c +17 −17
  8. libavcodec/ituh263dec.c +15 −15
  9. libavcodec/ituh263enc.c +8 −8
  10. libavcodec/motion_est.c +42 −42
  11. libavcodec/mpeg12dec.c +47 −47
  12. libavcodec/mpeg12enc.c +7 −7
  13. libavcodec/mpeg4video.c +4 −4
  14. libavcodec/mpeg4videodec.c +42 −42
  15. libavcodec/mpeg4videoenc.c +8 −8
  16. libavcodec/mpeg_er.c +6 −6
  17. libavcodec/mpegvideo.c +17 −17
  18. libavcodec/mpegvideo.h +7 −7
  19. libavcodec/mpegvideo_dec.c +63 −65
  20. libavcodec/mpegvideo_enc.c +89 −93
  21. libavcodec/mpegvideo_motion.c +6 −6
  22. libavcodec/mpv_reconstruct_mb_template.c +10 −10
  23. libavcodec/msmpeg4.c +2 −2
  24. libavcodec/msmpeg4dec.c +2 −2
  25. libavcodec/mss2.c +1 −1
  26. libavcodec/nvdec_mpeg12.c +3 −3
  27. libavcodec/nvdec_mpeg4.c +3 −3
  28. libavcodec/nvdec_vc1.c +3 −3
  29. libavcodec/ratecontrol.c +5 −5
  30. libavcodec/rv10.c +14 −14
  31. libavcodec/rv30.c +9 −9
  32. libavcodec/rv34.c +78 −78
  33. libavcodec/rv40.c +5 −5
  34. libavcodec/snowenc.c +9 −9
  35. libavcodec/svq1enc.c +12 −12
  36. libavcodec/vaapi_mpeg2.c +6 −6
  37. libavcodec/vaapi_mpeg4.c +7 −7
  38. libavcodec/vaapi_vc1.c +6 −6
  39. libavcodec/vc1.c +1 −1
  40. libavcodec/vc1_block.c +97 −97
  41. libavcodec/vc1_loopfilter.c +15 −15
  42. libavcodec/vc1_mc.c +56 −56
  43. libavcodec/vc1_pred.c +107 −107
  44. libavcodec/vc1dec.c +29 −29
  45. libavcodec/vdpau.c +1 −1
  46. libavcodec/vdpau_mpeg12.c +4 −4
  47. libavcodec/vdpau_mpeg4.c +3 −3
  48. libavcodec/vdpau_vc1.c +6 −6
  49. libavcodec/videotoolbox.c +1 −1
  50. libavcodec/wmv2dec.c +9 −9
libavcodec/d3d12va_mpeg2.c+5−5
@@ -44,7 +44,7 @@ static int d3d12va_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint · 43 unmodified lines
4444 {
4545 const MpegEncContext *s = avctx->priv_data;
4646 D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
47− D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
47+ D3D12DecodePictureContext *ctx_pic = s->cur_pic_ptr->hwaccel_picture_private;
4848
4949 if (!ctx)
5050 return -1;
@@ -69,7 +69,7 @@ static int d3d12va_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint · 18 unmodified lines
6969 static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
7070 {
7171 const MpegEncContext *s = avctx->priv_data;
72− D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
72+ D3D12DecodePictureContext *ctx_pic = s->cur_pic_ptr->hwaccel_picture_private;
7373
7474 if (ctx_pic->slice_count >= MAX_SLICES) {
7575 return AVERROR(ERANGE);
@@ -88,7 +88,7 @@ static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buff · 12 unmodified lines
8888 static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
8989 {
9090 const MpegEncContext *s = avctx->priv_data;
91− D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
91+ D3D12DecodePictureContext *ctx_pic = s->cur_pic_ptr->hwaccel_picture_private;
9292
9393 const int is_field = s->picture_structure != PICT_FRAME;
9494 const unsigned mb_count = s->mb_width * (s->mb_height >> is_field);
@@ -137,12 +137,12 @@ static int d3d12va_mpeg2_end_frame(AVCodecContext *avctx) · 42 unmodified lines
137137 {
138138 int ret;
139139 MpegEncContext *s = avctx->priv_data;
140− D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
140+ D3D12DecodePictureContext *ctx_pic = s->cur_pic_ptr->hwaccel_picture_private;
141141
142142 if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
143143 return -1;
144144
145− ret = ff_d3d12va_common_end_frame(avctx, s->current_picture_ptr->f, &ctx_pic->pp, sizeof(ctx_pic->pp),
145+ ret = ff_d3d12va_common_end_frame(avctx, s->cur_pic_ptr->f, &ctx_pic->pp, sizeof(ctx_pic->pp),
146146 &ctx_pic->qm, sizeof(ctx_pic->qm), update_input_arguments);
147147 if (!ret)
148148 ff_mpeg_draw_horiz_band(s, 0, avctx->height);
libavcodec/d3d12va_vc1.c+5−5
@@ -45,7 +45,7 @@ static int d3d12va_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 44 unmodified lines
4545 {
4646 const VC1Context *v = avctx->priv_data;
4747 D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
48− D3D12DecodePictureContext *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private;
48+ D3D12DecodePictureContext *ctx_pic = v->s.cur_pic_ptr->hwaccel_picture_private;
4949
5050 if (!ctx)
5151 return -1;
@@ -67,7 +67,7 @@ static int d3d12va_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 15 unmodified lines
6767 static int d3d12va_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
6868 {
6969 const VC1Context *v = avctx->priv_data;
70− D3D12DecodePictureContext *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private;
70+ D3D12DecodePictureContext *ctx_pic = v->s.cur_pic_ptr->hwaccel_picture_private;
7171
7272 if (ctx_pic->slice_count >= MAX_SLICES) {
7373 return AVERROR(ERANGE);
@@ -93,7 +93,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU · 19 unmodified lines
9393 {
9494 const VC1Context *v = avctx->priv_data;
9595 const MpegEncContext *s = &v->s;
96− D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
96+ D3D12DecodePictureContext *ctx_pic = s->cur_pic_ptr->hwaccel_picture_private;
9797 D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args = &input_args->FrameArguments[input_args->NumFrameArguments++];
9898
9999 const unsigned mb_count = s->mb_width * (s->mb_height >> v->field_mode);
@@ -151,12 +151,12 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU · 51 unmodified lines
151151 static int d3d12va_vc1_end_frame(AVCodecContext *avctx)
152152 {
153153 const VC1Context *v = avctx->priv_data;
154− D3D12DecodePictureContext *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private;
154+ D3D12DecodePictureContext *ctx_pic = v->s.cur_pic_ptr->hwaccel_picture_private;
155155
156156 if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
157157 return -1;
158158
159− return ff_d3d12va_common_end_frame(avctx, v->s.current_picture_ptr->f,
159+ return ff_d3d12va_common_end_frame(avctx, v->s.cur_pic_ptr->f,
160160 &ctx_pic->pp, sizeof(ctx_pic->pp),
161161 NULL, 0,
162162 update_input_arguments);
libavcodec/dxva2_mpeg2.c+8−8
@@ -45,17 +45,17 @@ void ff_dxva2_mpeg2_fill_picture_parameters(AVCodecContext *avctx, · 44 unmodified lines
4545 DXVA_PictureParameters *pp)
4646 {
4747 const struct MpegEncContext *s = avctx->priv_data;
48− const Picture *current_picture = s->current_picture_ptr;
48+ const Picture *current_picture = s->cur_pic_ptr;
4949 int is_field = s->picture_structure != PICT_FRAME;
5050
5151 memset(pp, 0, sizeof(*pp));
5252 pp->wDeblockedPictureIndex = 0;
5353 if (s->pict_type != AV_PICTURE_TYPE_I)
54− pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_picture.f, 0);
54+ pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_pic.f, 0);
5555 else
5656 pp->wForwardRefPictureIndex = 0xffff;
5757 if (s->pict_type == AV_PICTURE_TYPE_B)
58− pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f, 0);
58+ pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_pic.f, 0);
5959 else
6060 pp->wBackwardRefPictureIndex = 0xffff;
6161 pp->wDecodedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, current_picture->f, 1);
@@ -157,7 +157,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, · 95 unmodified lines
157157 const struct MpegEncContext *s = avctx->priv_data;
158158 AVDXVAContext *ctx = DXVA_CONTEXT(avctx);
159159 struct dxva2_picture_context *ctx_pic =
160− s->current_picture_ptr->hwaccel_picture_private;
160+ s->cur_pic_ptr->hwaccel_picture_private;
161161 const int is_field = s->picture_structure != PICT_FRAME;
162162 const unsigned mb_count = s->mb_width * (s->mb_height >> is_field);
163163 void *dxva_data_ptr;
@@ -260,7 +260,7 @@ static int dxva2_mpeg2_start_frame(AVCodecContext *avctx, · 96 unmodified lines
260260 const struct MpegEncContext *s = avctx->priv_data;
261261 AVDXVAContext *ctx = DXVA_CONTEXT(avctx);
262262 struct dxva2_picture_context *ctx_pic =
263− s->current_picture_ptr->hwaccel_picture_private;
263+ s->cur_pic_ptr->hwaccel_picture_private;
264264
265265 if (!DXVA_CONTEXT_VALID(avctx, ctx))
266266 return -1;
@@ -280,7 +280,7 @@ static int dxva2_mpeg2_decode_slice(AVCodecContext *avctx, · 13 unmodified lines
280280 {
281281 const struct MpegEncContext *s = avctx->priv_data;
282282 struct dxva2_picture_context *ctx_pic =
283− s->current_picture_ptr->hwaccel_picture_private;
283+ s->cur_pic_ptr->hwaccel_picture_private;
284284 unsigned position;
285285
286286 if (ctx_pic->slice_count >= MAX_SLICES) {
@@ -302,12 +302,12 @@ static int dxva2_mpeg2_end_frame(AVCodecContext *avctx) · 15 unmodified lines
302302 {
303303 struct MpegEncContext *s = avctx->priv_data;
304304 struct dxva2_picture_context *ctx_pic =
305− s->current_picture_ptr->hwaccel_picture_private;
305+ s->cur_pic_ptr->hwaccel_picture_private;
306306 int ret;
307307
308308 if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
309309 return -1;
310− ret = ff_dxva2_common_end_frame(avctx, s->current_picture_ptr->f,
310+ ret = ff_dxva2_common_end_frame(avctx, s->cur_pic_ptr->f,
311311 &ctx_pic->pp, sizeof(ctx_pic->pp),
312312 &ctx_pic->qm, sizeof(ctx_pic->qm),
313313 commit_bitstream_and_slice_buffer);
libavcodec/dxva2_vc1.c+8−8
@@ -46,7 +46,7 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx, · 45 unmodified lines
4646 {
4747 const VC1Context *v = avctx->priv_data;
4848 const MpegEncContext *s = &v->s;
49− const Picture *current_picture = s->current_picture_ptr;
49+ const Picture *current_picture = s->cur_pic_ptr;
5050 int intcomp = 0;
5151
5252 // determine if intensity compensation is needed
@@ -59,11 +59,11 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx, · 6 unmodified lines
5959
6060 memset(pp, 0, sizeof(*pp));
6161 if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
62− pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_picture.f, 0);
62+ pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_pic.f, 0);
6363 else
6464 pp->wForwardRefPictureIndex = 0xffff;
6565 if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type)
66− pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f, 0);
66+ pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_pic.f, 0);
6767 else
6868 pp->wBackwardRefPictureIndex = 0xffff;
6969 pp->wDecodedPictureIndex =
@@ -191,7 +191,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, · 121 unmodified lines
191191 const VC1Context *v = avctx->priv_data;
192192 AVDXVAContext *ctx = DXVA_CONTEXT(avctx);
193193 const MpegEncContext *s = &v->s;
194− struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
194+ struct dxva2_picture_context *ctx_pic = s->cur_pic_ptr->hwaccel_picture_private;
195195
196196 static const uint8_t start_code[] = { 0, 0, 1, 0x0d };
197197 const unsigned start_code_size = avctx->codec_id == AV_CODEC_ID_VC1 ? sizeof(start_code) : 0;
@@ -317,7 +317,7 @@ static int dxva2_vc1_start_frame(AVCodecContext *avctx, · 119 unmodified lines
317317 {
318318 const VC1Context *v = avctx->priv_data;
319319 AVDXVAContext *ctx = DXVA_CONTEXT(avctx);
320− struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private;
320+ struct dxva2_picture_context *ctx_pic = v->s.cur_pic_ptr->hwaccel_picture_private;
321321
322322 if (!DXVA_CONTEXT_VALID(avctx, ctx))
323323 return -1;
@@ -336,7 +336,7 @@ static int dxva2_vc1_decode_slice(AVCodecContext *avctx, · 12 unmodified lines
336336 uint32_t size)
337337 {
338338 const VC1Context *v = avctx->priv_data;
339− const Picture *current_picture = v->s.current_picture_ptr;
339+ const Picture *current_picture = v->s.cur_pic_ptr;
340340 struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private;
341341 unsigned position;
342342
@@ -364,13 +364,13 @@ static int dxva2_vc1_decode_slice(AVCodecContext *avctx, · 21 unmodified lines
364364 static int dxva2_vc1_end_frame(AVCodecContext *avctx)
365365 {
366366 VC1Context *v = avctx->priv_data;
367− struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private;
367+ struct dxva2_picture_context *ctx_pic = v->s.cur_pic_ptr->hwaccel_picture_private;
368368 int ret;
369369
370370 if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
371371 return -1;
372372
373− ret = ff_dxva2_common_end_frame(avctx, v->s.current_picture_ptr->f,
373+ ret = ff_dxva2_common_end_frame(avctx, v->s.cur_pic_ptr->f,
374374 &ctx_pic->pp, sizeof(ctx_pic->pp),
375375 NULL, 0,
376376 commit_bitstream_and_slice_buffer);
libavcodec/h261dec.c+13−13
@@ -228,17 +228,17 @@ static int h261_decode_mb_skipped(H261DecContext *h, int mba1, int mba2) · 227 unmodified lines
228228
229229 s->mv_dir = MV_DIR_FORWARD;
230230 s->mv_type = MV_TYPE_16X16;
231− s->current_picture.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
231+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
232232 s->mv[0][0][0] = 0;
233233 s->mv[0][0][1] = 0;
234234 s->mb_skipped = 1;
235235 h->common.mtype &= ~MB_TYPE_H261_FIL;
236236
237− if (s->current_picture.motion_val[0]) {
237+ if (s->cur_pic.motion_val[0]) {
238238 int b_stride = 2*s->mb_width + 1;
239239 int b_xy = 2 * s->mb_x + (2 * s->mb_y) * b_stride;
240− s->current_picture.motion_val[0][b_xy][0] = s->mv[0][0][0];
241− s->current_picture.motion_val[0][b_xy][1] = s->mv[0][0][1];
240+ s->cur_pic.motion_val[0][b_xy][0] = s->mv[0][0][0];
241+ s->cur_pic.motion_val[0][b_xy][1] = s->mv[0][0][1];
242242 }
243243
244244 ff_mpv_reconstruct_mb(s, s->block);
@@ -452,22 +452,22 @@ static int h261_decode_mb(H261DecContext *h) · 207 unmodified lines
452452 cbp = get_vlc2(&s->gb, h261_cbp_vlc, H261_CBP_VLC_BITS, 1) + 1;
453453
454454 if (s->mb_intra) {
455− s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
455+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA;
456456 goto intra;
457457 }
458458
459459 //set motion vectors
460460 s->mv_dir = MV_DIR_FORWARD;
461461 s->mv_type = MV_TYPE_16X16;
462− s->current_picture.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
462+ s->cur_pic.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
463463 s->mv[0][0][0] = h->current_mv_x * 2; // gets divided by 2 in motion compensation
464464 s->mv[0][0][1] = h->current_mv_y * 2;
465465
466− if (s->current_picture.motion_val[0]) {
466+ if (s->cur_pic.motion_val[0]) {
467467 int b_stride = 2*s->mb_width + 1;
468468 int b_xy = 2 * s->mb_x + (2 * s->mb_y) * b_stride;
469− s->current_picture.motion_val[0][b_xy][0] = s->mv[0][0][0];
470− s->current_picture.motion_val[0][b_xy][1] = s->mv[0][0][1];
469+ s->cur_pic.motion_val[0][b_xy][0] = s->mv[0][0][0];
470+ s->cur_pic.motion_val[0][b_xy][1] = s->mv[0][0][1];
471471 }
472472
473473 intra:
@@ -649,12 +649,12 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 175 unmodified lines
649649 }
650650 ff_mpv_frame_end(s);
651651
652− av_assert0(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type);
653− av_assert0(s->current_picture.f->pict_type == s->pict_type);
652+ av_assert0(s->cur_pic.f->pict_type == s->cur_pic_ptr->f->pict_type);
653+ av_assert0(s->cur_pic.f->pict_type == s->pict_type);
654654
655− if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
655+ if ((ret = av_frame_ref(pict, s->cur_pic_ptr->f)) < 0)
656656 return ret;
657− ff_print_debug_info(s, s->current_picture_ptr, pict);
657+ ff_print_debug_info(s, s->cur_pic_ptr, pict);
658658
659659 *got_frame = 1;
660660
libavcodec/h263.c+20−20
@@ -73,21 +73,21 @@ void ff_h263_update_motion_val(MpegEncContext * s){ · 72 unmodified lines
7373 s->p_field_mv_table[i][0][mb_xy][0]= s->mv[0][i][0];
7474 s->p_field_mv_table[i][0][mb_xy][1]= s->mv[0][i][1];
7575 }
76− s->current_picture.ref_index[0][4*mb_xy ] =
77− s->current_picture.ref_index[0][4*mb_xy + 1] = s->field_select[0][0];
78− s->current_picture.ref_index[0][4*mb_xy + 2] =
79− s->current_picture.ref_index[0][4*mb_xy + 3] = s->field_select[0][1];
76+ s->cur_pic.ref_index[0][4*mb_xy ] =
77+ s->cur_pic.ref_index[0][4*mb_xy + 1] = s->field_select[0][0];
78+ s->cur_pic.ref_index[0][4*mb_xy + 2] =
79+ s->cur_pic.ref_index[0][4*mb_xy + 3] = s->field_select[0][1];
8080 }
8181
8282 /* no update if 8X8 because it has been done during parsing */
83− s->current_picture.motion_val[0][xy][0] = motion_x;
84− s->current_picture.motion_val[0][xy][1] = motion_y;
85− s->current_picture.motion_val[0][xy + 1][0] = motion_x;
86− s->current_picture.motion_val[0][xy + 1][1] = motion_y;
87− s->current_picture.motion_val[0][xy + wrap][0] = motion_x;
88− s->current_picture.motion_val[0][xy + wrap][1] = motion_y;
89− s->current_picture.motion_val[0][xy + 1 + wrap][0] = motion_x;
90− s->current_picture.motion_val[0][xy + 1 + wrap][1] = motion_y;
83+ s->cur_pic.motion_val[0][xy][0] = motion_x;
84+ s->cur_pic.motion_val[0][xy][1] = motion_y;
85+ s->cur_pic.motion_val[0][xy + 1][0] = motion_x;
86+ s->cur_pic.motion_val[0][xy + 1][1] = motion_y;
87+ s->cur_pic.motion_val[0][xy + wrap][0] = motion_x;
88+ s->cur_pic.motion_val[0][xy + wrap][1] = motion_y;
89+ s->cur_pic.motion_val[0][xy + 1 + wrap][0] = motion_x;
90+ s->cur_pic.motion_val[0][xy + 1 + wrap][1] = motion_y;
9191 }
9292 }
9393
@@ -104,7 +104,7 @@ void ff_h263_loop_filter(MpegEncContext * s){ · 10 unmodified lines
104104 Diag Top
105105 Left Center
106106 */
107− if (!IS_SKIP(s->current_picture.mb_type[xy])) {
107+ if (!IS_SKIP(s->cur_pic.mb_type[xy])) {
108108 qp_c= s->qscale;
109109 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize, linesize, qp_c);
110110 s->h263dsp.h263_v_loop_filter(dest_y + 8 * linesize + 8, linesize, qp_c);
@@ -114,10 +114,10 @@ void ff_h263_loop_filter(MpegEncContext * s){ · 3 unmodified lines
114114 if(s->mb_y){
115115 int qp_dt, qp_tt, qp_tc;
116116
117− if (IS_SKIP(s->current_picture.mb_type[xy - s->mb_stride]))
117+ if (IS_SKIP(s->cur_pic.mb_type[xy - s->mb_stride]))
118118 qp_tt=0;
119119 else
120− qp_tt = s->current_picture.qscale_table[xy - s->mb_stride];
120+ qp_tt = s->cur_pic.qscale_table[xy - s->mb_stride];
121121
122122 if(qp_c)
123123 qp_tc= qp_c;
@@ -137,10 +137,10 @@ void ff_h263_loop_filter(MpegEncContext * s){ · 13 unmodified lines
137137 s->h263dsp.h263_h_loop_filter(dest_y - 8 * linesize + 8, linesize, qp_tt);
138138
139139 if(s->mb_x){
140− if (qp_tt || IS_SKIP(s->current_picture.mb_type[xy - 1 - s->mb_stride]))
140+ if (qp_tt || IS_SKIP(s->cur_pic.mb_type[xy - 1 - s->mb_stride]))
141141 qp_dt= qp_tt;
142142 else
143− qp_dt = s->current_picture.qscale_table[xy - 1 - s->mb_stride];
143+ qp_dt = s->cur_pic.qscale_table[xy - 1 - s->mb_stride];
144144
145145 if(qp_dt){
146146 const int chroma_qp= s->chroma_qscale_table[qp_dt];
@@ -159,10 +159,10 @@ void ff_h263_loop_filter(MpegEncContext * s){ · 12 unmodified lines
159159
160160 if(s->mb_x){
161161 int qp_lc;
162− if (qp_c || IS_SKIP(s->current_picture.mb_type[xy - 1]))
162+ if (qp_c || IS_SKIP(s->cur_pic.mb_type[xy - 1]))
163163 qp_lc= qp_c;
164164 else
165− qp_lc = s->current_picture.qscale_table[xy - 1];
165+ qp_lc = s->cur_pic.qscale_table[xy - 1];
166166
167167 if(qp_lc){
168168 s->h263dsp.h263_h_loop_filter(dest_y, linesize, qp_lc);
@@ -184,7 +184,7 @@ int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, · 15 unmodified lines
184184 static const int off[4]= {2, 1, 1, -1};
185185
186186 wrap = s->b8_stride;
187− mot_val = s->current_picture.motion_val[dir] + s->block_index[block];
187+ mot_val = s->cur_pic.motion_val[dir] + s->block_index[block];
188188
189189 A = mot_val[ - 1];
190190 /* special case for first (slice) line */
libavcodec/h263dec.c+17−17
@@ -432,22 +432,22 @@ int ff_h263_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 431 unmodified lines
432432 /* no supplementary picture */
433433 if (buf_size == 0) {
434434 /* special case for last picture */
435− if (s->low_delay == 0 && s->next_picture_ptr) {
436− if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0)
435+ if (s->low_delay == 0 && s->next_pic_ptr) {
436+ if ((ret = av_frame_ref(pict, s->next_pic_ptr->f)) < 0)
437437 return ret;
438− s->next_picture_ptr = NULL;
438+ s->next_pic_ptr = NULL;
439439
440440 *got_frame = 1;
441− } else if (s->skipped_last_frame && s->current_picture_ptr) {
441+ } else if (s->skipped_last_frame && s->cur_pic_ptr) {
442442 /* Output the last picture we decoded again if the stream ended with
443443 * an NVOP */
444− if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
444+ if ((ret = av_frame_ref(pict, s->cur_pic_ptr->f)) < 0)
445445 return ret;
446446 /* Copy props from the last input packet. Otherwise, props from the last
447447 * returned picture would be reused */
448448 if ((ret = ff_decode_frame_props(avctx, pict)) < 0)
449449 return ret;
450− s->current_picture_ptr = NULL;
450+ s->cur_pic_ptr = NULL;
451451
452452 *got_frame = 1;
453453 }
@@ -561,7 +561,7 @@ retry: · 107 unmodified lines
561561 s->gob_index = H263_GOB_HEIGHT(s->height);
562562
563563 /* skip B-frames if we don't have reference frames */
564− if (!s->last_picture_ptr &&
564+ if (!s->last_pic_ptr &&
565565 (s->pict_type == AV_PICTURE_TYPE_B || s->droppable))
566566 return get_consumed_bytes(s, buf_size);
567567 if ((avctx->skip_frame >= AVDISCARD_NONREF &&
@@ -647,21 +647,21 @@ frame_end: · 79 unmodified lines
647647 if (!s->divx_packed && avctx->hwaccel)
648648 ff_thread_finish_setup(avctx);
649649
650− av_assert1(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type);
651− av_assert1(s->current_picture.f->pict_type == s->pict_type);
650+ av_assert1(s->cur_pic.f->pict_type == s->cur_pic_ptr->f->pict_type);
651+ av_assert1(s->cur_pic.f->pict_type == s->pict_type);
652652 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
653− if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
653+ if ((ret = av_frame_ref(pict, s->cur_pic_ptr->f)) < 0)
654654 return ret;
655− ff_print_debug_info(s, s->current_picture_ptr, pict);
656− ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
657− } else if (s->last_picture_ptr) {
658− if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
655+ ff_print_debug_info(s, s->cur_pic_ptr, pict);
656+ ff_mpv_export_qp_table(s, pict, s->cur_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
657+ } else if (s->last_pic_ptr) {
658+ if ((ret = av_frame_ref(pict, s->last_pic_ptr->f)) < 0)
659659 return ret;
660− ff_print_debug_info(s, s->last_picture_ptr, pict);
661− ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
660+ ff_print_debug_info(s, s->last_pic_ptr, pict);
661+ ff_mpv_export_qp_table(s, pict, s->last_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
662662 }
663663
664− if (s->last_picture_ptr || s->low_delay) {
664+ if (s->last_pic_ptr || s->low_delay) {
665665 if ( pict->format == AV_PIX_FMT_YUV420P
666666 && (s->codec_tag == AV_RL32("GEOV") || s->codec_tag == AV_RL32("GEOX"))) {
667667 for (int p = 0; p < 3; p++) {
libavcodec/ituh263dec.c+15−15
@@ -357,20 +357,20 @@ static void preview_obmc(MpegEncContext *s){ · 356 unmodified lines
357357 do{
358358 if (get_bits1(&s->gb)) {
359359 /* skip mb */
360− mot_val = s->current_picture.motion_val[0][s->block_index[0]];
360+ mot_val = s->cur_pic.motion_val[0][s->block_index[0]];
361361 mot_val[0 ]= mot_val[2 ]=
362362 mot_val[0+stride]= mot_val[2+stride]= 0;
363363 mot_val[1 ]= mot_val[3 ]=
364364 mot_val[1+stride]= mot_val[3+stride]= 0;
365365
366− s->current_picture.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
366+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
367367 goto end;
368368 }
369369 cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 2);
370370 }while(cbpc == 20);
371371
372372 if(cbpc & 4){
373− s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
373+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA;
374374 }else{
375375 get_vlc2(&s->gb, ff_h263_cbpy_vlc, CBPY_VLC_BITS, 1);
376376 if (cbpc & 8) {
@@ -382,7 +382,7 @@ static void preview_obmc(MpegEncContext *s){ · 5 unmodified lines
382382 }
383383
384384 if ((cbpc & 16) == 0) {
385− s->current_picture.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
385+ s->cur_pic.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
386386 /* 16x16 motion prediction */
387387 mot_val= ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
388388 if (s->umvplus)
@@ -400,7 +400,7 @@ static void preview_obmc(MpegEncContext *s){ · 11 unmodified lines
400400 mot_val[1 ]= mot_val[3 ]=
401401 mot_val[1+stride]= mot_val[3+stride]= my;
402402 } else {
403− s->current_picture.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0;
403+ s->cur_pic.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0;
404404 for(i=0;i<4;i++) {
405405 mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y);
406406 if (s->umvplus)
@@ -750,12 +750,12 @@ static inline void set_one_direct_mv(MpegEncContext *s, Picture *p, int i) · 343 unmodified lines
750750 static int set_direct_mv(MpegEncContext *s)
751751 {
752752 const int mb_index = s->mb_x + s->mb_y * s->mb_stride;
753− Picture *p = &s->next_picture;
753+ Picture *p = &s->next_pic;
754754 int colocated_mb_type = p->mb_type[mb_index];
755755 int i;
756756
757757 if (s->codec_tag == AV_RL32("U263") && p->f->pict_type == AV_PICTURE_TYPE_I) {
758− p = &s->last_picture;
758+ p = &s->last_pic;
759759 colocated_mb_type = p->mb_type[mb_index];
760760 }
761761
@@ -803,7 +803,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 41 unmodified lines
803803 s->block_last_index[i] = -1;
804804 s->mv_dir = MV_DIR_FORWARD;
805805 s->mv_type = MV_TYPE_16X16;
806− s->current_picture.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
806+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0;
807807 s->mv[0][0][0] = 0;
808808 s->mv[0][0][1] = 0;
809809 s->mb_skipped = !(s->obmc | s->loop_filter);
@@ -841,7 +841,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 31 unmodified lines
841841
842842 s->mv_dir = MV_DIR_FORWARD;
843843 if ((cbpc & 16) == 0) {
844− s->current_picture.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
844+ s->cur_pic.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
845845 /* 16x16 motion prediction */
846846 s->mv_type = MV_TYPE_16X16;
847847 ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
@@ -866,7 +866,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 18 unmodified lines
866866 if (s->umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
867867 skip_bits1(&s->gb); /* Bit stuffing to prevent PSC */
868868 } else {
869− s->current_picture.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0;
869+ s->cur_pic.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0;
870870 s->mv_type = MV_TYPE_8X8;
871871 for(i=0;i<4;i++) {
872872 mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y);
@@ -894,8 +894,8 @@ int ff_h263_decode_mb(MpegEncContext *s, · 21 unmodified lines
894894 } else if(s->pict_type==AV_PICTURE_TYPE_B) {
895895 int mb_type;
896896 const int stride= s->b8_stride;
897− int16_t *mot_val0 = s->current_picture.motion_val[0][2 * (s->mb_x + s->mb_y * stride)];
898− int16_t *mot_val1 = s->current_picture.motion_val[1][2 * (s->mb_x + s->mb_y * stride)];
897+ int16_t *mot_val0 = s->cur_pic.motion_val[0][2 * (s->mb_x + s->mb_y * stride)];
898+ int16_t *mot_val1 = s->cur_pic.motion_val[1][2 * (s->mb_x + s->mb_y * stride)];
899899 // const int mv_xy= s->mb_x + 1 + s->mb_y * s->mb_stride;
900900
901901 //FIXME ugly
@@ -1007,7 +1007,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 105 unmodified lines
10071007 }
10081008 }
10091009
1010− s->current_picture.mb_type[xy] = mb_type;
1010+ s->cur_pic.mb_type[xy] = mb_type;
10111011 } else { /* I-Frame */
10121012 do{
10131013 cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 2);
@@ -1022,11 +1022,11 @@ int ff_h263_decode_mb(MpegEncContext *s, · 8 unmodified lines
10221022 dquant = cbpc & 4;
10231023 s->mb_intra = 1;
10241024 intra:
1025− s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
1025+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA;
10261026 if (s->h263_aic) {
10271027 s->ac_pred = get_bits1(&s->gb);
10281028 if(s->ac_pred){
1029− s->current_picture.mb_type[xy] = MB_TYPE_INTRA | MB_TYPE_ACPRED;
1029+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA | MB_TYPE_ACPRED;
10301030
10311031 s->h263_aic_dir = get_bits1(&s->gb);
10321032 }
libavcodec/ituh263enc.c+8−8
@@ -271,7 +271,7 @@ void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line) · 270 unmodified lines
271271 */
272272 void ff_clean_h263_qscales(MpegEncContext *s){
273273 int i;
274− int8_t * const qscale_table = s->current_picture.qscale_table;
274+ int8_t * const qscale_table = s->cur_pic.qscale_table;
275275
276276 ff_init_qscale_tab(s);
277277
@@ -565,8 +565,8 @@ void ff_h263_encode_mb(MpegEncContext * s, · 287 unmodified lines
565565 /* motion vectors: 8x8 mode*/
566566 ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y);
567567
568− motion_x = s->current_picture.motion_val[0][s->block_index[i]][0];
569− motion_y = s->current_picture.motion_val[0][s->block_index[i]][1];
568+ motion_x = s->cur_pic.motion_val[0][s->block_index[i]][0];
569+ motion_y = s->cur_pic.motion_val[0][s->block_index[i]][1];
570570 if (!s->umvplus) {
571571 ff_h263_encode_motion_vector(s, motion_x - pred_x,
572572 motion_y - pred_y, 1);
@@ -692,15 +692,15 @@ void ff_h263_update_mb(MpegEncContext *s) · 119 unmodified lines
692692 {
693693 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
694694
695− if (s->current_picture.mbskip_table)
696− s->current_picture.mbskip_table[mb_xy] = s->mb_skipped;
695+ if (s->cur_pic.mbskip_table)
696+ s->cur_pic.mbskip_table[mb_xy] = s->mb_skipped;
697697
698698 if (s->mv_type == MV_TYPE_8X8)
699− s->current_picture.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8;
699+ s->cur_pic.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8;
700700 else if(s->mb_intra)
701− s->current_picture.mb_type[mb_xy] = MB_TYPE_INTRA;
701+ s->cur_pic.mb_type[mb_xy] = MB_TYPE_INTRA;
702702 else
703− s->current_picture.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_16x16;
703+ s->cur_pic.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_16x16;
704704
705705 ff_h263_update_motion_val(s);
706706 }
libavcodec/motion_est.c+42−42
@@ -510,16 +510,16 @@ static inline void set_p_mv_tables(MpegEncContext * s, int mx, int my, int mv4) · 509 unmodified lines
510510 if(mv4){
511511 int mot_xy= s->block_index[0];
512512
513− s->current_picture.motion_val[0][mot_xy ][0] = mx;
514− s->current_picture.motion_val[0][mot_xy ][1] = my;
515− s->current_picture.motion_val[0][mot_xy + 1][0] = mx;
516− s->current_picture.motion_val[0][mot_xy + 1][1] = my;
513+ s->cur_pic.motion_val[0][mot_xy ][0] = mx;
514+ s->cur_pic.motion_val[0][mot_xy ][1] = my;
515+ s->cur_pic.motion_val[0][mot_xy + 1][0] = mx;
516+ s->cur_pic.motion_val[0][mot_xy + 1][1] = my;
517517
518518 mot_xy += s->b8_stride;
519− s->current_picture.motion_val[0][mot_xy ][0] = mx;
520− s->current_picture.motion_val[0][mot_xy ][1] = my;
521− s->current_picture.motion_val[0][mot_xy + 1][0] = mx;
522− s->current_picture.motion_val[0][mot_xy + 1][1] = my;
519+ s->cur_pic.motion_val[0][mot_xy ][0] = mx;
520+ s->cur_pic.motion_val[0][mot_xy ][1] = my;
521+ s->cur_pic.motion_val[0][mot_xy + 1][0] = mx;
522+ s->cur_pic.motion_val[0][mot_xy + 1][1] = my;
523523 }
524524 }
525525
@@ -601,8 +601,8 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) · 75 unmodified lines
601601 c->ymax = - 16*s->mb_y + s->height - 8*(block>>1);
602602 }
603603
604− P_LEFT[0] = s->current_picture.motion_val[0][mot_xy - 1][0];
605− P_LEFT[1] = s->current_picture.motion_val[0][mot_xy - 1][1];
604+ P_LEFT[0] = s->cur_pic.motion_val[0][mot_xy - 1][0];
605+ P_LEFT[1] = s->cur_pic.motion_val[0][mot_xy - 1][1];
606606
607607 if (P_LEFT[0] > c->xmax * (1 << shift)) P_LEFT[0] = c->xmax * (1 << shift);
608608
@@ -611,10 +611,10 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) · 2 unmodified lines
611611 c->pred_x= pred_x4= P_LEFT[0];
612612 c->pred_y= pred_y4= P_LEFT[1];
613613 } else {
614− P_TOP[0] = s->current_picture.motion_val[0][mot_xy - mot_stride ][0];
615− P_TOP[1] = s->current_picture.motion_val[0][mot_xy - mot_stride ][1];
616− P_TOPRIGHT[0] = s->current_picture.motion_val[0][mot_xy - mot_stride + off[block]][0];
617− P_TOPRIGHT[1] = s->current_picture.motion_val[0][mot_xy - mot_stride + off[block]][1];
614+ P_TOP[0] = s->cur_pic.motion_val[0][mot_xy - mot_stride ][0];
615+ P_TOP[1] = s->cur_pic.motion_val[0][mot_xy - mot_stride ][1];
616+ P_TOPRIGHT[0] = s->cur_pic.motion_val[0][mot_xy - mot_stride + off[block]][0];
617+ P_TOPRIGHT[1] = s->cur_pic.motion_val[0][mot_xy - mot_stride + off[block]][1];
618618 if (P_TOP[1] > c->ymax * (1 << shift)) P_TOP[1] = c->ymax * (1 << shift);
619619 if (P_TOPRIGHT[0] < c->xmin * (1 << shift)) P_TOPRIGHT[0] = c->xmin * (1 << shift);
620620 if (P_TOPRIGHT[0] > c->xmax * (1 << shift)) P_TOPRIGHT[0] = c->xmax * (1 << shift);
@@ -675,8 +675,8 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) · 54 unmodified lines
675675 my4_sum+= my4;
676676 }
677677
678− s->current_picture.motion_val[0][s->block_index[block]][0] = mx4;
679− s->current_picture.motion_val[0][s->block_index[block]][1] = my4;
678+ s->cur_pic.motion_val[0][s->block_index[block]][0] = mx4;
679+ s->cur_pic.motion_val[0][s->block_index[block]][1] = my4;
680680
681681 if(mx4 != mx || my4 != my) same=0;
682682 }
@@ -686,7 +686,7 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) · 3 unmodified lines
686686
687687 if (s->mecc.me_sub_cmp[0] != s->mecc.mb_cmp[0]) {
688688 dmin_sum += s->mecc.mb_cmp[0](s,
689− s->new_picture->data[0] +
689+ s->new_pic->data[0] +
690690 s->mb_x * 16 + s->mb_y * 16 * stride,
691691 c->scratchpad, stride, 16);
692692 }
@@ -703,15 +703,15 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift) · 10 unmodified lines
703703 offset= (s->mb_x*8 + (mx>>1)) + (s->mb_y*8 + (my>>1))*s->uvlinesize;
704704
705705 if(s->no_rounding){
706− s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_picture.f->data[1] + offset, s->uvlinesize, 8);
707− s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad + 8, s->last_picture.f->data[2] + offset, s->uvlinesize, 8);
706+ s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_pic.f->data[1] + offset, s->uvlinesize, 8);
707+ s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad + 8, s->last_pic.f->data[2] + offset, s->uvlinesize, 8);
708708 }else{
709− s->hdsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_picture.f->data[1] + offset, s->uvlinesize, 8);
710− s->hdsp.put_pixels_tab [1][dxy](c->scratchpad + 8, s->last_picture.f->data[2] + offset, s->uvlinesize, 8);
709+ s->hdsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_pic.f->data[1] + offset, s->uvlinesize, 8);
710+ s->hdsp.put_pixels_tab [1][dxy](c->scratchpad + 8, s->last_pic.f->data[2] + offset, s->uvlinesize, 8);
711711 }
712712
713− dmin_sum += s->mecc.mb_cmp[1](s, s->new_picture->data[1] + s->mb_x * 8 + s->mb_y * 8 * s->uvlinesize, c->scratchpad, s->uvlinesize, 8);
714− dmin_sum += s->mecc.mb_cmp[1](s, s->new_picture->data[2] + s->mb_x * 8 + s->mb_y * 8 * s->uvlinesize, c->scratchpad + 8, s->uvlinesize, 8);
713+ dmin_sum += s->mecc.mb_cmp[1](s, s->new_pic->data[1] + s->mb_x * 8 + s->mb_y * 8 * s->uvlinesize, c->scratchpad, s->uvlinesize, 8);
714+ dmin_sum += s->mecc.mb_cmp[1](s, s->new_pic->data[2] + s->mb_x * 8 + s->mb_y * 8 * s->uvlinesize, c->scratchpad + 8, s->uvlinesize, 8);
715715 }
716716
717717 c->pred_x= mx;
@@ -899,7 +899,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, · 181 unmodified lines
899899 const int shift= 1+s->quarter_sample;
900900 int mb_type=0;
901901
902− init_ref(c, s->new_picture->data, s->last_picture.f->data, NULL, 16*mb_x, 16*mb_y, 0);
902+ init_ref(c, s->new_pic->data, s->last_pic.f->data, NULL, 16*mb_x, 16*mb_y, 0);
903903
904904 av_assert0(s->quarter_sample==0 || s->quarter_sample==1);
905905 av_assert0(s->linesize == c->stride);
@@ -927,17 +927,17 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, · 21 unmodified lines
927927 const int mot_stride = s->b8_stride;
928928 const int mot_xy = s->block_index[0];
929929
930− P_LEFT[0] = s->current_picture.motion_val[0][mot_xy - 1][0];
931− P_LEFT[1] = s->current_picture.motion_val[0][mot_xy - 1][1];
930+ P_LEFT[0] = s->cur_pic.motion_val[0][mot_xy - 1][0];
931+ P_LEFT[1] = s->cur_pic.motion_val[0][mot_xy - 1][1];
932932
933933 if (P_LEFT[0] > (c->xmax << shift))
934934 P_LEFT[0] = c->xmax << shift;
935935
936936 if (!s->first_slice_line) {
937− P_TOP[0] = s->current_picture.motion_val[0][mot_xy - mot_stride ][0];
938− P_TOP[1] = s->current_picture.motion_val[0][mot_xy - mot_stride ][1];
939− P_TOPRIGHT[0] = s->current_picture.motion_val[0][mot_xy - mot_stride + 2][0];
940− P_TOPRIGHT[1] = s->current_picture.motion_val[0][mot_xy - mot_stride + 2][1];
937+ P_TOP[0] = s->cur_pic.motion_val[0][mot_xy - mot_stride ][0];
938+ P_TOP[1] = s->cur_pic.motion_val[0][mot_xy - mot_stride ][1];
939+ P_TOPRIGHT[0] = s->cur_pic.motion_val[0][mot_xy - mot_stride + 2][0];
940+ P_TOPRIGHT[1] = s->cur_pic.motion_val[0][mot_xy - mot_stride + 2][1];
941941 if (P_TOP[1] > (c->ymax << shift))
942942 P_TOP[1] = c->ymax << shift;
943943 if (P_TOPRIGHT[0] < (c->xmin * (1 << shift)))
@@ -1048,9 +1048,9 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, · 104 unmodified lines
10481048
10491049 if(intra_score < dmin){
10501050 mb_type= CANDIDATE_MB_TYPE_INTRA;
1051− s->current_picture.mb_type[mb_y*s->mb_stride + mb_x] = CANDIDATE_MB_TYPE_INTRA; //FIXME cleanup
1051+ s->cur_pic.mb_type[mb_y*s->mb_stride + mb_x] = CANDIDATE_MB_TYPE_INTRA; //FIXME cleanup
10521052 }else
1053− s->current_picture.mb_type[mb_y*s->mb_stride + mb_x] = 0;
1053+ s->cur_pic.mb_type[mb_y*s->mb_stride + mb_x] = 0;
10541054
10551055 {
10561056 int p_score= FFMIN(vard, varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*100);
@@ -1070,7 +1070,7 @@ int ff_pre_estimate_p_frame_motion(MpegEncContext * s, · 13 unmodified lines
10701070 int P[10][2];
10711071 const int shift= 1+s->quarter_sample;
10721072 const int xy= mb_x + mb_y*s->mb_stride;
1073− init_ref(c, s->new_picture->data, s->last_picture.f->data, NULL, 16*mb_x, 16*mb_y, 0);
1073+ init_ref(c, s->new_pic->data, s->last_pic.f->data, NULL, 16*mb_x, 16*mb_y, 0);
10741074
10751075 av_assert0(s->quarter_sample==0 || s->quarter_sample==1);
10761076
@@ -1403,7 +1403,7 @@ static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y) · 326 unmodified lines
14031403 ymin= xmin=(-32)>>shift;
14041404 ymax= xmax= 31>>shift;
14051405
1406− if (IS_8X8(s->next_picture.mb_type[mot_xy])) {
1406+ if (IS_8X8(s->next_pic.mb_type[mot_xy])) {
14071407 s->mv_type= MV_TYPE_8X8;
14081408 }else{
14091409 s->mv_type= MV_TYPE_16X16;
@@ -1413,8 +1413,8 @@ static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y) · 3 unmodified lines
14131413 int index= s->block_index[i];
14141414 int min, max;
14151415
1416− c->co_located_mv[i][0] = s->next_picture.motion_val[0][index][0];
1417− c->co_located_mv[i][1] = s->next_picture.motion_val[0][index][1];
1416+ c->co_located_mv[i][0] = s->next_pic.motion_val[0][index][0];
1417+ c->co_located_mv[i][1] = s->next_pic.motion_val[0][index][1];
14181418 c->direct_basis_mv[i][0]= c->co_located_mv[i][0]*time_pb/time_pp + ((i& 1)<<(shift+3));
14191419 c->direct_basis_mv[i][1]= c->co_located_mv[i][1]*time_pb/time_pp + ((i>>1)<<(shift+3));
14201420 // c->direct_basis_mv[1][i][0]= c->co_located_mv[i][0]*(time_pb - time_pp)/time_pp + ((i &1)<<(shift+3);
@@ -1495,14 +1495,14 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 74 unmodified lines
14951495 int fmin, bmin, dmin, fbmin, bimin, fimin;
14961496 int type=0;
14971497 const int xy = mb_y*s->mb_stride + mb_x;
1498− init_ref(c, s->new_picture->data, s->last_picture.f->data,
1499− s->next_picture.f->data, 16 * mb_x, 16 * mb_y, 2);
1498+ init_ref(c, s->new_pic->data, s->last_pic.f->data,
1499+ s->next_pic.f->data, 16 * mb_x, 16 * mb_y, 2);
15001500
15011501 get_limits(s, 16*mb_x, 16*mb_y);
15021502
15031503 c->skip=0;
15041504
1505− if (s->codec_id == AV_CODEC_ID_MPEG4 && s->next_picture.mbskip_table[xy]) {
1505+ if (s->codec_id == AV_CODEC_ID_MPEG4 && s->next_pic.mbskip_table[xy]) {
15061506 int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,0
15071507
15081508 score= ((unsigned)(score*score + 128*256))>>16;
@@ -1681,14 +1681,14 @@ void ff_fix_long_p_mvs(MpegEncContext * s, int type) · 172 unmodified lines
16811681 int block;
16821682 for(block=0; block<4; block++){
16831683 int off= (block& 1) + (block>>1)*wrap;
1684− int mx = s->current_picture.motion_val[0][ xy + off ][0];
1685− int my = s->current_picture.motion_val[0][ xy + off ][1];
1684+ int mx = s->cur_pic.motion_val[0][ xy + off ][0];
1685+ int my = s->cur_pic.motion_val[0][ xy + off ][1];
16861686
16871687 if( mx >=range || mx <-range
16881688 || my >=range || my <-range){
16891689 s->mb_type[i] &= ~CANDIDATE_MB_TYPE_INTER4V;
16901690 s->mb_type[i] |= type;
1691− s->current_picture.mb_type[i] = type;
1691+ s->cur_pic.mb_type[i] = type;
16921692 }
16931693 }
16941694 }
libavcodec/mpeg12dec.c+47−47
@@ -437,21 +437,21 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) · 436 unmodified lines
437437 if (s->mb_skip_run-- != 0) {
438438 if (s->pict_type == AV_PICTURE_TYPE_P) {
439439 s->mb_skipped = 1;
440− s->current_picture.mb_type[s->mb_x + s->mb_y * s->mb_stride] =
440+ s->cur_pic.mb_type[s->mb_x + s->mb_y * s->mb_stride] =
441441 MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16;
442442 } else {
443443 int mb_type;
444444
445445 if (s->mb_x)
446− mb_type = s->current_picture.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1];
446+ mb_type = s->cur_pic.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1];
447447 else
448448 // FIXME not sure if this is allowed in MPEG at all
449− mb_type = s->current_picture.mb_type[s->mb_width + (s->mb_y - 1) * s->mb_stride - 1];
449+ mb_type = s->cur_pic.mb_type[s->mb_width + (s->mb_y - 1) * s->mb_stride - 1];
450450 if (IS_INTRA(mb_type)) {
451451 av_log(s->avctx, AV_LOG_ERROR, "skip with previntra\n");
452452 return AVERROR_INVALIDDATA;
453453 }
454− s->current_picture.mb_type[s->mb_x + s->mb_y * s->mb_stride] =
454+ s->cur_pic.mb_type[s->mb_x + s->mb_y * s->mb_stride] =
455455 mb_type | MB_TYPE_SKIP;
456456
457457 if ((s->mv[0][0][0] | s->mv[0][0][1] | s->mv[1][0][0] | s->mv[1][0][1]) == 0)
@@ -784,7 +784,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) · 326 unmodified lines
784784 }
785785 }
786786
787− s->current_picture.mb_type[s->mb_x + s->mb_y * s->mb_stride] = mb_type;
787+ s->cur_pic.mb_type[s->mb_x + s->mb_y * s->mb_stride] = mb_type;
788788
789789 return 0;
790790 }
@@ -1292,36 +1292,36 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 501 unmodified lines
12921292 return ret;
12931293
12941294 if (s->picture_structure != PICT_FRAME) {
1295− s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST *
1296− (s->picture_structure == PICT_TOP_FIELD);
1295+ s->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST *
1296+ (s->picture_structure == PICT_TOP_FIELD);
12971297
12981298 for (int i = 0; i < 3; i++) {
12991299 if (s->picture_structure == PICT_BOTTOM_FIELD) {
1300− s->current_picture.f->data[i] = FF_PTR_ADD(s->current_picture.f->data[i],
1301− s->current_picture.f->linesize[i]);
1300+ s->cur_pic.f->data[i] = FF_PTR_ADD(s->cur_pic.f->data[i],
1301+ s->cur_pic.f->linesize[i]);
13021302 }
1303− s->current_picture.f->linesize[i] *= 2;
1304− s->last_picture.f->linesize[i] *= 2;
1305− s->next_picture.f->linesize[i] *= 2;
1303+ s->cur_pic.f->linesize[i] *= 2;
1304+ s->last_pic.f->linesize[i] *= 2;
1305+ s->next_pic.f->linesize[i] *= 2;
13061306 }
13071307 }
13081308
13091309 ff_mpeg_er_frame_start(s);
13101310
13111311 /* first check if we must repeat the frame */
1312− s->current_picture_ptr->f->repeat_pict = 0;
1312+ s->cur_pic_ptr->f->repeat_pict = 0;
13131313 if (s->repeat_first_field) {
13141314 if (s->progressive_sequence) {
13151315 if (s->top_field_first)
1316− s->current_picture_ptr->f->repeat_pict = 4;
1316+ s->cur_pic_ptr->f->repeat_pict = 4;
13171317 else
1318− s->current_picture_ptr->f->repeat_pict = 2;
1318+ s->cur_pic_ptr->f->repeat_pict = 2;
13191319 } else if (s->progressive_frame) {
1320− s->current_picture_ptr->f->repeat_pict = 1;
1320+ s->cur_pic_ptr->f->repeat_pict = 1;
13211321 }
13221322 }
13231323
1324− ret = ff_frame_new_side_data(s->avctx, s->current_picture_ptr->f,
1324+ ret = ff_frame_new_side_data(s->avctx, s->cur_pic_ptr->f,
13251325 AV_FRAME_DATA_PANSCAN, sizeof(s1->pan_scan),
13261326 &pan_scan);
13271327 if (ret < 0)
@@ -1331,14 +1331,14 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 3 unmodified lines
13311331
13321332 if (s1->a53_buf_ref) {
13331333 ret = ff_frame_new_side_data_from_buf(
1334− s->avctx, s->current_picture_ptr->f, AV_FRAME_DATA_A53_CC,
1334+ s->avctx, s->cur_pic_ptr->f, AV_FRAME_DATA_A53_CC,
13351335 &s1->a53_buf_ref, NULL);
13361336 if (ret < 0)
13371337 return ret;
13381338 }
13391339
13401340 if (s1->has_stereo3d) {
1341− AVStereo3D *stereo = av_stereo3d_create_side_data(s->current_picture_ptr->f);
1341+ AVStereo3D *stereo = av_stereo3d_create_side_data(s->cur_pic_ptr->f);
13421342 if (!stereo)
13431343 return AVERROR(ENOMEM);
13441344
@@ -1348,7 +1348,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 3 unmodified lines
13481348
13491349 if (s1->has_afd) {
13501350 AVFrameSideData *sd;
1351− ret = ff_frame_new_side_data(s->avctx, s->current_picture_ptr->f,
1351+ ret = ff_frame_new_side_data(s->avctx, s->cur_pic_ptr->f,
13521352 AV_FRAME_DATA_AFD, 1, &sd);
13531353 if (ret < 0)
13541354 return ret;
@@ -1360,7 +1360,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 5 unmodified lines
13601360 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME))
13611361 ff_thread_finish_setup(avctx);
13621362 } else { // second field
1363− if (!s->current_picture_ptr) {
1363+ if (!s->cur_pic_ptr) {
13641364 av_log(s->avctx, AV_LOG_ERROR, "first field missing\n");
13651365 return AVERROR_INVALIDDATA;
13661366 }
@@ -1377,10 +1377,10 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) · 10 unmodified lines
13771377 return ret;
13781378
13791379 for (int i = 0; i < 3; i++) {
1380− s->current_picture.f->data[i] = s->current_picture_ptr->f->data[i];
1380+ s->cur_pic.f->data[i] = s->cur_pic_ptr->f->data[i];
13811381 if (s->picture_structure == PICT_BOTTOM_FIELD)
1382− s->current_picture.f->data[i] +=
1383− s->current_picture_ptr->f->linesize[i];
1382+ s->cur_pic.f->data[i] +=
1383+ s->cur_pic_ptr->f->linesize[i];
13841384 }
13851385 }
13861386
@@ -1507,7 +1507,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, · 120 unmodified lines
15071507 return ret;
15081508
15091509 // Note motion_val is normally NULL unless we want to extract the MVs.
1510− if (s->current_picture.motion_val[0]) {
1510+ if (s->cur_pic.motion_val[0]) {
15111511 const int wrap = s->b8_stride;
15121512 int xy = s->mb_x * 2 + s->mb_y * 2 * wrap;
15131513 int b8_xy = 4 * (s->mb_x + s->mb_y * s->mb_stride);
@@ -1527,12 +1527,12 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, · 13 unmodified lines
15271527 motion_y = s->mv[dir][i][1];
15281528 }
15291529
1530− s->current_picture.motion_val[dir][xy][0] = motion_x;
1531− s->current_picture.motion_val[dir][xy][1] = motion_y;
1532− s->current_picture.motion_val[dir][xy + 1][0] = motion_x;
1533− s->current_picture.motion_val[dir][xy + 1][1] = motion_y;
1534− s->current_picture.ref_index [dir][b8_xy] =
1535− s->current_picture.ref_index [dir][b8_xy + 1] = s->field_select[dir][i];
1530+ s->cur_pic.motion_val[dir][xy][0] = motion_x;
1531+ s->cur_pic.motion_val[dir][xy][1] = motion_y;
1532+ s->cur_pic.motion_val[dir][xy + 1][0] = motion_x;
1533+ s->cur_pic.motion_val[dir][xy + 1][1] = motion_y;
1534+ s->cur_pic.ref_index [dir][b8_xy] =
1535+ s->cur_pic.ref_index [dir][b8_xy + 1] = s->field_select[dir][i];
15361536 av_assert2(s->field_select[dir][i] == 0 ||
15371537 s->field_select[dir][i] == 1);
15381538 }
@@ -1735,7 +1735,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict, int *got_output) · 196 unmodified lines
17351735 Mpeg1Context *s1 = avctx->priv_data;
17361736 MpegEncContext *s = &s1->mpeg_enc_ctx;
17371737
1738− if (!s->context_initialized || !s->current_picture_ptr)
1738+ if (!s->context_initialized || !s->cur_pic_ptr)
17391739 return 0;
17401740
17411741 if (s->avctx->hwaccel) {
@@ -1756,20 +1756,20 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict, int *got_output) · 14 unmodified lines
17561756 ff_mpv_frame_end(s);
17571757
17581758 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
1759− int ret = av_frame_ref(pict, s->current_picture_ptr->f);
1759+ int ret = av_frame_ref(pict, s->cur_pic_ptr->f);
17601760 if (ret < 0)
17611761 return ret;
1762− ff_print_debug_info(s, s->current_picture_ptr, pict);
1763− ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG2);
1762+ ff_print_debug_info(s, s->cur_pic_ptr, pict);
1763+ ff_mpv_export_qp_table(s, pict, s->cur_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG2);
17641764 *got_output = 1;
17651765 } else {
17661766 /* latency of 1 frame for I- and P-frames */
1767− if (s->last_picture_ptr && !s->last_picture_ptr->dummy) {
1768− int ret = av_frame_ref(pict, s->last_picture_ptr->f);
1767+ if (s->last_pic_ptr && !s->last_pic_ptr->dummy) {
1768+ int ret = av_frame_ref(pict, s->last_pic_ptr->f);
17691769 if (ret < 0)
17701770 return ret;
1771− ff_print_debug_info(s, s->last_picture_ptr, pict);
1772− ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG2);
1771+ ff_print_debug_info(s, s->last_pic_ptr, pict);
1772+ ff_mpv_export_qp_table(s, pict, s->last_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG2);
17731773 *got_output = 1;
17741774 }
17751775 }
@@ -2405,7 +2405,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 629 unmodified lines
24052405 return AVERROR_INVALIDDATA;
24062406 }
24072407
2408− if (!s2->last_picture_ptr) {
2408+ if (!s2->last_pic_ptr) {
24092409 /* Skip B-frames if we do not have reference frames and
24102410 * GOP is not closed. */
24112411 if (s2->pict_type == AV_PICTURE_TYPE_B) {
@@ -2419,7 +2419,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 7 unmodified lines
24192419 }
24202420 if (s2->pict_type == AV_PICTURE_TYPE_I || (s2->avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL))
24212421 s->sync = 1;
2422− if (!s2->next_picture_ptr) {
2422+ if (!s2->next_pic_ptr) {
24232423 /* Skip P-frames if we do not have a reference frame or
24242424 * we have an invalid header. */
24252425 if (s2->pict_type == AV_PICTURE_TYPE_P && !s->sync) {
@@ -2460,7 +2460,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 34 unmodified lines
24602460 if ((ret = mpeg_field_start(s2, buf, buf_size)) < 0)
24612461 return ret;
24622462 }
2463− if (!s2->current_picture_ptr) {
2463+ if (!s2->cur_pic_ptr) {
24642464 av_log(avctx, AV_LOG_ERROR,
24652465 "current_picture not initialized\n");
24662466 return AVERROR_INVALIDDATA;
@@ -2524,12 +2524,12 @@ static int mpeg_decode_frame(AVCodecContext *avctx, AVFrame *picture, · 57 unmodified lines
25242524
25252525 if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) {
25262526 /* special case for last picture */
2527− if (s2->low_delay == 0 && s2->next_picture_ptr) {
2528− int ret = av_frame_ref(picture, s2->next_picture_ptr->f);
2527+ if (s2->low_delay == 0 && s2->next_pic_ptr) {
2528+ int ret = av_frame_ref(picture, s2->next_pic_ptr->f);
25292529 if (ret < 0)
25302530 return ret;
25312531
2532− s2->next_picture_ptr = NULL;
2532+ s2->next_pic_ptr = NULL;
25332533
25342534 *got_output = 1;
25352535 }
@@ -2552,14 +2552,14 @@ static int mpeg_decode_frame(AVCodecContext *avctx, AVFrame *picture, · 16 unmodified lines
25522552 }
25532553 s->extradata_decoded = 1;
25542554 if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) {
2555− s2->current_picture_ptr = NULL;
2555+ s2->cur_pic_ptr = NULL;
25562556 return ret;
25572557 }
25582558 }
25592559
25602560 ret = decode_chunks(avctx, picture, got_output, buf, buf_size);
25612561 if (ret<0 || *got_output) {
2562− s2->current_picture_ptr = NULL;
2562+ s2->cur_pic_ptr = NULL;
25632563
25642564 if (s->timecode_frame_start != -1 && *got_output) {
25652565 char tcbuf[AV_TIMECODE_STR_SIZE];
libavcodec/mpeg12enc.c+7−7
@@ -290,7 +290,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 289 unmodified lines
290290 AVRational aspect_ratio = s->avctx->sample_aspect_ratio;
291291 int aspect_ratio_info;
292292
293− if (!(s->current_picture.f->flags & AV_FRAME_FLAG_KEY))
293+ if (!(s->cur_pic.f->flags & AV_FRAME_FLAG_KEY))
294294 return;
295295
296296 if (aspect_ratio.num == 0 || aspect_ratio.den == 0)
@@ -382,7 +382,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 85 unmodified lines
382382 put_bits(&s->pb, 2, mpeg12->frame_rate_ext.num-1); // frame_rate_ext_n
383383 put_bits(&s->pb, 5, mpeg12->frame_rate_ext.den-1); // frame_rate_ext_d
384384
385− side_data = av_frame_get_side_data(s->current_picture_ptr->f, AV_FRAME_DATA_PANSCAN);
385+ side_data = av_frame_get_side_data(s->cur_pic_ptr->f, AV_FRAME_DATA_PANSCAN);
386386 if (side_data) {
387387 const AVPanScan *pan_scan = (AVPanScan *)side_data->data;
388388 if (pan_scan->width && pan_scan->height) {
@@ -419,10 +419,10 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) · 30 unmodified lines
419419 /* time code: we must convert from the real frame rate to a
420420 * fake MPEG frame rate in case of low frame rate */
421421 fps = (framerate.num + framerate.den / 2) / framerate.den;
422− time_code = s->current_picture_ptr->coded_picture_number +
422+ time_code = s->cur_pic_ptr->coded_picture_number +
423423 mpeg12->timecode_frame_start;
424424
425− mpeg12->gop_picture_number = s->current_picture_ptr->coded_picture_number;
425+ mpeg12->gop_picture_number = s->cur_pic_ptr->coded_picture_number;
426426
427427 av_assert0(mpeg12->drop_frame_timecode == !!(mpeg12->tc.flags & AV_TIMECODE_FLAG_DROPFRAME));
428428 if (mpeg12->drop_frame_timecode)
@@ -530,7 +530,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s) · 101 unmodified lines
530530 if (s->progressive_sequence)
531531 put_bits(&s->pb, 1, 0); /* no repeat */
532532 else
533− put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST));
533+ put_bits(&s->pb, 1, !!(s->cur_pic_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST));
534534 /* XXX: optimize the generation of this flag with entropy measures */
535535 s->frame_pred_frame_dct = s->progressive_sequence;
536536
@@ -554,7 +554,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s) · 17 unmodified lines
554554 for (i = 0; i < sizeof(svcd_scan_offset_placeholder); i++)
555555 put_bits(&s->pb, 8, svcd_scan_offset_placeholder[i]);
556556 }
557− side_data = av_frame_get_side_data(s->current_picture_ptr->f,
557+ side_data = av_frame_get_side_data(s->cur_pic_ptr->f,
558558 AV_FRAME_DATA_STEREO3D);
559559 if (side_data) {
560560 AVStereo3D *stereo = (AVStereo3D *)side_data->data;
@@ -594,7 +594,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s) · 33 unmodified lines
594594 }
595595
596596 if (CONFIG_MPEG2VIDEO_ENCODER && mpeg12->a53_cc) {
597− side_data = av_frame_get_side_data(s->current_picture_ptr->f,
597+ side_data = av_frame_get_side_data(s->cur_pic_ptr->f,
598598 AV_FRAME_DATA_A53_CC);
599599 if (side_data) {
600600 if (side_data->size <= A53_MAX_CC_COUNT * 3 && side_data->size % 3 == 0) {
libavcodec/mpeg4video.c+4−4
@@ -98,7 +98,7 @@ static inline void ff_mpeg4_set_one_direct_mv(MpegEncContext *s, int mx, · 97 unmodified lines
9898 uint16_t time_pb = s->pb_time;
9999 int p_mx, p_my;
100100
101− p_mx = s->next_picture.motion_val[0][xy][0];
101+ p_mx = s->next_pic.motion_val[0][xy][0];
102102 if ((unsigned)(p_mx + tab_bias) < tab_size) {
103103 s->mv[0][i][0] = s->direct_scale_mv[0][p_mx + tab_bias] + mx;
104104 s->mv[1][i][0] = mx ? s->mv[0][i][0] - p_mx
@@ -108,7 +108,7 @@ static inline void ff_mpeg4_set_one_direct_mv(MpegEncContext *s, int mx, · 3 unmodified lines
108108 s->mv[1][i][0] = mx ? s->mv[0][i][0] - p_mx
109109 : p_mx * (time_pb - time_pp) / time_pp;
110110 }
111− p_my = s->next_picture.motion_val[0][xy][1];
111+ p_my = s->next_pic.motion_val[0][xy][1];
112112 if ((unsigned)(p_my + tab_bias) < tab_size) {
113113 s->mv[0][i][1] = s->direct_scale_mv[0][p_my + tab_bias] + my;
114114 s->mv[1][i][1] = my ? s->mv[0][i][1] - p_my
@@ -129,7 +129,7 @@ static inline void ff_mpeg4_set_one_direct_mv(MpegEncContext *s, int mx, · 14 unmodified lines
129129 int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my)
130130 {
131131 const int mb_index = s->mb_x + s->mb_y * s->mb_stride;
132− const int colocated_mb_type = s->next_picture.mb_type[mb_index];
132+ const int colocated_mb_type = s->next_pic.mb_type[mb_index];
133133 uint16_t time_pp;
134134 uint16_t time_pb;
135135 int i;
@@ -145,7 +145,7 @@ int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my) · 9 unmodified lines
145145 } else if (IS_INTERLACED(colocated_mb_type)) {
146146 s->mv_type = MV_TYPE_FIELD;
147147 for (i = 0; i < 2; i++) {
148− int field_select = s->next_picture.ref_index[0][4 * mb_index + 2 * i];
148+ int field_select = s->next_pic.ref_index[0][4 * mb_index + 2 * i];
149149 s->field_select[0][i] = field_select;
150150 s->field_select[1][i] = i;
151151 if (s->top_field_first) {
libavcodec/mpeg4videodec.c+42−42
@@ -316,7 +316,7 @@ void ff_mpeg4_pred_ac(MpegEncContext *s, int16_t *block, int n, int dir) · 315 unmodified lines
316316 {
317317 int i;
318318 int16_t *ac_val, *ac_val1;
319− int8_t *const qscale_table = s->current_picture.qscale_table;
319+ int8_t *const qscale_table = s->cur_pic.qscale_table;
320320
321321 /* find prediction */
322322 ac_val = &s->ac_val[0][0][0] + s->block_index[n] * 16;
@@ -970,13 +970,13 @@ static int mpeg4_decode_partition_a(Mpeg4DecContext *ctx) · 647 unmodified lines
970970 } while (cbpc == 8);
971971
972972 s->cbp_table[xy] = cbpc & 3;
973− s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
973+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA;
974974 s->mb_intra = 1;
975975
976976 if (cbpc & 4)
977977 ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]);
978978
979− s->current_picture.qscale_table[xy] = s->qscale;
979+ s->cur_pic.qscale_table[xy] = s->qscale;
980980
981981 s->mbintra_table[xy] = 1;
982982 for (i = 0; i < 6; i++) {
@@ -994,7 +994,7 @@ static int mpeg4_decode_partition_a(Mpeg4DecContext *ctx) · 11 unmodified lines
994994 s->pred_dir_table[xy] = dir;
995995 } else { /* P/S_TYPE */
996996 int mx, my, pred_x, pred_y, bits;
997− int16_t *const mot_val = s->current_picture.motion_val[0][s->block_index[0]];
997+ int16_t *const mot_val = s->cur_pic.motion_val[0][s->block_index[0]];
998998 const int stride = s->b8_stride * 2;
999999
10001000 try_again:
@@ -1007,14 +1007,14 @@ try_again: · 6 unmodified lines
10071007 /* skip mb */
10081008 if (s->pict_type == AV_PICTURE_TYPE_S &&
10091009 ctx->vol_sprite_usage == GMC_SPRITE) {
1010− s->current_picture.mb_type[xy] = MB_TYPE_SKIP |
1010+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP |
10111011 MB_TYPE_16x16 |
10121012 MB_TYPE_GMC |
10131013 MB_TYPE_L0;
10141014 mx = get_amv(ctx, 0);
10151015 my = get_amv(ctx, 1);
10161016 } else {
1017− s->current_picture.mb_type[xy] = MB_TYPE_SKIP |
1017+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP |
10181018 MB_TYPE_16x16 |
10191019 MB_TYPE_L0;
10201020 mx = my = 0;
@@ -1047,7 +1047,7 @@ try_again: · 26 unmodified lines
10471047 s->mb_intra = ((cbpc & 4) != 0);
10481048
10491049 if (s->mb_intra) {
1050− s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
1050+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA;
10511051 s->mbintra_table[xy] = 1;
10521052 mot_val[0] =
10531053 mot_val[2] =
@@ -1080,12 +1080,12 @@ try_again: · 26 unmodified lines
10801080 my = ff_h263_decode_motion(s, pred_y, s->f_code);
10811081 if (my >= 0xffff)
10821082 return AVERROR_INVALIDDATA;
1083− s->current_picture.mb_type[xy] = MB_TYPE_16x16 |
1083+ s->cur_pic.mb_type[xy] = MB_TYPE_16x16 |
10841084 MB_TYPE_L0;
10851085 } else {
10861086 mx = get_amv(ctx, 0);
10871087 my = get_amv(ctx, 1);
1088− s->current_picture.mb_type[xy] = MB_TYPE_16x16 |
1088+ s->cur_pic.mb_type[xy] = MB_TYPE_16x16 |
10891089 MB_TYPE_GMC |
10901090 MB_TYPE_L0;
10911091 }
@@ -1100,7 +1100,7 @@ try_again: · 8 unmodified lines
11001100 mot_val[3 + stride] = my;
11011101 } else {
11021102 int i;
1103− s->current_picture.mb_type[xy] = MB_TYPE_8x8 |
1103+ s->cur_pic.mb_type[xy] = MB_TYPE_8x8 |
11041104 MB_TYPE_L0;
11051105 for (i = 0; i < 4; i++) {
11061106 int16_t *mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y);
@@ -1156,9 +1156,9 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count) · 49 unmodified lines
11561156 }
11571157
11581158 s->cbp_table[xy] |= cbpy << 2;
1159− s->current_picture.mb_type[xy] |= ac_pred * MB_TYPE_ACPRED;
1159+ s->cur_pic.mb_type[xy] |= ac_pred * MB_TYPE_ACPRED;
11601160 } else { /* P || S_TYPE */
1161− if (IS_INTRA(s->current_picture.mb_type[xy])) {
1161+ if (IS_INTRA(s->cur_pic.mb_type[xy])) {
11621162 int i;
11631163 int dir = 0;
11641164 int ac_pred = get_bits1(&s->gb);
@@ -1172,7 +1172,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count) · 7 unmodified lines
11721172
11731173 if (s->cbp_table[xy] & 8)
11741174 ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]);
1175− s->current_picture.qscale_table[xy] = s->qscale;
1175+ s->cur_pic.qscale_table[xy] = s->qscale;
11761176
11771177 for (i = 0; i < 6; i++) {
11781178 int dc_pred_dir;
@@ -1188,10 +1188,10 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count) · 9 unmodified lines
11881188 }
11891189 s->cbp_table[xy] &= 3; // remove dquant
11901190 s->cbp_table[xy] |= cbpy << 2;
1191− s->current_picture.mb_type[xy] |= ac_pred * MB_TYPE_ACPRED;
1191+ s->cur_pic.mb_type[xy] |= ac_pred * MB_TYPE_ACPRED;
11921192 s->pred_dir_table[xy] = dir;
1193− } else if (IS_SKIP(s->current_picture.mb_type[xy])) {
1194− s->current_picture.qscale_table[xy] = s->qscale;
1193+ } else if (IS_SKIP(s->cur_pic.mb_type[xy])) {
1194+ s->cur_pic.qscale_table[xy] = s->qscale;
11951195 s->cbp_table[xy] = 0;
11961196 } else {
11971197 int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc, CBPY_VLC_BITS, 1);
@@ -1204,7 +1204,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count) · 6 unmodified lines
12041204
12051205 if (s->cbp_table[xy] & 8)
12061206 ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]);
1207− s->current_picture.qscale_table[xy] = s->qscale;
1207+ s->cur_pic.qscale_table[xy] = s->qscale;
12081208
12091209 s->cbp_table[xy] &= 3; // remove dquant
12101210 s->cbp_table[xy] |= (cbpy ^ 0xf) << 2;
@@ -1567,20 +1567,20 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64]) · 356 unmodified lines
15671567
15681568 av_assert2(s == (void*)ctx);
15691569
1570− mb_type = s->current_picture.mb_type[xy];
1570+ mb_type = s->cur_pic.mb_type[xy];
15711571 cbp = s->cbp_table[xy];
15721572
15731573 use_intra_dc_vlc = s->qscale < ctx->intra_dc_threshold;
15741574
1575− if (s->current_picture.qscale_table[xy] != s->qscale)
1576− ff_set_qscale(s, s->current_picture.qscale_table[xy]);
1575+ if (s->cur_pic.qscale_table[xy] != s->qscale)
1576+ ff_set_qscale(s, s->cur_pic.qscale_table[xy]);
15771577
15781578 if (s->pict_type == AV_PICTURE_TYPE_P ||
15791579 s->pict_type == AV_PICTURE_TYPE_S) {
15801580 int i;
15811581 for (i = 0; i < 4; i++) {
1582− s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0];
1583− s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1];
1582+ s->mv[0][i][0] = s->cur_pic.motion_val[0][s->block_index[i]][0];
1583+ s->mv[0][i][1] = s->cur_pic.motion_val[0][s->block_index[i]][1];
15841584 }
15851585 s->mb_intra = IS_INTRA(mb_type);
15861586
@@ -1594,14 +1594,14 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64]) · 7 unmodified lines
15941594 && ctx->vol_sprite_usage == GMC_SPRITE) {
15951595 s->mcsel = 1;
15961596 s->mb_skipped = 0;
1597− s->current_picture.mbskip_table[xy] = 0;
1597+ s->cur_pic.mbskip_table[xy] = 0;
15981598 } else {
15991599 s->mcsel = 0;
16001600 s->mb_skipped = 1;
1601− s->current_picture.mbskip_table[xy] = 1;
1601+ s->cur_pic.mbskip_table[xy] = 1;
16021602 }
16031603 } else if (s->mb_intra) {
1604− s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]);
1604+ s->ac_pred = IS_ACPRED(s->cur_pic.mb_type[xy]);
16051605 } else if (!s->mb_intra) {
16061606 // s->mcsel = 0; // FIXME do we need to init that?
16071607
@@ -1614,7 +1614,7 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64]) · 6 unmodified lines
16141614 }
16151615 } else { /* I-Frame */
16161616 s->mb_intra = 1;
1617− s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]);
1617+ s->ac_pred = IS_ACPRED(s->cur_pic.mb_type[xy]);
16181618 }
16191619
16201620 if (!IS_SKIP(mb_type)) {
@@ -1673,23 +1673,23 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 52 unmodified lines
16731673 s->mv_type = MV_TYPE_16X16;
16741674 if (s->pict_type == AV_PICTURE_TYPE_S &&
16751675 ctx->vol_sprite_usage == GMC_SPRITE) {
1676− s->current_picture.mb_type[xy] = MB_TYPE_SKIP |
1676+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP |
16771677 MB_TYPE_GMC |
16781678 MB_TYPE_16x16 |
16791679 MB_TYPE_L0;
16801680 s->mcsel = 1;
16811681 s->mv[0][0][0] = get_amv(ctx, 0);
16821682 s->mv[0][0][1] = get_amv(ctx, 1);
1683− s->current_picture.mbskip_table[xy] = 0;
1683+ s->cur_pic.mbskip_table[xy] = 0;
16841684 s->mb_skipped = 0;
16851685 } else {
1686− s->current_picture.mb_type[xy] = MB_TYPE_SKIP |
1686+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP |
16871687 MB_TYPE_16x16 |
16881688 MB_TYPE_L0;
16891689 s->mcsel = 0;
16901690 s->mv[0][0][0] = 0;
16911691 s->mv[0][0][1] = 0;
1692− s->current_picture.mbskip_table[xy] = 1;
1692+ s->cur_pic.mbskip_table[xy] = 1;
16931693 s->mb_skipped = 1;
16941694 }
16951695 goto end;
@@ -1730,7 +1730,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 34 unmodified lines
17301730 s->mv_dir = MV_DIR_FORWARD;
17311731 if ((cbpc & 16) == 0) {
17321732 if (s->mcsel) {
1733− s->current_picture.mb_type[xy] = MB_TYPE_GMC |
1733+ s->cur_pic.mb_type[xy] = MB_TYPE_GMC |
17341734 MB_TYPE_16x16 |
17351735 MB_TYPE_L0;
17361736 /* 16x16 global motion prediction */
@@ -1740,7 +1740,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 3 unmodified lines
17401740 s->mv[0][0][0] = mx;
17411741 s->mv[0][0][1] = my;
17421742 } else if ((!s->progressive_sequence) && get_bits1(&s->gb)) {
1743− s->current_picture.mb_type[xy] = MB_TYPE_16x8 |
1743+ s->cur_pic.mb_type[xy] = MB_TYPE_16x8 |
17441744 MB_TYPE_L0 |
17451745 MB_TYPE_INTERLACED;
17461746 /* 16x8 field motion prediction */
@@ -1764,7 +1764,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 17 unmodified lines
17641764 s->mv[0][i][1] = my;
17651765 }
17661766 } else {
1767− s->current_picture.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
1767+ s->cur_pic.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0;
17681768 /* 16x16 motion prediction */
17691769 s->mv_type = MV_TYPE_16X16;
17701770 ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
@@ -1781,7 +1781,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 10 unmodified lines
17811781 s->mv[0][0][1] = my;
17821782 }
17831783 } else {
1784− s->current_picture.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0;
1784+ s->cur_pic.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0;
17851785 s->mv_type = MV_TYPE_8X8;
17861786 for (i = 0; i < 4; i++) {
17871787 mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y);
@@ -1814,11 +1814,11 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 26 unmodified lines
18141814 s->last_mv[i][1][1] = 0;
18151815 }
18161816
1817− ff_thread_await_progress(&s->next_picture_ptr->tf, s->mb_y, 0);
1817+ ff_thread_await_progress(&s->next_pic_ptr->tf, s->mb_y, 0);
18181818 }
18191819
18201820 /* if we skipped it in the future P-frame than skip it now too */
1821− s->mb_skipped = s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]; // Note, skiptab=0 if last was GMC
1821+ s->mb_skipped = s->next_pic.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]; // Note, skiptab=0 if last was GMC
18221822
18231823 if (s->mb_skipped) {
18241824 /* skip mb */
@@ -1831,7 +1831,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 6 unmodified lines
18311831 s->mv[0][0][1] =
18321832 s->mv[1][0][0] =
18331833 s->mv[1][0][1] = 0;
1834− s->current_picture.mb_type[xy] = MB_TYPE_SKIP |
1834+ s->cur_pic.mb_type[xy] = MB_TYPE_SKIP |
18351835 MB_TYPE_16x16 |
18361836 MB_TYPE_L0;
18371837 goto end;
@@ -1951,7 +1951,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 113 unmodified lines
19511951 s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
19521952 mb_type |= ff_mpeg4_set_direct_mv(s, mx, my);
19531953 }
1954− s->current_picture.mb_type[xy] = mb_type;
1954+ s->cur_pic.mb_type[xy] = mb_type;
19551955 } else { /* I-Frame */
19561956 int use_intra_dc_vlc;
19571957
@@ -1970,9 +1970,9 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 12 unmodified lines
19701970 intra:
19711971 s->ac_pred = get_bits1(&s->gb);
19721972 if (s->ac_pred)
1973− s->current_picture.mb_type[xy] = MB_TYPE_INTRA | MB_TYPE_ACPRED;
1973+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA | MB_TYPE_ACPRED;
19741974 else
1975− s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
1975+ s->cur_pic.mb_type[xy] = MB_TYPE_INTRA;
19761976
19771977 cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc, CBPY_VLC_BITS, 1);
19781978 if (cbpy < 0) {
@@ -2019,11 +2019,11 @@ end: · 40 unmodified lines
20192019
20202020 if (s->pict_type == AV_PICTURE_TYPE_B) {
20212021 const int delta = s->mb_x + 1 == s->mb_width ? 2 : 1;
2022− ff_thread_await_progress(&s->next_picture_ptr->tf,
2022+ ff_thread_await_progress(&s->next_pic_ptr->tf,
20232023 (s->mb_x + delta >= s->mb_width)
20242024 ? FFMIN(s->mb_y + 1, s->mb_height - 1)
20252025 : s->mb_y, 0);
2026− if (s->next_picture.mbskip_table[xy + delta])
2026+ if (s->next_pic.mbskip_table[xy + delta])
20272027 return SLICE_OK;
20282028 }
20292029
libavcodec/mpeg4videoenc.c+8−8
@@ -142,7 +142,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64], · 141 unmodified lines
142142 {
143143 int score = 0;
144144 int i, n;
145− int8_t *const qscale_table = s->current_picture.qscale_table;
145+ int8_t *const qscale_table = s->cur_pic.qscale_table;
146146
147147 memcpy(zigzag_last_index, s->block_last_index, sizeof(int) * 6);
148148
@@ -222,7 +222,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64], · 73 unmodified lines
222222 void ff_clean_mpeg4_qscales(MpegEncContext *s)
223223 {
224224 int i;
225− int8_t *const qscale_table = s->current_picture.qscale_table;
225+ int8_t *const qscale_table = s->cur_pic.qscale_table;
226226
227227 ff_clean_h263_qscales(s);
228228
@@ -511,7 +511,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], · 282 unmodified lines
511511 av_assert2(mb_type >= 0);
512512
513513 /* nothing to do if this MB was skipped in the next P-frame */
514− if (s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { // FIXME avoid DCT & ...
514+ if (s->next_pic.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { // FIXME avoid DCT & ...
515515 s->mv[0][0][0] =
516516 s->mv[0][0][1] =
517517 s->mv[1][0][0] =
@@ -644,7 +644,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], · 126 unmodified lines
644644 y = s->mb_y * 16;
645645
646646 offset = x + y * s->linesize;
647− p_pic = s->new_picture->data[0] + offset;
647+ p_pic = s->new_pic->data[0] + offset;
648648
649649 s->mb_skipped = 1;
650650 for (i = 0; i < s->max_b_frames; i++) {
@@ -777,8 +777,8 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], · 126 unmodified lines
777777 ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y);
778778
779779 ff_h263_encode_motion_vector(s,
780− s->current_picture.motion_val[0][s->block_index[i]][0] - pred_x,
781− s->current_picture.motion_val[0][s->block_index[i]][1] - pred_y,
780+ s->cur_pic.motion_val[0][s->block_index[i]][0] - pred_x,
781+ s->cur_pic.motion_val[0][s->block_index[i]][1] - pred_y,
782782 s->f_code);
783783 }
784784 }
@@ -886,7 +886,7 @@ static void mpeg4_encode_gop_header(MpegEncContext *s) · 101 unmodified lines
886886 put_bits(&s->pb, 16, 0);
887887 put_bits(&s->pb, 16, GOP_STARTCODE);
888888
889− time = s->current_picture_ptr->f->pts;
889+ time = s->cur_pic_ptr->f->pts;
890890 if (s->reordered_input_picture[1])
891891 time = FFMIN(time, s->reordered_input_picture[1]->f->pts);
892892 time = time * s->avctx->time_base.num;
@@ -1098,7 +1098,7 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s) · 205 unmodified lines
10981098 }
10991099 put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */
11001100 if (!s->progressive_sequence) {
1101− put_bits(&s->pb, 1, !!(s->current_picture_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST));
1101+ put_bits(&s->pb, 1, !!(s->cur_pic_ptr->f->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST));
11021102 put_bits(&s->pb, 1, s->alternate_scan);
11031103 }
11041104 // FIXME sprite stuff
libavcodec/mpeg_er.c+6−6
@@ -49,9 +49,9 @@ void ff_mpeg_er_frame_start(MpegEncContext *s) · 48 unmodified lines
4949 {
5050 ERContext *er = &s->er;
5151
52− set_erpic(&er->cur_pic, s->current_picture_ptr);
53− set_erpic(&er->next_pic, s->next_picture_ptr);
54− set_erpic(&er->last_pic, s->last_picture_ptr);
52+ set_erpic(&er->cur_pic, s->cur_pic_ptr);
53+ set_erpic(&er->next_pic, s->next_pic_ptr);
54+ set_erpic(&er->last_pic, s->last_pic_ptr);
5555
5656 er->pp_time = s->pp_time;
5757 er->pb_time = s->pb_time;
@@ -84,13 +84,13 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, · 26 unmodified lines
8484 if (!s->chroma_y_shift)
8585 s->bdsp.clear_blocks(s->block[6]);
8686
87− s->dest[0] = s->current_picture.f->data[0] +
87+ s->dest[0] = s->cur_pic.f->data[0] +
8888 s->mb_y * 16 * s->linesize +
8989 s->mb_x * 16;
90− s->dest[1] = s->current_picture.f->data[1] +
90+ s->dest[1] = s->cur_pic.f->data[1] +
9191 s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize +
9292 s->mb_x * (16 >> s->chroma_x_shift);
93− s->dest[2] = s->current_picture.f->data[2] +
93+ s->dest[2] = s->cur_pic.f->data[2] +
9494 s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize +
9595 s->mb_x * (16 >> s->chroma_x_shift);
9696
libavcodec/mpegvideo.c+17−17
@@ -678,9 +678,9 @@ int ff_mpv_init_context_frame(MpegEncContext *s) · 677 unmodified lines
678678 static void clear_context(MpegEncContext *s)
679679 {
680680 memset(&s->buffer_pools, 0, sizeof(s->buffer_pools));
681− memset(&s->next_picture, 0, sizeof(s->next_picture));
682− memset(&s->last_picture, 0, sizeof(s->last_picture));
683− memset(&s->current_picture, 0, sizeof(s->current_picture));
681+ memset(&s->next_pic, 0, sizeof(s->next_pic));
682+ memset(&s->last_pic, 0, sizeof(s->last_pic));
683+ memset(&s->cur_pic, 0, sizeof(s->cur_pic));
684684
685685 memset(s->thread_context, 0, sizeof(s->thread_context));
686686
@@ -763,9 +763,9 @@ av_cold int ff_mpv_common_init(MpegEncContext *s) · 76 unmodified lines
763763 goto fail_nomem;
764764 }
765765
766− if (!(s->next_picture.f = av_frame_alloc()) ||
767− !(s->last_picture.f = av_frame_alloc()) ||
768− !(s->current_picture.f = av_frame_alloc()))
766+ if (!(s->next_pic.f = av_frame_alloc()) ||
767+ !(s->last_pic.f = av_frame_alloc()) ||
768+ !(s->cur_pic.f = av_frame_alloc()))
769769 goto fail_nomem;
770770
771771 if ((ret = ff_mpv_init_context_frame(s)))
@@ -840,15 +840,15 @@ void ff_mpv_common_end(MpegEncContext *s) · 68 unmodified lines
840840 ff_mpv_picture_free(&s->picture[i]);
841841 }
842842 av_freep(&s->picture);
843− ff_mpv_picture_free(&s->last_picture);
844− ff_mpv_picture_free(&s->current_picture);
845− ff_mpv_picture_free(&s->next_picture);
843+ ff_mpv_picture_free(&s->last_pic);
844+ ff_mpv_picture_free(&s->cur_pic);
845+ ff_mpv_picture_free(&s->next_pic);
846846
847847 s->context_initialized = 0;
848848 s->context_reinit = 0;
849− s->last_picture_ptr =
850− s->next_picture_ptr =
851− s->current_picture_ptr = NULL;
849+ s->last_pic_ptr =
850+ s->next_pic_ptr =
851+ s->cur_pic_ptr = NULL;
852852 s->linesize = s->uvlinesize = 0;
853853 }
854854
@@ -881,8 +881,8 @@ void ff_clean_intra_table_entries(MpegEncContext *s) · 26 unmodified lines
881881 }
882882
883883 void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename
884− const int linesize = s->current_picture.f->linesize[0]; //not s->linesize as this would be wrong for field pics
885− const int uvlinesize = s->current_picture.f->linesize[1];
884+ const int linesize = s->cur_pic.f->linesize[0]; //not s->linesize as this would be wrong for field pics
885+ const int uvlinesize = s->cur_pic.f->linesize[1];
886886 const int width_of_mb = (4 + (s->avctx->bits_per_raw_sample > 8)) - s->avctx->lowres;
887887 const int height_of_mb = 4 - s->avctx->lowres;
888888
@@ -894,9 +894,9 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename · 5 unmodified lines
894894 s->block_index[5]= s->mb_stride*(s->mb_y + s->mb_height + 2) + s->b8_stride*s->mb_height*2 + s->mb_x - 1;
895895 //block_index is not used by mpeg2, so it is not affected by chroma_format
896896
897− s->dest[0] = s->current_picture.f->data[0] + (int)((s->mb_x - 1U) << width_of_mb);
898− s->dest[1] = s->current_picture.f->data[1] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift));
899− s->dest[2] = s->current_picture.f->data[2] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift));
897+ s->dest[0] = s->cur_pic.f->data[0] + (int)((s->mb_x - 1U) << width_of_mb);
898+ s->dest[1] = s->cur_pic.f->data[1] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift));
899+ s->dest[2] = s->cur_pic.f->data[2] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift));
900900
901901 if (s->picture_structure == PICT_FRAME) {
902902 s->dest[0] += s->mb_y * linesize << height_of_mb;
libavcodec/mpegvideo.h+7−7
@@ -156,29 +156,29 @@ typedef struct MpegEncContext { · 155 unmodified lines
156156 * copy of the previous picture structure.
157157 * note, linesize & data, might not match the previous picture (for field pictures)
158158 */
159− Picture last_picture;
159+ Picture last_pic;
160160
161161 /**
162162 * copy of the next picture structure.
163163 * note, linesize & data, might not match the next picture (for field pictures)
164164 */
165− Picture next_picture;
165+ Picture next_pic;
166166
167167 /**
168168 * Reference to the source picture for encoding.
169169 * note, linesize & data, might not match the source picture (for field pictures)
170170 */
171− AVFrame *new_picture;
171+ AVFrame *new_pic;
172172
173173 /**
174174 * copy of the current picture structure.
175175 * note, linesize & data, might not match the current picture (for field pictures)
176176 */
177− Picture current_picture; ///< buffer to store the decompressed current picture
177+ Picture cur_pic; ///< buffer to store the decompressed current picture
178178
179− Picture *last_picture_ptr; ///< pointer to the previous picture.
180− Picture *next_picture_ptr; ///< pointer to the next picture (for bidir pred)
181− Picture *current_picture_ptr; ///< pointer to the current picture
179+ Picture *last_pic_ptr; ///< pointer to the previous picture.
180+ Picture *next_pic_ptr; ///< pointer to the next picture (for bidir pred)
181+ Picture *cur_pic_ptr; ///< pointer to the current picture
182182 int skipped_last_frame;
183183 int last_dc[3]; ///< last DC values for MPEG-1
184184 int16_t *dc_val_base;
libavcodec/mpegvideo_dec.c+63−65
@@ -122,9 +122,9 @@ do {\ · 121 unmodified lines
122122 }\
123123 } while (0)
124124
125− UPDATE_PICTURE(current_picture);
126− UPDATE_PICTURE(last_picture);
127− UPDATE_PICTURE(next_picture);
125+ UPDATE_PICTURE(cur_pic);
126+ UPDATE_PICTURE(last_pic);
127+ UPDATE_PICTURE(next_pic);
128128
129129 s->linesize = s1->linesize;
130130 s->uvlinesize = s1->uvlinesize;
@@ -134,9 +134,9 @@ do {\ · 3 unmodified lines
134134 pic < old_ctx->picture + MAX_PICTURE_COUNT) ? \
135135 &new_ctx->picture[pic - old_ctx->picture] : NULL)
136136
137− s->last_picture_ptr = REBASE_PICTURE(s1->last_picture_ptr, s, s1);
138− s->current_picture_ptr = REBASE_PICTURE(s1->current_picture_ptr, s, s1);
139− s->next_picture_ptr = REBASE_PICTURE(s1->next_picture_ptr, s, s1);
137+ s->last_pic_ptr = REBASE_PICTURE(s1->last_pic_ptr, s, s1);
138+ s->cur_pic_ptr = REBASE_PICTURE(s1->cur_pic_ptr, s, s1);
139+ s->next_pic_ptr = REBASE_PICTURE(s1->next_pic_ptr, s, s1);
140140
141141 // Error/bug resilience
142142 s->workaround_bugs = s1->workaround_bugs;
@@ -193,9 +193,9 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s) · 50 unmodified lines
193193
194194 ff_mpv_free_context_frame(s);
195195
196− s->last_picture_ptr =
197− s->next_picture_ptr =
198− s->current_picture_ptr = NULL;
196+ s->last_pic_ptr =
197+ s->next_pic_ptr =
198+ s->cur_pic_ptr = NULL;
199199
200200 if ((s->width || s->height) &&
201201 (err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
@@ -326,9 +326,9 @@ int ff_mpv_alloc_dummy_frames(MpegEncContext *s) · 124 unmodified lines
326326 AVCodecContext *avctx = s->avctx;
327327 int ret;
328328
329− if ((!s->last_picture_ptr || !s->last_picture_ptr->f->buf[0]) &&
329+ if ((!s->last_pic_ptr || !s->last_pic_ptr->f->buf[0]) &&
330330 (s->pict_type != AV_PICTURE_TYPE_I)) {
331− if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture_ptr && s->next_picture_ptr->f->buf[0])
331+ if (s->pict_type == AV_PICTURE_TYPE_B && s->next_pic_ptr && s->next_pic_ptr->f->buf[0])
332332 av_log(avctx, AV_LOG_DEBUG,
333333 "allocating dummy last picture for B frame\n");
334334 else if (s->codec_id != AV_CODEC_ID_H261 /* H.261 has no keyframes */ &&
@@ -337,25 +337,25 @@ int ff_mpv_alloc_dummy_frames(MpegEncContext *s) · 2 unmodified lines
337337 "warning: first frame is no keyframe\n");
338338
339339 /* Allocate a dummy frame */
340− ret = alloc_dummy_frame(s, &s->last_picture_ptr, &s->last_picture);
340+ ret = alloc_dummy_frame(s, &s->last_pic_ptr, &s->last_pic);
341341 if (ret < 0)
342342 return ret;
343343
344344 if (!avctx->hwaccel) {
345345 int luma_val = s->codec_id == AV_CODEC_ID_FLV1 || s->codec_id == AV_CODEC_ID_H263 ? 16 : 0x80;
346− color_frame(s->last_picture_ptr->f, luma_val);
346+ color_frame(s->last_pic_ptr->f, luma_val);
347347 }
348348 }
349− if ((!s->next_picture_ptr || !s->next_picture_ptr->f->buf[0]) &&
349+ if ((!s->next_pic_ptr || !s->next_pic_ptr->f->buf[0]) &&
350350 s->pict_type == AV_PICTURE_TYPE_B) {
351351 /* Allocate a dummy frame */
352− ret = alloc_dummy_frame(s, &s->next_picture_ptr, &s->next_picture);
352+ ret = alloc_dummy_frame(s, &s->next_pic_ptr, &s->next_pic);
353353 if (ret < 0)
354354 return ret;
355355 }
356356
357− av_assert0(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr &&
358− s->last_picture_ptr->f->buf[0]));
357+ av_assert0(s->pict_type == AV_PICTURE_TYPE_I || (s->last_pic_ptr &&
358+ s->last_pic_ptr->f->buf[0]));
359359
360360 return 0;
361361 }
@@ -376,67 +376,65 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 14 unmodified lines
376376 }
377377
378378 /* mark & release old frames */
379− if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
380− s->last_picture_ptr != s->next_picture_ptr &&
381− s->last_picture_ptr->f->buf[0]) {
382− ff_mpeg_unref_picture(s->last_picture_ptr);
379+ if (s->pict_type != AV_PICTURE_TYPE_B && s->last_pic_ptr &&
380+ s->last_pic_ptr != s->next_pic_ptr &&
381+ s->last_pic_ptr->f->buf[0]) {
382+ ff_mpeg_unref_picture(s->last_pic_ptr);
383383 }
384384
385385 /* release non reference/forgotten frames */
386386 for (int i = 0; i < MAX_PICTURE_COUNT; i++) {
387387 if (!s->picture[i].reference ||
388− (&s->picture[i] != s->last_picture_ptr &&
389− &s->picture[i] != s->next_picture_ptr)) {
388+ (&s->picture[i] != s->last_pic_ptr &&
389+ &s->picture[i] != s->next_pic_ptr)) {
390390 ff_mpeg_unref_picture(&s->picture[i]);
391391 }
392392 }
393393
394− ff_mpeg_unref_picture(&s->current_picture);
395− ff_mpeg_unref_picture(&s->last_picture);
396− ff_mpeg_unref_picture(&s->next_picture);
394+ ff_mpeg_unref_picture(&s->cur_pic);
395+ ff_mpeg_unref_picture(&s->last_pic);
396+ ff_mpeg_unref_picture(&s->next_pic);
397397
398− ret = alloc_picture(s, &s->current_picture_ptr,
398+ ret = alloc_picture(s, &s->cur_pic_ptr,
399399 s->pict_type != AV_PICTURE_TYPE_B && !s->droppable);
400400 if (ret < 0)
401401 return ret;
402402
403− s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!s->top_field_first;
404− s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (!s->progressive_frame &&
405− !s->progressive_sequence);
406− s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME;
403+ s->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!s->top_field_first;
404+ s->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED *
405+ (!s->progressive_frame && !s->progressive_sequence);
406+ s->cur_pic_ptr->field_picture = s->picture_structure != PICT_FRAME;
407407
408− s->current_picture_ptr->f->pict_type = s->pict_type;
408+ s->cur_pic_ptr->f->pict_type = s->pict_type;
409409 if (s->pict_type == AV_PICTURE_TYPE_I)
410− s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_KEY;
410+ s->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_KEY;
411411 else
412− s->current_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY;
412+ s->cur_pic_ptr->f->flags &= ~AV_FRAME_FLAG_KEY;
413413
414− if ((ret = ff_mpeg_ref_picture(&s->current_picture,
415− s->current_picture_ptr)) < 0)
414+ if ((ret = ff_mpeg_ref_picture(&s->cur_pic, s->cur_pic_ptr)) < 0)
416415 return ret;
417416
418417 if (s->pict_type != AV_PICTURE_TYPE_B) {
419− s->last_picture_ptr = s->next_picture_ptr;
418+ s->last_pic_ptr = s->next_pic_ptr;
420419 if (!s->droppable)
421− s->next_picture_ptr = s->current_picture_ptr;
420+ s->next_pic_ptr = s->cur_pic_ptr;
422421 }
423422 ff_dlog(s->avctx, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
424− s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr,
425− s->last_picture_ptr ? s->last_picture_ptr->f->data[0] : NULL,
426− s->next_picture_ptr ? s->next_picture_ptr->f->data[0] : NULL,
427− s->current_picture_ptr ? s->current_picture_ptr->f->data[0] : NULL,
423+ s->last_pic_ptr, s->next_pic_ptr, s->cur_pic_ptr,
424+ s->last_pic_ptr ? s->last_pic_ptr->f->data[0] : NULL,
425+ s->next_pic_ptr ? s->next_pic_ptr->f->data[0] : NULL,
426+ s->cur_pic_ptr ? s->cur_pic_ptr->f->data[0] : NULL,
428427 s->pict_type, s->droppable);
429428
430− if (s->last_picture_ptr) {
431− if (s->last_picture_ptr->f->buf[0] &&
432− (ret = ff_mpeg_ref_picture(&s->last_picture,
433− s->last_picture_ptr)) < 0)
429+ if (s->last_pic_ptr) {
430+ if (s->last_pic_ptr->f->buf[0] &&
431+ (ret = ff_mpeg_ref_picture(&s->last_pic,
432+ s->last_pic_ptr)) < 0)
434433 return ret;
435434 }
436− if (s->next_picture_ptr) {
437− if (s->next_picture_ptr->f->buf[0] &&
438− (ret = ff_mpeg_ref_picture(&s->next_picture,
439− s->next_picture_ptr)) < 0)
435+ if (s->next_pic_ptr) {
436+ if (s->next_pic_ptr->f->buf[0] &&
437+ (ret = ff_mpeg_ref_picture(&s->next_pic, s->next_pic_ptr)) < 0)
440438 return ret;
441439 }
442440
@@ -459,7 +457,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 16 unmodified lines
459457 }
460458
461459 if (s->avctx->debug & FF_DEBUG_NOMC)
462− color_frame(s->current_picture_ptr->f, 0x80);
460+ color_frame(s->cur_pic_ptr->f, 0x80);
463461
464462 return 0;
465463 }
@@ -469,8 +467,8 @@ void ff_mpv_frame_end(MpegEncContext *s) · 3 unmodified lines
469467 {
470468 emms_c();
471469
472− if (s->current_picture.reference)
473− ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
470+ if (s->cur_pic.reference)
471+ ff_thread_report_progress(&s->cur_pic_ptr->tf, INT_MAX, 0);
474472 }
475473
476474 void ff_print_debug_info(const MpegEncContext *s, const Picture *p, AVFrame *pict)
@@ -512,8 +510,8 @@ int ff_mpv_export_qp_table(const MpegEncContext *s, AVFrame *f, const Picture *p · 35 unmodified lines
512510
513511 void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
514512 {
515− ff_draw_horiz_band(s->avctx, s->current_picture_ptr->f,
516− s->last_picture_ptr ? s->last_picture_ptr->f : NULL,
513+ ff_draw_horiz_band(s->avctx, s->cur_pic_ptr->f,
514+ s->last_pic_ptr ? s->last_pic_ptr->f : NULL,
517515 y, h, s->picture_structure,
518516 s->first_field, s->low_delay);
519517 }
@@ -527,11 +525,11 @@ void ff_mpeg_flush(AVCodecContext *avctx) · 7 unmodified lines
527525
528526 for (int i = 0; i < MAX_PICTURE_COUNT; i++)
529527 ff_mpeg_unref_picture(&s->picture[i]);
530− s->current_picture_ptr = s->last_picture_ptr = s->next_picture_ptr = NULL;
528+ s->cur_pic_ptr = s->last_pic_ptr = s->next_pic_ptr = NULL;
531529
532− ff_mpeg_unref_picture(&s->current_picture);
533− ff_mpeg_unref_picture(&s->last_picture);
534− ff_mpeg_unref_picture(&s->next_picture);
530+ ff_mpeg_unref_picture(&s->cur_pic);
531+ ff_mpeg_unref_picture(&s->last_pic);
532+ ff_mpeg_unref_picture(&s->next_pic);
535533
536534 s->mb_x = s->mb_y = 0;
537535
@@ -542,7 +540,7 @@ void ff_mpeg_flush(AVCodecContext *avctx) · 4 unmodified lines
542540 void ff_mpv_report_decode_progress(MpegEncContext *s)
543541 {
544542 if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame && !s->er.error_occurred)
545− ff_thread_report_progress(&s->current_picture_ptr->tf, s->mb_y, 0);
543+ ff_thread_report_progress(&s->cur_pic_ptr->tf, s->mb_y, 0);
546544 }
547545
548546
@@ -615,8 +613,8 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, · 66 unmodified lines
615613 const int h_edge_pos = s->h_edge_pos >> lowres;
616614 const int v_edge_pos = s->v_edge_pos >> lowres;
617615 int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
618− linesize = s->current_picture.f->linesize[0] << field_based;
619− uvlinesize = s->current_picture.f->linesize[1] << field_based;
616+ linesize = s->cur_pic.f->linesize[0] << field_based;
617+ uvlinesize = s->cur_pic.f->linesize[1] << field_based;
620618
621619 // FIXME obviously not perfect but qpel will not work in lowres anyway
622620 if (s->quarter_sample) {
@@ -861,7 +859,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s, · 238 unmodified lines
861859 } else {
862860 if (s->picture_structure != s->field_select[dir][0] + 1 &&
863861 s->pict_type != AV_PICTURE_TYPE_B && !s->first_field) {
864− ref_picture = s->current_picture_ptr->f->data;
862+ ref_picture = s->cur_pic_ptr->f->data;
865863 }
866864 mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
867865 0, 0, s->field_select[dir][0],
@@ -878,7 +876,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s, · 10 unmodified lines
878876 s->pict_type == AV_PICTURE_TYPE_B || s->first_field) {
879877 ref2picture = ref_picture;
880878 } else {
881− ref2picture = s->current_picture_ptr->f->data;
879+ ref2picture = s->cur_pic_ptr->f->data;
882880 }
883881
884882 mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
@@ -919,7 +917,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s, · 34 unmodified lines
919917 // opposite parity is always in the same
920918 // frame if this is second field
921919 if (!s->first_field) {
922− ref_picture = s->current_picture_ptr->f->data;
920+ ref_picture = s->cur_pic_ptr->f->data;
923921 }
924922 }
925923 }
libavcodec/mpegvideo_enc.c+89−93
@@ -231,11 +231,11 @@ void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix) · 230 unmodified lines
231231 }
232232
233233 /**
234− * init s->current_picture.qscale_table from s->lambda_table
234+ * init s->cur_pic.qscale_table from s->lambda_table
235235 */
236236 void ff_init_qscale_tab(MpegEncContext *s)
237237 {
238− int8_t * const qscale_table = s->current_picture.qscale_table;
238+ int8_t * const qscale_table = s->cur_pic.qscale_table;
239239 int i;
240240
241241 for (i = 0; i < s->mb_num; i++) {
@@ -821,7 +821,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 579 unmodified lines
821821 !FF_ALLOCZ_TYPED_ARRAY(s->q_inter_matrix16, 32) ||
822822 !FF_ALLOCZ_TYPED_ARRAY(s->input_picture, MAX_B_FRAMES + 1) ||
823823 !FF_ALLOCZ_TYPED_ARRAY(s->reordered_input_picture, MAX_B_FRAMES + 1) ||
824− !(s->new_picture = av_frame_alloc()))
824+ !(s->new_pic = av_frame_alloc()))
825825 return AVERROR(ENOMEM);
826826
827827 /* Allocate MV tables; the MV and MB tables will be copied
@@ -996,7 +996,7 @@ av_cold int ff_mpv_encode_end(AVCodecContext *avctx) · 168 unmodified lines
996996 for (i = 0; i < FF_ARRAY_ELEMS(s->tmp_frames); i++)
997997 av_frame_free(&s->tmp_frames[i]);
998998
999− av_frame_free(&s->new_picture);
999+ av_frame_free(&s->new_pic);
10001000
10011001 av_freep(&avctx->stats_out);
10021002
@@ -1340,7 +1340,6 @@ static int estimate_best_b_count(MpegEncContext *s) · 337 unmodified lines
13401340 return AVERROR(ENOMEM);
13411341
13421342 //emms_c();
1343− //s->next_picture_ptr->quality;
13441343 p_lambda = s->last_lambda_for[AV_PICTURE_TYPE_P];
13451344 //p_lambda * FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset;
13461345 b_lambda = s->last_lambda_for[AV_PICTURE_TYPE_B];
@@ -1351,7 +1350,7 @@ static int estimate_best_b_count(MpegEncContext *s) · 4 unmodified lines
13511350
13521351 for (i = 0; i < s->max_b_frames + 2; i++) {
13531352 const Picture *pre_input_ptr = i ? s->input_picture[i - 1] :
1354− s->next_picture_ptr;
1353+ s->next_pic_ptr;
13551354
13561355 if (pre_input_ptr) {
13571356 const uint8_t *data[4];
@@ -1479,8 +1478,8 @@ static int select_input_picture(MpegEncContext *s) · 121 unmodified lines
14791478 if (!s->reordered_input_picture[0] && s->input_picture[0]) {
14801479 if (s->frame_skip_threshold || s->frame_skip_factor) {
14811480 if (s->picture_in_gop_number < s->gop_size &&
1482− s->next_picture_ptr &&
1483− skip_check(s, s->input_picture[0], s->next_picture_ptr)) {
1481+ s->next_pic_ptr &&
1482+ skip_check(s, s->input_picture[0], s->next_pic_ptr)) {
14841483 // FIXME check that the gop check above is +-1 correct
14851484 ff_mpeg_unref_picture(s->input_picture[0]);
14861485
@@ -1491,7 +1490,7 @@ static int select_input_picture(MpegEncContext *s) · 4 unmodified lines
14911490 }
14921491
14931492 if (/*s->picture_in_gop_number >= s->gop_size ||*/
1494− !s->next_picture_ptr || s->intra_only) {
1493+ !s->next_pic_ptr || s->intra_only) {
14951494 s->reordered_input_picture[0] = s->input_picture[0];
14961495 s->reordered_input_picture[0]->f->pict_type = AV_PICTURE_TYPE_I;
14971496 s->reordered_input_picture[0]->coded_picture_number =
@@ -1594,14 +1593,14 @@ static int select_input_picture(MpegEncContext *s) · 96 unmodified lines
15941593 }
15951594 }
15961595 no_output_pic:
1597− av_frame_unref(s->new_picture);
1596+ av_frame_unref(s->new_pic);
15981597
15991598 if (s->reordered_input_picture[0]) {
16001599 s->reordered_input_picture[0]->reference =
16011600 s->reordered_input_picture[0]->f->pict_type !=
16021601 AV_PICTURE_TYPE_B ? 3 : 0;
16031602
1604− if ((ret = av_frame_ref(s->new_picture,
1603+ if ((ret = av_frame_ref(s->new_pic,
16051604 s->reordered_input_picture[0]->f)))
16061605 goto fail;
16071606
@@ -1631,16 +1630,16 @@ no_output_pic: · 23 unmodified lines
16311630 /* mark us unused / free shared pic */
16321631 ff_mpeg_unref_picture(s->reordered_input_picture[0]);
16331632
1634− s->current_picture_ptr = pic;
1633+ s->cur_pic_ptr = pic;
16351634 } else {
16361635 // input is not a shared pix -> reuse buffer for current_pix
1637− s->current_picture_ptr = s->reordered_input_picture[0];
1636+ s->cur_pic_ptr = s->reordered_input_picture[0];
16381637 for (i = 0; i < 4; i++) {
1639− if (s->new_picture->data[i])
1640− s->new_picture->data[i] += INPLACE_OFFSET;
1638+ if (s->new_pic->data[i])
1639+ s->new_pic->data[i] += INPLACE_OFFSET;
16411640 }
16421641 }
1643− s->picture_number = s->current_picture_ptr->display_picture_number;
1642+ s->picture_number = s->cur_pic_ptr->display_picture_number;
16441643
16451644 }
16461645 return 0;
@@ -1652,24 +1651,24 @@ fail: · 5 unmodified lines
16521651 static void frame_end(MpegEncContext *s)
16531652 {
16541653 if (s->unrestricted_mv &&
1655− s->current_picture.reference &&
1654+ s->cur_pic.reference &&
16561655 !s->intra_only) {
16571656 int hshift = s->chroma_x_shift;
16581657 int vshift = s->chroma_y_shift;
1659− s->mpvencdsp.draw_edges(s->current_picture.f->data[0],
1660− s->current_picture.f->linesize[0],
1658+ s->mpvencdsp.draw_edges(s->cur_pic.f->data[0],
1659+ s->cur_pic.f->linesize[0],
16611660 s->h_edge_pos, s->v_edge_pos,
16621661 EDGE_WIDTH, EDGE_WIDTH,
16631662 EDGE_TOP | EDGE_BOTTOM);
1664− s->mpvencdsp.draw_edges(s->current_picture.f->data[1],
1665− s->current_picture.f->linesize[1],
1663+ s->mpvencdsp.draw_edges(s->cur_pic.f->data[1],
1664+ s->cur_pic.f->linesize[1],
16661665 s->h_edge_pos >> hshift,
16671666 s->v_edge_pos >> vshift,
16681667 EDGE_WIDTH >> hshift,
16691668 EDGE_WIDTH >> vshift,
16701669 EDGE_TOP | EDGE_BOTTOM);
1671− s->mpvencdsp.draw_edges(s->current_picture.f->data[2],
1672− s->current_picture.f->linesize[2],
1670+ s->mpvencdsp.draw_edges(s->cur_pic.f->data[2],
1671+ s->cur_pic.f->linesize[2],
16731672 s->h_edge_pos >> hshift,
16741673 s->v_edge_pos >> vshift,
16751674 EDGE_WIDTH >> hshift,
@@ -1680,7 +1679,7 @@ static void frame_end(MpegEncContext *s) · 4 unmodified lines
16801679 emms_c();
16811680
16821681 s->last_pict_type = s->pict_type;
1683− s->last_lambda_for [s->pict_type] = s->current_picture_ptr->f->quality;
1682+ s->last_lambda_for [s->pict_type] = s->cur_pic_ptr->f->quality;
16841683 if (s->pict_type!= AV_PICTURE_TYPE_B)
16851684 s->last_non_b_pict_type = s->pict_type;
16861685 }
@@ -1711,36 +1710,33 @@ static int frame_start(MpegEncContext *s) · 24 unmodified lines
17111710 int ret;
17121711
17131712 /* mark & release old frames */
1714− if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
1715− s->last_picture_ptr != s->next_picture_ptr &&
1716− s->last_picture_ptr->f->buf[0]) {
1717− ff_mpeg_unref_picture(s->last_picture_ptr);
1713+ if (s->pict_type != AV_PICTURE_TYPE_B && s->last_pic_ptr &&
1714+ s->last_pic_ptr != s->next_pic_ptr &&
1715+ s->last_pic_ptr->f->buf[0]) {
1716+ ff_mpeg_unref_picture(s->last_pic_ptr);
17181717 }
17191718
1720− s->current_picture_ptr->f->pict_type = s->pict_type;
1719+ s->cur_pic_ptr->f->pict_type = s->pict_type;
17211720
1722− ff_mpeg_unref_picture(&s->current_picture);
1723− if ((ret = ff_mpeg_ref_picture(&s->current_picture,
1724− s->current_picture_ptr)) < 0)
1721+ ff_mpeg_unref_picture(&s->cur_pic);
1722+ if ((ret = ff_mpeg_ref_picture(&s->cur_pic, s->cur_pic_ptr)) < 0)
17251723 return ret;
17261724
17271725 if (s->pict_type != AV_PICTURE_TYPE_B) {
1728− s->last_picture_ptr = s->next_picture_ptr;
1729− s->next_picture_ptr = s->current_picture_ptr;
1726+ s->last_pic_ptr = s->next_pic_ptr;
1727+ s->next_pic_ptr = s->cur_pic_ptr;
17301728 }
17311729
1732− if (s->last_picture_ptr) {
1733− ff_mpeg_unref_picture(&s->last_picture);
1734− if (s->last_picture_ptr->f->buf[0] &&
1735− (ret = ff_mpeg_ref_picture(&s->last_picture,
1736− s->last_picture_ptr)) < 0)
1730+ if (s->last_pic_ptr) {
1731+ ff_mpeg_unref_picture(&s->last_pic);
1732+ if (s->last_pic_ptr->f->buf[0] &&
1733+ (ret = ff_mpeg_ref_picture(&s->last_pic, s->last_pic_ptr)) < 0)
17371734 return ret;
17381735 }
1739− if (s->next_picture_ptr) {
1740− ff_mpeg_unref_picture(&s->next_picture);
1741− if (s->next_picture_ptr->f->buf[0] &&
1742− (ret = ff_mpeg_ref_picture(&s->next_picture,
1743− s->next_picture_ptr)) < 0)
1736+ if (s->next_pic_ptr) {
1737+ ff_mpeg_unref_picture(&s->next_pic);
1738+ if (s->next_pic_ptr->f->buf[0] &&
1739+ (ret = ff_mpeg_ref_picture(&s->next_pic, s->next_pic_ptr)) < 0)
17441740 return ret;
17451741 }
17461742
@@ -1771,12 +1767,12 @@ int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, · 24 unmodified lines
17711767 }
17721768
17731769 /* output? */
1774− if (s->new_picture->data[0]) {
1770+ if (s->new_pic->data[0]) {
17751771 int growing_buffer = context_count == 1 && !s->data_partitioning;
17761772 size_t pkt_size = 10000 + s->mb_width * s->mb_height *
17771773 (growing_buffer ? 64 : (MAX_MB_BYTES + 100));
17781774 if (CONFIG_MJPEG_ENCODER && avctx->codec_id == AV_CODEC_ID_MJPEG) {
1779− ret = ff_mjpeg_add_icc_profile_size(avctx, s->new_picture, &pkt_size);
1775+ ret = ff_mjpeg_add_icc_profile_size(avctx, s->new_pic, &pkt_size);
17801776 if (ret < 0)
17811777 return ret;
17821778 }
@@ -1800,7 +1796,7 @@ int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, · 17 unmodified lines
18001796 init_put_bits(&s->thread_context[i]->pb, start, end - start);
18011797 }
18021798
1803− s->pict_type = s->new_picture->pict_type;
1799+ s->pict_type = s->new_pic->pict_type;
18041800 //emms_c();
18051801 ret = frame_start(s);
18061802 if (ret < 0)
@@ -1868,7 +1864,7 @@ vbv_retry: · 61 unmodified lines
18681864 for (i = 0; i < 4; i++) {
18691865 avctx->error[i] += s->encoding_error[i];
18701866 }
1871− ff_side_data_set_encoder_stats(pkt, s->current_picture.f->quality,
1867+ ff_side_data_set_encoder_stats(pkt, s->cur_pic.f->quality,
18721868 s->encoding_error,
18731869 (avctx->flags&AV_CODEC_FLAG_PSNR) ? MPEGVIDEO_MAX_PLANES : 0,
18741870 s->pict_type);
@@ -1962,10 +1958,10 @@ vbv_retry: · 87 unmodified lines
19621958 }
19631959 s->total_bits += s->frame_bits;
19641960
1965− pkt->pts = s->current_picture.f->pts;
1966− pkt->duration = s->current_picture.f->duration;
1961+ pkt->pts = s->cur_pic.f->pts;
1962+ pkt->duration = s->cur_pic.f->duration;
19671963 if (!s->low_delay && s->pict_type != AV_PICTURE_TYPE_B) {
1968− if (!s->current_picture.coded_picture_number)
1964+ if (!s->cur_pic.coded_picture_number)
19691965 pkt->dts = pkt->pts - s->dts_delta;
19701966 else
19711967 pkt->dts = s->reordered_pts;
@@ -1975,12 +1971,12 @@ vbv_retry: · 3 unmodified lines
19751971
19761972 // the no-delay case is handled in generic code
19771973 if (avctx->codec->capabilities & AV_CODEC_CAP_DELAY) {
1978− ret = ff_encode_reordered_opaque(avctx, pkt, s->current_picture.f);
1974+ ret = ff_encode_reordered_opaque(avctx, pkt, s->cur_pic.f);
19791975 if (ret < 0)
19801976 return ret;
19811977 }
19821978
1983− if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY)
1979+ if (s->cur_pic.f->flags & AV_FRAME_FLAG_KEY)
19841980 pkt->flags |= AV_PKT_FLAG_KEY;
19851981 if (s->mb_info)
19861982 av_packet_shrink_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, s->mb_info_size);
@@ -2150,7 +2146,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, · 163 unmodified lines
21502146 update_qscale(s);
21512147
21522148 if (!(s->mpv_flags & FF_MPV_FLAG_QP_RD)) {
2153− s->qscale = s->current_picture_ptr->qscale_table[mb_xy];
2149+ s->qscale = s->cur_pic_ptr->qscale_table[mb_xy];
21542150 s->dquant = s->qscale - last_qp;
21552151
21562152 if (s->out_format == FMT_H263) {
@@ -2174,11 +2170,11 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, · 17 unmodified lines
21742170
21752171 wrap_y = s->linesize;
21762172 wrap_c = s->uvlinesize;
2177− ptr_y = s->new_picture->data[0] +
2173+ ptr_y = s->new_pic->data[0] +
21782174 (mb_y * 16 * wrap_y) + mb_x * 16;
2179− ptr_cb = s->new_picture->data[1] +
2175+ ptr_cb = s->new_pic->data[1] +
21802176 (mb_y * mb_block_height * wrap_c) + mb_x * mb_block_width;
2181− ptr_cr = s->new_picture->data[2] +
2177+ ptr_cr = s->new_pic->data[2] +
21822178 (mb_y * mb_block_height * wrap_c) + mb_x * mb_block_width;
21832179
21842180 if((mb_x * 16 + 16 > s->width || mb_y * 16 + 16 > s->height) && s->codec_id != AV_CODEC_ID_AMV){
@@ -2273,14 +2269,14 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, · 88 unmodified lines
22732269
22742270 if (s->mv_dir & MV_DIR_FORWARD) {
22752271 ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 0,
2276− s->last_picture.f->data,
2272+ s->last_pic.f->data,
22772273 op_pix, op_qpix);
22782274 op_pix = s->hdsp.avg_pixels_tab;
22792275 op_qpix = s->qdsp.avg_qpel_pixels_tab;
22802276 }
22812277 if (s->mv_dir & MV_DIR_BACKWARD) {
22822278 ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 1,
2283− s->next_picture.f->data,
2279+ s->next_pic.f->data,
22842280 op_pix, op_qpix);
22852281 }
22862282
@@ -2664,26 +2660,26 @@ static int sse_mb(MpegEncContext *s){ · 377 unmodified lines
26642660
26652661 if(w==16 && h==16)
26662662 if(s->avctx->mb_cmp == FF_CMP_NSSE){
2667− return s->mecc.nsse[0](s, s->new_picture->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16,
2663+ return s->mecc.nsse[0](s, s->new_pic->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16,
26682664 s->dest[0], s->linesize, 16) +
2669− s->mecc.nsse[1](s, s->new_picture->data[1] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
2665+ s->mecc.nsse[1](s, s->new_pic->data[1] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
26702666 s->dest[1], s->uvlinesize, chroma_mb_h) +
2671− s->mecc.nsse[1](s, s->new_picture->data[2] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
2667+ s->mecc.nsse[1](s, s->new_pic->data[2] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
26722668 s->dest[2], s->uvlinesize, chroma_mb_h);
26732669 }else{
2674− return s->mecc.sse[0](NULL, s->new_picture->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16,
2670+ return s->mecc.sse[0](NULL, s->new_pic->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16,
26752671 s->dest[0], s->linesize, 16) +
2676− s->mecc.sse[1](NULL, s->new_picture->data[1] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
2672+ s->mecc.sse[1](NULL, s->new_pic->data[1] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
26772673 s->dest[1], s->uvlinesize, chroma_mb_h) +
2678− s->mecc.sse[1](NULL, s->new_picture->data[2] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
2674+ s->mecc.sse[1](NULL, s->new_pic->data[2] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
26792675 s->dest[2], s->uvlinesize, chroma_mb_h);
26802676 }
26812677 else
2682− return sse(s, s->new_picture->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16,
2678+ return sse(s, s->new_pic->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16,
26832679 s->dest[0], w, h, s->linesize) +
2684− sse(s, s->new_picture->data[1] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
2680+ sse(s, s->new_pic->data[1] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
26852681 s->dest[1], w >> s->chroma_x_shift, h >> s->chroma_y_shift, s->uvlinesize) +
2686− sse(s, s->new_picture->data[2] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
2682+ sse(s, s->new_pic->data[2] + s->mb_x * chroma_mb_w + s->mb_y * s->uvlinesize * chroma_mb_h,
26872683 s->dest[2], w >> s->chroma_x_shift, h >> s->chroma_y_shift, s->uvlinesize);
26882684 }
26892685
@@ -2739,7 +2735,7 @@ static int mb_var_thread(AVCodecContext *c, void *arg){ · 49 unmodified lines
27392735 for(mb_x=0; mb_x < s->mb_width; mb_x++) {
27402736 int xx = mb_x * 16;
27412737 int yy = mb_y * 16;
2742− const uint8_t *pix = s->new_picture->data[0] + (yy * s->linesize) + xx;
2738+ const uint8_t *pix = s->new_pic->data[0] + (yy * s->linesize) + xx;
27432739 int varc;
27442740 int sum = s->mpvencdsp.pix_sum(pix, s->linesize);
27452741
@@ -3102,8 +3098,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 356 unmodified lines
31023098 s->mv_type = MV_TYPE_8X8;
31033099 s->mb_intra= 0;
31043100 for(i=0; i<4; i++){
3105− s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0];
3106− s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1];
3101+ s->mv[0][i][0] = s->cur_pic.motion_val[0][s->block_index[i]][0];
3102+ s->mv[0][i][1] = s->cur_pic.motion_val[0][s->block_index[i]][1];
31073103 }
31083104 encode_mb_hq(s, &backup_s, &best_s, pb, pb2, tex_pb,
31093105 &dmin, &next_block, 0, 0);
@@ -3290,7 +3286,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 180 unmodified lines
32903286 }
32913287 }
32923288
3293− s->current_picture.qscale_table[xy] = best_s.qscale;
3289+ s->cur_pic.qscale_table[xy] = best_s.qscale;
32943290
32953291 copy_context_after_encode(s, &best_s);
32963292
@@ -3357,8 +3353,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 60 unmodified lines
33573353 s->mv_type = MV_TYPE_8X8;
33583354 s->mb_intra= 0;
33593355 for(i=0; i<4; i++){
3360− s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0];
3361− s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1];
3356+ s->mv[0][i][0] = s->cur_pic.motion_val[0][s->block_index[i]][0];
3357+ s->mv[0][i][1] = s->cur_pic.motion_val[0][s->block_index[i]][1];
33623358 }
33633359 break;
33643360 case CANDIDATE_MB_TYPE_DIRECT:
@@ -3459,13 +3455,13 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 94 unmodified lines
34593455 if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16;
34603456
34613457 s->encoding_error[0] += sse(
3462− s, s->new_picture->data[0] + s->mb_x*16 + s->mb_y*s->linesize*16,
3458+ s, s->new_pic->data[0] + s->mb_x*16 + s->mb_y*s->linesize*16,
34633459 s->dest[0], w, h, s->linesize);
34643460 s->encoding_error[1] += sse(
3465− s, s->new_picture->data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h,
3461+ s, s->new_pic->data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h,
34663462 s->dest[1], w>>1, h>>s->chroma_y_shift, s->uvlinesize);
34673463 s->encoding_error[2] += sse(
3468− s, s->new_picture->data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h,
3464+ s, s->new_pic->data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h,
34693465 s->dest[2], w>>1, h>>s->chroma_y_shift, s->uvlinesize);
34703466 }
34713467 if(s->loop_filter){
@@ -3522,14 +3518,14 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src) · 50 unmodified lines
35223518
35233519 static int estimate_qp(MpegEncContext *s, int dry_run){
35243520 if (s->next_lambda){
3525− s->current_picture_ptr->f->quality =
3526− s->current_picture.f->quality = s->next_lambda;
3521+ s->cur_pic_ptr->f->quality =
3522+ s->cur_pic.f->quality = s->next_lambda;
35273523 if(!dry_run) s->next_lambda= 0;
35283524 } else if (!s->fixed_qscale) {
35293525 int quality = ff_rate_estimate_qscale(s, dry_run);
3530− s->current_picture_ptr->f->quality =
3531− s->current_picture.f->quality = quality;
3532− if (s->current_picture.f->quality < 0)
3526+ s->cur_pic_ptr->f->quality =
3527+ s->cur_pic.f->quality = quality;
3528+ if (s->cur_pic.f->quality < 0)
35333529 return -1;
35343530 }
35353531
@@ -3552,15 +3548,15 @@ static int estimate_qp(MpegEncContext *s, int dry_run){ · 16 unmodified lines
35523548 s->lambda= s->lambda_table[0];
35533549 //FIXME broken
35543550 }else
3555− s->lambda = s->current_picture.f->quality;
3551+ s->lambda = s->cur_pic.f->quality;
35563552 update_qscale(s);
35573553 return 0;
35583554 }
35593555
35603556 /* must be called before writing the header */
35613557 static void set_frame_distances(MpegEncContext * s){
3562− av_assert1(s->current_picture_ptr->f->pts != AV_NOPTS_VALUE);
3563− s->time = s->current_picture_ptr->f->pts * s->avctx->time_base.num;
3558+ av_assert1(s->cur_pic_ptr->f->pts != AV_NOPTS_VALUE);
3559+ s->time = s->cur_pic_ptr->f->pts * s->avctx->time_base.num;
35643560
35653561 if(s->pict_type==AV_PICTURE_TYPE_B){
35663562 s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
@@ -3591,7 +3587,7 @@ static int encode_picture(MpegEncContext *s) · 24 unmodified lines
35913587
35923588 s->me.scene_change_score=0;
35933589
3594−// s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME rate distortion
3590+// s->lambda= s->cur_pic_ptr->quality; //FIXME qscale / ... stuff for ME rate distortion
35953591
35963592 if(s->pict_type==AV_PICTURE_TYPE_I){
35973593 if(s->msmpeg4_version >= 3) s->no_rounding=1;
@@ -3781,16 +3777,16 @@ static int encode_picture(MpegEncContext *s) · 183 unmodified lines
37813777
37823778 //FIXME var duplication
37833779 if (s->pict_type == AV_PICTURE_TYPE_I) {
3784− s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_KEY; //FIXME pic_ptr
3785− s->current_picture.f->flags |= AV_FRAME_FLAG_KEY;
3780+ s->cur_pic_ptr->f->flags |= AV_FRAME_FLAG_KEY; //FIXME pic_ptr
3781+ s->cur_pic.f->flags |= AV_FRAME_FLAG_KEY;
37863782 } else {
3787− s->current_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; //FIXME pic_ptr
3788− s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY;
3783+ s->cur_pic_ptr->f->flags &= ~AV_FRAME_FLAG_KEY; //FIXME pic_ptr
3784+ s->cur_pic.f->flags &= ~AV_FRAME_FLAG_KEY;
37893785 }
3790− s->current_picture_ptr->f->pict_type =
3791− s->current_picture.f->pict_type = s->pict_type;
3786+ s->cur_pic_ptr->f->pict_type =
3787+ s->cur_pic.f->pict_type = s->pict_type;
37923788
3793− if (s->current_picture.f->flags & AV_FRAME_FLAG_KEY)
3789+ if (s->cur_pic.f->flags & AV_FRAME_FLAG_KEY)
37943790 s->picture_in_gop_number=0;
37953791
37963792 s->mb_x = s->mb_y = 0;
libavcodec/mpegvideo_motion.c+6−6
@@ -93,8 +93,8 @@ void mpeg_motion_internal(MpegEncContext *s, · 92 unmodified lines
9393 ptrdiff_t uvlinesize, linesize;
9494
9595 v_edge_pos = s->v_edge_pos >> field_based;
96− linesize = s->current_picture.f->linesize[0] << field_based;
97− uvlinesize = s->current_picture.f->linesize[1] << field_based;
96+ linesize = s->cur_pic.f->linesize[0] << field_based;
97+ uvlinesize = s->cur_pic.f->linesize[1] << field_based;
9898 block_y_half = (field_based | is_16x8);
9999
100100 dxy = ((motion_y & 1) << 1) | (motion_x & 1);
@@ -514,7 +514,7 @@ static inline void apply_obmc(MpegEncContext *s, · 413 unmodified lines
514514 op_pixels_func (*pix_op)[4])
515515 {
516516 LOCAL_ALIGNED_8(int16_t, mv_cache, [4], [4][2]);
517− const Picture *cur_frame = &s->current_picture;
517+ const Picture *cur_frame = &s->cur_pic;
518518 int mb_x = s->mb_x;
519519 int mb_y = s->mb_y;
520520 const int xy = mb_x + mb_y * s->mb_stride;
@@ -749,7 +749,7 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s, · 228 unmodified lines
749749 av_assert2(s->out_format == FMT_MPEG1);
750750 if (s->picture_structure != s->field_select[dir][0] + 1 &&
751751 s->pict_type != AV_PICTURE_TYPE_B && !s->first_field) {
752− ref_picture = s->current_picture_ptr->f->data;
752+ ref_picture = s->cur_pic_ptr->f->data;
753753 }
754754
755755 mpeg_motion(s, dest_y, dest_cb, dest_cr,
@@ -767,7 +767,7 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s, · 11 unmodified lines
767767 s->pict_type == AV_PICTURE_TYPE_B || s->first_field) {
768768 ref2picture = ref_picture;
769769 } else {
770− ref2picture = s->current_picture_ptr->f->data;
770+ ref2picture = s->cur_pic_ptr->f->data;
771771 }
772772
773773 mpeg_motion(s, dest_y, dest_cb, dest_cr,
@@ -807,7 +807,7 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s, · 33 unmodified lines
807807 /* opposite parity is always in the same frame if this is
808808 * second field */
809809 if (!s->first_field)
810− ref_picture = s->current_picture_ptr->f->data;
810+ ref_picture = s->cur_pic_ptr->f->data;
811811 }
812812 }
813813 break;
libavcodec/mpv_reconstruct_mb_template.c+10−10
@@ -59,7 +59,7 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 58 unmodified lines
5959 #define IS_MPEG12(s) (is_mpeg12 == MAY_BE_MPEG12 ? ((s)->out_format == FMT_MPEG1) : is_mpeg12)
6060 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
6161
62− s->current_picture.qscale_table[mb_xy] = s->qscale;
62+ s->cur_pic.qscale_table[mb_xy] = s->qscale;
6363
6464 /* update DC predictors for P macroblocks */
6565 if (!s->mb_intra) {
@@ -82,8 +82,8 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 16 unmodified lines
8282 {
8383 uint8_t *dest_y, *dest_cb, *dest_cr;
8484 int dct_linesize, dct_offset;
85− const int linesize = s->current_picture.f->linesize[0]; //not s->linesize as this would be wrong for field pics
86− const int uvlinesize = s->current_picture.f->linesize[1];
85+ const int linesize = s->cur_pic.f->linesize[0]; //not s->linesize as this would be wrong for field pics
86+ const int uvlinesize = s->cur_pic.f->linesize[1];
8787 const int readable = IS_ENCODER || lowres_flag || s->pict_type != AV_PICTURE_TYPE_B;
8888 const int block_size = lowres_flag ? 8 >> s->avctx->lowres : 8;
8989
@@ -96,7 +96,7 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 6 unmodified lines
9696 s->mb_skipped = 0;
9797 av_assert2(s->pict_type!=AV_PICTURE_TYPE_I);
9898 *mbskip_ptr = 1;
99− } else if(!s->current_picture.reference) {
99+ } else if (!s->cur_pic.reference) {
100100 *mbskip_ptr = 1;
101101 } else{
102102 *mbskip_ptr = 0; /* not skipped */
@@ -124,11 +124,11 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 21 unmodified lines
124124 if (HAVE_THREADS && is_mpeg12 != DEFINITELY_MPEG12 &&
125125 s->avctx->active_thread_type & FF_THREAD_FRAME) {
126126 if (s->mv_dir & MV_DIR_FORWARD) {
127− ff_thread_await_progress(&s->last_picture_ptr->tf,
127+ ff_thread_await_progress(&s->last_pic_ptr->tf,
128128 lowest_referenced_row(s, 0), 0);
129129 }
130130 if (s->mv_dir & MV_DIR_BACKWARD) {
131− ff_thread_await_progress(&s->next_picture_ptr->tf,
131+ ff_thread_await_progress(&s->next_pic_ptr->tf,
132132 lowest_referenced_row(s, 1), 0);
133133 }
134134 }
@@ -137,11 +137,11 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 2 unmodified lines
137137 const h264_chroma_mc_func *op_pix = s->h264chroma.put_h264_chroma_pixels_tab;
138138
139139 if (s->mv_dir & MV_DIR_FORWARD) {
140− MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f->data, op_pix);
140+ MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_pic.f->data, op_pix);
141141 op_pix = s->h264chroma.avg_h264_chroma_pixels_tab;
142142 }
143143 if (s->mv_dir & MV_DIR_BACKWARD) {
144− MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f->data, op_pix);
144+ MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_pic.f->data, op_pix);
145145 }
146146 } else {
147147 op_pixels_func (*op_pix)[4];
@@ -155,12 +155,12 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], · 7 unmodified lines
155155 op_qpix = s->qdsp.put_no_rnd_qpel_pixels_tab;
156156 }
157157 if (s->mv_dir & MV_DIR_FORWARD) {
158− ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f->data, op_pix, op_qpix);
158+ ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_pic.f->data, op_pix, op_qpix);
159159 op_pix = s->hdsp.avg_pixels_tab;
160160 op_qpix = s->qdsp.avg_qpel_pixels_tab;
161161 }
162162 if (s->mv_dir & MV_DIR_BACKWARD) {
163− ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f->data, op_pix, op_qpix);
163+ ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_pic.f->data, op_pix, op_qpix);
164164 }
165165 }
166166
libavcodec/msmpeg4.c+2−2
@@ -282,10 +282,10 @@ int ff_msmpeg4_pred_dc(MpegEncContext *s, int n, · 281 unmodified lines
282282 int bs = 8 >> s->avctx->lowres;
283283 if(n<4){
284284 wrap= s->linesize;
285− dest= s->current_picture.f->data[0] + (((n >> 1) + 2*s->mb_y) * bs* wrap ) + ((n & 1) + 2*s->mb_x) * bs;
285+ dest = s->cur_pic.f->data[0] + (((n >> 1) + 2*s->mb_y) * bs* wrap ) + ((n & 1) + 2*s->mb_x) * bs;
286286 }else{
287287 wrap= s->uvlinesize;
288− dest= s->current_picture.f->data[n - 3] + (s->mb_y * bs * wrap) + s->mb_x * bs;
288+ dest = s->cur_pic.f->data[n - 3] + (s->mb_y * bs * wrap) + s->mb_x * bs;
289289 }
290290 if(s->mb_x==0) a= (1024 + (scale>>1))/scale;
291291 else a= get_dc(dest-bs, wrap, scale*8>>(2*s->avctx->lowres), bs);
libavcodec/msmpeg4dec.c+2−2
@@ -105,7 +105,7 @@ static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code) · 104 unmodified lines
105105 static int msmpeg4v12_decode_mb(MpegEncContext *s, int16_t block[6][64])
106106 {
107107 int cbp, code, i;
108− uint32_t * const mb_type_ptr = &s->current_picture.mb_type[s->mb_x + s->mb_y*s->mb_stride];
108+ uint32_t * const mb_type_ptr = &s->cur_pic.mb_type[s->mb_x + s->mb_y*s->mb_stride];
109109
110110 if (s->pict_type == AV_PICTURE_TYPE_P) {
111111 if (s->use_skip_mb_code) {
@@ -207,7 +207,7 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 95 unmodified lines
207207 {
208208 int cbp, code, i;
209209 uint8_t *coded_val;
210− uint32_t * const mb_type_ptr = &s->current_picture.mb_type[s->mb_x + s->mb_y*s->mb_stride];
210+ uint32_t * const mb_type_ptr = &s->cur_pic.mb_type[s->mb_x + s->mb_y*s->mb_stride];
211211
212212 if (get_bits_left(&s->gb) <= 0)
213213 return AVERROR_INVALIDDATA;
libavcodec/mss2.c+1−1
@@ -431,7 +431,7 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size, · 430 unmodified lines
431431
432432 ff_mpv_frame_end(s);
433433
434− f = s->current_picture.f;
434+ f = s->cur_pic.f;
435435
436436 if (v->respic == 3) {
437437 ctx->dsp.upsample_plane(f->data[0], f->linesize[0], w, h);
libavcodec/nvdec_mpeg12.c+3−3
@@ -39,7 +39,7 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer · 38 unmodified lines
3939 CUVIDMPEG2PICPARAMS *ppc = &pp->CodecSpecific.mpeg2;
4040 FrameDecodeData *fdd;
4141 NVDECFrame *cf;
42− AVFrame *cur_frame = s->current_picture.f;
42+ AVFrame *cur_frame = s->cur_pic.f;
4343
4444 int ret, i;
4545
@@ -64,8 +64,8 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer · 18 unmodified lines
6464 s->pict_type == AV_PICTURE_TYPE_P,
6565
6666 .CodecSpecific.mpeg2 = {
67− .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_picture.f),
68− .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_picture.f),
67+ .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_pic.f),
68+ .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_pic.f),
6969
7070 .picture_coding_type = s->pict_type,
7171 .full_pel_forward_vector = s->full_pel[0],
libavcodec/nvdec_mpeg4.c+3−3
@@ -38,7 +38,7 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, · 37 unmodified lines
3838 CUVIDMPEG4PICPARAMS *ppc = &pp->CodecSpecific.mpeg4;
3939 FrameDecodeData *fdd;
4040 NVDECFrame *cf;
41− AVFrame *cur_frame = s->current_picture.f;
41+ AVFrame *cur_frame = s->cur_pic.f;
4242
4343 int ret, i;
4444
@@ -60,8 +60,8 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, · 15 unmodified lines
6060 s->pict_type == AV_PICTURE_TYPE_S,
6161
6262 .CodecSpecific.mpeg4 = {
63− .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_picture.f),
64− .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_picture.f),
63+ .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_pic.f),
64+ .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_pic.f),
6565
6666 .video_object_layer_width = s->width,
6767 .video_object_layer_height = s->height,
libavcodec/nvdec_vc1.c+3−3
@@ -38,7 +38,7 @@ static int nvdec_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, u · 37 unmodified lines
3838 CUVIDPICPARAMS *pp = &ctx->pic_params;
3939 FrameDecodeData *fdd;
4040 NVDECFrame *cf;
41− AVFrame *cur_frame = s->current_picture.f;
41+ AVFrame *cur_frame = s->cur_pic.f;
4242
4343 int ret;
4444
@@ -63,8 +63,8 @@ static int nvdec_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, u · 18 unmodified lines
6363 s->pict_type == AV_PICTURE_TYPE_P,
6464
6565 .CodecSpecific.vc1 = {
66− .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_picture.f),
67− .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_picture.f),
66+ .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_pic.f),
67+ .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_pic.f),
6868 .FrameWidth = cur_frame->width,
6969 .FrameHeight = cur_frame->height,
7070
libavcodec/ratecontrol.c+5−5
@@ -40,10 +40,10 @@ void ff_write_pass1_stats(MpegEncContext *s) · 39 unmodified lines
4040 snprintf(s->avctx->stats_out, 256,
4141 "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d "
4242 "fcode:%d bcode:%d mc-var:%"PRId64" var:%"PRId64" icount:%d hbits:%d;\n",
43− s->current_picture_ptr->display_picture_number,
44− s->current_picture_ptr->coded_picture_number,
43+ s->cur_pic_ptr->display_picture_number,
44+ s->cur_pic_ptr->coded_picture_number,
4545 s->pict_type,
46− s->current_picture.f->quality,
46+ s->cur_pic.f->quality,
4747 s->i_tex_bits,
4848 s->p_tex_bits,
4949 s->mv_bits,
@@ -936,9 +936,9 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 886 unmodified lines
936936 * here instead of reordering but the reordering is simpler for now
937937 * until H.264 B-pyramid must be handled. */
938938 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay)
939− dts_pic = s->current_picture_ptr;
939+ dts_pic = s->cur_pic_ptr;
940940 else
941− dts_pic = s->last_picture_ptr;
941+ dts_pic = s->last_pic_ptr;
942942
943943 if (!dts_pic || dts_pic->f->pts == AV_NOPTS_VALUE)
944944 wanted_bits = (uint64_t)(s->bit_rate * (double)picture_number / fps);
libavcodec/rv10.c+14−14
@@ -170,7 +170,7 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size) · 169 unmodified lines
170170 av_log(s->avctx, AV_LOG_ERROR, "low delay B\n");
171171 return -1;
172172 }
173− if (!s->last_picture_ptr && s->pict_type == AV_PICTURE_TYPE_B) {
173+ if (!s->last_pic_ptr && s->pict_type == AV_PICTURE_TYPE_B) {
174174 av_log(s->avctx, AV_LOG_ERROR, "early B-frame\n");
175175 return AVERROR_INVALIDDATA;
176176 }
@@ -458,9 +458,9 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf, · 281 unmodified lines
458458 if (whole_size < s->mb_width * s->mb_height / 8)
459459 return AVERROR_INVALIDDATA;
460460
461− if ((s->mb_x == 0 && s->mb_y == 0) || !s->current_picture_ptr) {
461+ if ((s->mb_x == 0 && s->mb_y == 0) || !s->cur_pic_ptr) {
462462 // FIXME write parser so we always have complete frames?
463− if (s->current_picture_ptr) {
463+ if (s->cur_pic_ptr) {
464464 ff_er_frame_end(&s->er, NULL);
465465 ff_mpv_frame_end(s);
466466 s->mb_x = s->mb_y = s->resync_mb_x = s->resync_mb_y = 0;
@@ -469,7 +469,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf, · 2 unmodified lines
469469 return ret;
470470 ff_mpeg_er_frame_start(s);
471471 } else {
472− if (s->current_picture_ptr->f->pict_type != s->pict_type) {
472+ if (s->cur_pic_ptr->f->pict_type != s->pict_type) {
473473 av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
474474 return AVERROR_INVALIDDATA;
475475 }
@@ -632,28 +632,28 @@ static int rv10_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 156 unmodified lines
632632 i++;
633633 }
634634
635− if (s->current_picture_ptr && s->mb_y >= s->mb_height) {
635+ if (s->cur_pic_ptr && s->mb_y >= s->mb_height) {
636636 ff_er_frame_end(&s->er, NULL);
637637 ff_mpv_frame_end(s);
638638
639639 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
640− if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
640+ if ((ret = av_frame_ref(pict, s->cur_pic_ptr->f)) < 0)
641641 return ret;
642− ff_print_debug_info(s, s->current_picture_ptr, pict);
643− ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
644− } else if (s->last_picture_ptr) {
645− if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
642+ ff_print_debug_info(s, s->cur_pic_ptr, pict);
643+ ff_mpv_export_qp_table(s, pict, s->cur_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
644+ } else if (s->last_pic_ptr) {
645+ if ((ret = av_frame_ref(pict, s->last_pic_ptr->f)) < 0)
646646 return ret;
647− ff_print_debug_info(s, s->last_picture_ptr, pict);
648− ff_mpv_export_qp_table(s, pict,s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
647+ ff_print_debug_info(s, s->last_pic_ptr, pict);
648+ ff_mpv_export_qp_table(s, pict,s->last_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
649649 }
650650
651− if (s->last_picture_ptr || s->low_delay) {
651+ if (s->last_pic_ptr || s->low_delay) {
652652 *got_frame = 1;
653653 }
654654
655655 // so we can detect if frame_end was not called (find some nicer solution...)
656− s->current_picture_ptr = NULL;
656+ s->cur_pic_ptr = NULL;
657657 }
658658
659659 return avpkt->size;
libavcodec/rv30.c+9−9
@@ -160,7 +160,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row) · 159 unmodified lines
160160
161161 mb_pos = row * s->mb_stride;
162162 for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){
163− int mbtype = s->current_picture_ptr->mb_type[mb_pos];
163+ int mbtype = s->cur_pic_ptr->mb_type[mb_pos];
164164 if(IS_INTRA(mbtype) || IS_SEPARATE_DC(mbtype))
165165 r->deblock_coefs[mb_pos] = 0xFFFF;
166166 if(IS_INTRA(mbtype))
@@ -172,11 +172,11 @@ static void rv30_loop_filter(RV34DecContext *r, int row) · 5 unmodified lines
172172 */
173173 mb_pos = row * s->mb_stride;
174174 for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){
175− cur_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos]];
175+ cur_lim = rv30_loop_filt_lim[s->cur_pic_ptr->qscale_table[mb_pos]];
176176 if(mb_x)
177− left_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos - 1]];
177+ left_lim = rv30_loop_filt_lim[s->cur_pic_ptr->qscale_table[mb_pos - 1]];
178178 for(j = 0; j < 16; j += 4){
179− Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x;
179+ Y = s->cur_pic_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x;
180180 for(i = !mb_x; i < 4; i++, Y += 4){
181181 int ij = i + j;
182182 loc_lim = 0;
@@ -196,7 +196,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row) · 13 unmodified lines
196196 if(mb_x)
197197 left_cbp = (r->cbp_chroma[mb_pos - 1] >> (k*4)) & 0xF;
198198 for(j = 0; j < 8; j += 4){
199− C = s->current_picture_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x;
199+ C = s->cur_pic_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x;
200200 for(i = !mb_x; i < 2; i++, C += 4){
201201 int ij = i + (j >> 1);
202202 loc_lim = 0;
@@ -214,11 +214,11 @@ static void rv30_loop_filter(RV34DecContext *r, int row) · 11 unmodified lines
214214 }
215215 mb_pos = row * s->mb_stride;
216216 for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){
217− cur_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos]];
217+ cur_lim = rv30_loop_filt_lim[s->cur_pic_ptr->qscale_table[mb_pos]];
218218 if(row)
219− top_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos - s->mb_stride]];
219+ top_lim = rv30_loop_filt_lim[s->cur_pic_ptr->qscale_table[mb_pos - s->mb_stride]];
220220 for(j = 4*!row; j < 16; j += 4){
221− Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize;
221+ Y = s->cur_pic_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize;
222222 for(i = 0; i < 4; i++, Y += 4){
223223 int ij = i + j;
224224 loc_lim = 0;
@@ -238,7 +238,7 @@ static void rv30_loop_filter(RV34DecContext *r, int row) · 13 unmodified lines
238238 if(row)
239239 top_cbp = (r->cbp_chroma[mb_pos - s->mb_stride] >> (k*4)) & 0xF;
240240 for(j = 4*!row; j < 8; j += 4){
241− C = s->current_picture_ptr->f->data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize;
241+ C = s->cur_pic_ptr->f->data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize;
242242 for(i = 0; i < 2; i++, C += 4){
243243 int ij = i + (j >> 1);
244244 loc_lim = 0;
libavcodec/rv34.c+78−78
@@ -369,7 +369,7 @@ static int rv34_decode_intra_mb_header(RV34DecContext *r, int8_t *intra_types) · 368 unmodified lines
369369
370370 r->is16 = get_bits1(gb);
371371 if(r->is16){
372− s->current_picture_ptr->mb_type[mb_pos] = MB_TYPE_INTRA16x16;
372+ s->cur_pic_ptr->mb_type[mb_pos] = MB_TYPE_INTRA16x16;
373373 r->block_type = RV34_MB_TYPE_INTRA16x16;
374374 t = get_bits(gb, 2);
375375 fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0]));
@@ -379,7 +379,7 @@ static int rv34_decode_intra_mb_header(RV34DecContext *r, int8_t *intra_types) · 3 unmodified lines
379379 if(!get_bits1(gb))
380380 av_log(s->avctx, AV_LOG_ERROR, "Need DQUANT\n");
381381 }
382− s->current_picture_ptr->mb_type[mb_pos] = MB_TYPE_INTRA;
382+ s->cur_pic_ptr->mb_type[mb_pos] = MB_TYPE_INTRA;
383383 r->block_type = RV34_MB_TYPE_INTRA;
384384 if(r->decode_intra_types(r, gb, intra_types) < 0)
385385 return -1;
@@ -405,7 +405,7 @@ static int rv34_decode_inter_mb_header(RV34DecContext *r, int8_t *intra_types) · 19 unmodified lines
405405 r->block_type = r->decode_mb_info(r);
406406 if(r->block_type == -1)
407407 return -1;
408− s->current_picture_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type];
408+ s->cur_pic_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type];
409409 r->mb_type[mb_pos] = r->block_type;
410410 if(r->block_type == RV34_MB_SKIP){
411411 if(s->pict_type == AV_PICTURE_TYPE_P)
@@ -413,7 +413,7 @@ static int rv34_decode_inter_mb_header(RV34DecContext *r, int8_t *intra_types) · 1 unmodified line
413413 if(s->pict_type == AV_PICTURE_TYPE_B)
414414 r->mb_type[mb_pos] = RV34_MB_B_DIRECT;
415415 }
416− r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->mb_type[mb_pos]);
416+ r->is16 = !!IS_INTRA16x16(s->cur_pic_ptr->mb_type[mb_pos]);
417417 if (rv34_decode_mv(r, r->block_type) < 0)
418418 return -1;
419419 if(r->block_type == RV34_MB_SKIP){
@@ -423,7 +423,7 @@ static int rv34_decode_inter_mb_header(RV34DecContext *r, int8_t *intra_types) · 3 unmodified lines
423423 r->chroma_vlc = 1;
424424 r->luma_vlc = 0;
425425
426− if(IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])){
426+ if(IS_INTRA(s->cur_pic_ptr->mb_type[mb_pos])){
427427 if(r->is16){
428428 t = get_bits(gb, 2);
429429 fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0]));
@@ -488,27 +488,27 @@ static void rv34_pred_mv(RV34DecContext *r, int block_type, int subblock_no, int · 58 unmodified lines
488488 c_off = -1;
489489
490490 if(avail[-1]){
491− A[0] = s->current_picture_ptr->motion_val[0][mv_pos-1][0];
492− A[1] = s->current_picture_ptr->motion_val[0][mv_pos-1][1];
491+ A[0] = s->cur_pic_ptr->motion_val[0][mv_pos-1][0];
492+ A[1] = s->cur_pic_ptr->motion_val[0][mv_pos-1][1];
493493 }
494494 if(avail[-4]){
495− B[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride][0];
496− B[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride][1];
495+ B[0] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride][0];
496+ B[1] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride][1];
497497 }else{
498498 B[0] = A[0];
499499 B[1] = A[1];
500500 }
501501 if(!avail[c_off-4]){
502502 if(avail[-4] && (avail[-1] || r->rv30)){
503− C[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride-1][0];
504− C[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride-1][1];
503+ C[0] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride-1][0];
504+ C[1] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride-1][1];
505505 }else{
506506 C[0] = A[0];
507507 C[1] = A[1];
508508 }
509509 }else{
510− C[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][0];
511− C[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][1];
510+ C[0] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][0];
511+ C[1] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][1];
512512 }
513513 mx = mid_pred(A[0], B[0], C[0]);
514514 my = mid_pred(A[1], B[1], C[1]);
@@ -516,8 +516,8 @@ static void rv34_pred_mv(RV34DecContext *r, int block_type, int subblock_no, int · 1 unmodified line
516516 my += r->dmv[dmv_no][1];
517517 for(j = 0; j < part_sizes_h[block_type]; j++){
518518 for(i = 0; i < part_sizes_w[block_type]; i++){
519− s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][0] = mx;
520− s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][1] = my;
519+ s->cur_pic_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][0] = mx;
520+ s->cur_pic_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][1] = my;
521521 }
522522 }
523523 }
@@ -566,7 +566,7 @@ static void rv34_pred_mv_b(RV34DecContext *r, int block_type, int dir) · 42 unmodified lines
566566 int has_A = 0, has_B = 0, has_C = 0;
567567 int mx, my;
568568 int i, j;
569− Picture *cur_pic = s->current_picture_ptr;
569+ Picture *cur_pic = s->cur_pic_ptr;
570570 const int mask = dir ? MB_TYPE_L1 : MB_TYPE_L0;
571571 int type = cur_pic->mb_type[mb_pos];
572572
@@ -619,27 +619,27 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir) · 46 unmodified lines
619619 int* avail = r->avail_cache + avail_indexes[0];
620620
621621 if(avail[-1]){
622− A[0] = s->current_picture_ptr->motion_val[0][mv_pos - 1][0];
623− A[1] = s->current_picture_ptr->motion_val[0][mv_pos - 1][1];
622+ A[0] = s->cur_pic_ptr->motion_val[0][mv_pos - 1][0];
623+ A[1] = s->cur_pic_ptr->motion_val[0][mv_pos - 1][1];
624624 }
625625 if(avail[-4]){
626− B[0] = s->current_picture_ptr->motion_val[0][mv_pos - s->b8_stride][0];
627− B[1] = s->current_picture_ptr->motion_val[0][mv_pos - s->b8_stride][1];
626+ B[0] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride][0];
627+ B[1] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride][1];
628628 }else{
629629 B[0] = A[0];
630630 B[1] = A[1];
631631 }
632632 if(!avail[-4 + 2]){
633633 if(avail[-4] && (avail[-1])){
634− C[0] = s->current_picture_ptr->motion_val[0][mv_pos - s->b8_stride - 1][0];
635− C[1] = s->current_picture_ptr->motion_val[0][mv_pos - s->b8_stride - 1][1];
634+ C[0] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride - 1][0];
635+ C[1] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride - 1][1];
636636 }else{
637637 C[0] = A[0];
638638 C[1] = A[1];
639639 }
640640 }else{
641− C[0] = s->current_picture_ptr->motion_val[0][mv_pos - s->b8_stride + 2][0];
642− C[1] = s->current_picture_ptr->motion_val[0][mv_pos - s->b8_stride + 2][1];
641+ C[0] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride + 2][0];
642+ C[1] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride + 2][1];
643643 }
644644 mx = mid_pred(A[0], B[0], C[0]);
645645 my = mid_pred(A[1], B[1], C[1]);
@@ -648,8 +648,8 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir) · 2 unmodified lines
648648 for(j = 0; j < 2; j++){
649649 for(i = 0; i < 2; i++){
650650 for(k = 0; k < 2; k++){
651− s->current_picture_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx;
652− s->current_picture_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][1] = my;
651+ s->cur_pic_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx;
652+ s->cur_pic_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][1] = my;
653653 }
654654 }
655655 }
@@ -688,24 +688,24 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type, · 32 unmodified lines
688688
689689 if(thirdpel){
690690 int chroma_mx, chroma_my;
691− mx = (s->current_picture_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) / 3 - (1 << 24);
692− my = (s->current_picture_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) / 3 - (1 << 24);
693− lx = (s->current_picture_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) % 3;
694− ly = (s->current_picture_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) % 3;
695− chroma_mx = s->current_picture_ptr->motion_val[dir][mv_pos][0] / 2;
696− chroma_my = s->current_picture_ptr->motion_val[dir][mv_pos][1] / 2;
691+ mx = (s->cur_pic_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) / 3 - (1 << 24);
692+ my = (s->cur_pic_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) / 3 - (1 << 24);
693+ lx = (s->cur_pic_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) % 3;
694+ ly = (s->cur_pic_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) % 3;
695+ chroma_mx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] / 2;
696+ chroma_my = s->cur_pic_ptr->motion_val[dir][mv_pos][1] / 2;
697697 umx = (chroma_mx + (3 << 24)) / 3 - (1 << 24);
698698 umy = (chroma_my + (3 << 24)) / 3 - (1 << 24);
699699 uvmx = chroma_coeffs[(chroma_mx + (3 << 24)) % 3];
700700 uvmy = chroma_coeffs[(chroma_my + (3 << 24)) % 3];
701701 }else{
702702 int cx, cy;
703− mx = s->current_picture_ptr->motion_val[dir][mv_pos][0] >> 2;
704− my = s->current_picture_ptr->motion_val[dir][mv_pos][1] >> 2;
705− lx = s->current_picture_ptr->motion_val[dir][mv_pos][0] & 3;
706− ly = s->current_picture_ptr->motion_val[dir][mv_pos][1] & 3;
707− cx = s->current_picture_ptr->motion_val[dir][mv_pos][0] / 2;
708− cy = s->current_picture_ptr->motion_val[dir][mv_pos][1] / 2;
703+ mx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] >> 2;
704+ my = s->cur_pic_ptr->motion_val[dir][mv_pos][1] >> 2;
705+ lx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] & 3;
706+ ly = s->cur_pic_ptr->motion_val[dir][mv_pos][1] & 3;
707+ cx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] / 2;
708+ cy = s->cur_pic_ptr->motion_val[dir][mv_pos][1] / 2;
709709 umx = cx >> 2;
710710 umy = cy >> 2;
711711 uvmx = (cx & 3) << 1;
@@ -718,14 +718,14 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type, · 6 unmodified lines
718718 if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) {
719719 /* wait for the referenced mb row to be finished */
720720 int mb_row = s->mb_y + ((yoff + my + 5 + 8 * height) >> 4);
721− const ThreadFrame *f = dir ? &s->next_picture_ptr->tf : &s->last_picture_ptr->tf;
721+ const ThreadFrame *f = dir ? &s->next_pic_ptr->tf : &s->last_pic_ptr->tf;
722722 ff_thread_await_progress(f, mb_row, 0);
723723 }
724724
725725 dxy = ly*4 + lx;
726− srcY = dir ? s->next_picture_ptr->f->data[0] : s->last_picture_ptr->f->data[0];
727− srcU = dir ? s->next_picture_ptr->f->data[1] : s->last_picture_ptr->f->data[1];
728− srcV = dir ? s->next_picture_ptr->f->data[2] : s->last_picture_ptr->f->data[2];
726+ srcY = dir ? s->next_pic_ptr->f->data[0] : s->last_pic_ptr->f->data[0];
727+ srcU = dir ? s->next_pic_ptr->f->data[1] : s->last_pic_ptr->f->data[1];
728+ srcV = dir ? s->next_pic_ptr->f->data[2] : s->last_pic_ptr->f->data[2];
729729 src_x = s->mb_x * 16 + xoff + mx;
730730 src_y = s->mb_y * 16 + yoff + my;
731731 uvsrc_x = s->mb_x * 8 + (xoff >> 1) + umx;
@@ -886,11 +886,11 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type) · 154 unmodified lines
886886 switch(block_type){
887887 case RV34_MB_TYPE_INTRA:
888888 case RV34_MB_TYPE_INTRA16x16:
889− ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
889+ ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
890890 return 0;
891891 case RV34_MB_SKIP:
892892 if(s->pict_type == AV_PICTURE_TYPE_P){
893− ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
893+ ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
894894 rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0);
895895 break;
896896 }
@@ -898,23 +898,23 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type) · 1 unmodified line
898898 //surprisingly, it uses motion scheme from next reference frame
899899 /* wait for the current mb row to be finished */
900900 if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))
901− ff_thread_await_progress(&s->next_picture_ptr->tf, FFMAX(0, s->mb_y-1), 0);
901+ ff_thread_await_progress(&s->next_pic_ptr->tf, FFMAX(0, s->mb_y-1), 0);
902902
903− next_bt = s->next_picture_ptr->mb_type[s->mb_x + s->mb_y * s->mb_stride];
903+ next_bt = s->next_pic_ptr->mb_type[s->mb_x + s->mb_y * s->mb_stride];
904904 if(IS_INTRA(next_bt) || IS_SKIP(next_bt)){
905− ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
906− ZERO8x2(s->current_picture_ptr->motion_val[1][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
905+ ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
906+ ZERO8x2(s->cur_pic_ptr->motion_val[1][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
907907 }else
908908 for(j = 0; j < 2; j++)
909909 for(i = 0; i < 2; i++)
910910 for(k = 0; k < 2; k++)
911911 for(l = 0; l < 2; l++)
912− s->current_picture_ptr->motion_val[l][mv_pos + i + j*s->b8_stride][k] = calc_add_mv(r, l, s->next_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k]);
912+ s->cur_pic_ptr->motion_val[l][mv_pos + i + j*s->b8_stride][k] = calc_add_mv(r, l, s->next_pic_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k]);
913913 if(!(IS_16X8(next_bt) || IS_8X16(next_bt) || IS_8X8(next_bt))) //we can use whole macroblock MC
914914 rv34_mc_2mv(r, block_type);
915915 else
916916 rv34_mc_2mv_skip(r);
917− ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
917+ ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
918918 break;
919919 case RV34_MB_P_16x16:
920920 case RV34_MB_P_MIX16x16:
@@ -1182,7 +1182,7 @@ static int rv34_set_deblock_coef(RV34DecContext *r) · 261 unmodified lines
11821182 MpegEncContext *s = &r->s;
11831183 int hmvmask = 0, vmvmask = 0, i, j;
11841184 int midx = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
1185− int16_t (*motion_val)[2] = &s->current_picture_ptr->motion_val[0][midx];
1185+ int16_t (*motion_val)[2] = &s->cur_pic_ptr->motion_val[0][midx];
11861186 for(j = 0; j < 16; j += 8){
11871187 for(i = 0; i < 2; i++){
11881188 if(is_mv_diff_gt_3(motion_val + i, 1))
@@ -1225,26 +1225,26 @@ static int rv34_decode_inter_macroblock(RV34DecContext *r, int8_t *intra_types) · 36 unmodified lines
12251225 dist = (s->mb_x - s->resync_mb_x) + (s->mb_y - s->resync_mb_y) * s->mb_width;
12261226 if(s->mb_x && dist)
12271227 r->avail_cache[5] =
1228− r->avail_cache[9] = s->current_picture_ptr->mb_type[mb_pos - 1];
1228+ r->avail_cache[9] = s->cur_pic_ptr->mb_type[mb_pos - 1];
12291229 if(dist >= s->mb_width)
12301230 r->avail_cache[2] =
1231− r->avail_cache[3] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride];
1231+ r->avail_cache[3] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride];
12321232 if(((s->mb_x+1) < s->mb_width) && dist >= s->mb_width - 1)
1233− r->avail_cache[4] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride + 1];
1233+ r->avail_cache[4] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride + 1];
12341234 if(s->mb_x && dist > s->mb_width)
1235− r->avail_cache[1] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride - 1];
1235+ r->avail_cache[1] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride - 1];
12361236
12371237 s->qscale = r->si.quant;
12381238 cbp = cbp2 = rv34_decode_inter_mb_header(r, intra_types);
12391239 r->cbp_luma [mb_pos] = cbp;
12401240 r->cbp_chroma[mb_pos] = cbp >> 16;
12411241 r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos];
1242− s->current_picture_ptr->qscale_table[mb_pos] = s->qscale;
1242+ s->cur_pic_ptr->qscale_table[mb_pos] = s->qscale;
12431243
12441244 if(cbp == -1)
12451245 return -1;
12461246
1247− if (IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])){
1247+ if (IS_INTRA(s->cur_pic_ptr->mb_type[mb_pos])){
12481248 if(r->is16) rv34_output_i16x16(r, intra_types, cbp);
12491249 else rv34_output_intra(r, intra_types, cbp);
12501250 return 0;
@@ -1327,21 +1327,21 @@ static int rv34_decode_intra_macroblock(RV34DecContext *r, int8_t *intra_types) · 76 unmodified lines
13271327 dist = (s->mb_x - s->resync_mb_x) + (s->mb_y - s->resync_mb_y) * s->mb_width;
13281328 if(s->mb_x && dist)
13291329 r->avail_cache[5] =
1330− r->avail_cache[9] = s->current_picture_ptr->mb_type[mb_pos - 1];
1330+ r->avail_cache[9] = s->cur_pic_ptr->mb_type[mb_pos - 1];
13311331 if(dist >= s->mb_width)
13321332 r->avail_cache[2] =
1333− r->avail_cache[3] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride];
1333+ r->avail_cache[3] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride];
13341334 if(((s->mb_x+1) < s->mb_width) && dist >= s->mb_width - 1)
1335− r->avail_cache[4] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride + 1];
1335+ r->avail_cache[4] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride + 1];
13361336 if(s->mb_x && dist > s->mb_width)
1337− r->avail_cache[1] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride - 1];
1337+ r->avail_cache[1] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride - 1];
13381338
13391339 s->qscale = r->si.quant;
13401340 cbp = rv34_decode_intra_mb_header(r, intra_types);
13411341 r->cbp_luma [mb_pos] = cbp;
13421342 r->cbp_chroma[mb_pos] = cbp >> 16;
13431343 r->deblock_coefs[mb_pos] = 0xFFFF;
1344− s->current_picture_ptr->qscale_table[mb_pos] = s->qscale;
1344+ s->cur_pic_ptr->qscale_table[mb_pos] = s->qscale;
13451345
13461346 if(cbp == -1)
13471347 return -1;
@@ -1482,7 +1482,7 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int · 134 unmodified lines
14821482 r->loop_filter(r, s->mb_y - 2);
14831483
14841484 if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))
1485− ff_thread_report_progress(&s->current_picture_ptr->tf,
1485+ ff_thread_report_progress(&s->cur_pic_ptr->tf,
14861486 s->mb_y - 2, 0);
14871487
14881488 }
@@ -1580,19 +1580,19 @@ static int finish_frame(AVCodecContext *avctx, AVFrame *pict) · 91 unmodified lines
15801580 s->mb_num_left = 0;
15811581
15821582 if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))
1583− ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
1583+ ff_thread_report_progress(&s->cur_pic_ptr->tf, INT_MAX, 0);
15841584
15851585 if (s->pict_type == AV_PICTURE_TYPE_B) {
1586− if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
1586+ if ((ret = av_frame_ref(pict, s->cur_pic_ptr->f)) < 0)
15871587 return ret;
1588− ff_print_debug_info(s, s->current_picture_ptr, pict);
1589− ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
1588+ ff_print_debug_info(s, s->cur_pic_ptr, pict);
1589+ ff_mpv_export_qp_table(s, pict, s->cur_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
15901590 got_picture = 1;
1591− } else if (s->last_picture_ptr) {
1592− if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
1591+ } else if (s->last_pic_ptr) {
1592+ if ((ret = av_frame_ref(pict, s->last_pic_ptr->f)) < 0)
15931593 return ret;
1594− ff_print_debug_info(s, s->last_picture_ptr, pict);
1595− ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
1594+ ff_print_debug_info(s, s->last_pic_ptr, pict);
1595+ ff_mpv_export_qp_table(s, pict, s->last_pic_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
15961596 got_picture = 1;
15971597 }
15981598
@@ -1627,10 +1627,10 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 28 unmodified lines
16271627 /* no supplementary picture */
16281628 if (buf_size == 0) {
16291629 /* special case for last picture */
1630− if (s->next_picture_ptr) {
1631− if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0)
1630+ if (s->next_pic_ptr) {
1631+ if ((ret = av_frame_ref(pict, s->next_pic_ptr->f)) < 0)
16321632 return ret;
1633− s->next_picture_ptr = NULL;
1633+ s->next_pic_ptr = NULL;
16341634
16351635 *got_picture_ptr = 1;
16361636 }
@@ -1653,7 +1653,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 16 unmodified lines
16531653 av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
16541654 return AVERROR_INVALIDDATA;
16551655 }
1656− if ((!s->last_picture_ptr || !s->last_picture_ptr->f->data[0]) &&
1656+ if ((!s->last_pic_ptr || !s->last_pic_ptr->f->data[0]) &&
16571657 si.type == AV_PICTURE_TYPE_B) {
16581658 av_log(avctx, AV_LOG_ERROR, "Invalid decoder state: B-frame without "
16591659 "reference data.\n");
@@ -1666,7 +1666,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 6 unmodified lines
16661666
16671667 /* first slice */
16681668 if (si.start == 0) {
1669− if (s->mb_num_left > 0 && s->current_picture_ptr) {
1669+ if (s->mb_num_left > 0 && s->cur_pic_ptr) {
16701670 av_log(avctx, AV_LOG_ERROR, "New frame but still %d MB left.\n",
16711671 s->mb_num_left);
16721672 if (!s->context_reinit)
@@ -1791,7 +1791,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 118 unmodified lines
17911791 break;
17921792 }
17931793
1794− if (s->current_picture_ptr) {
1794+ if (s->cur_pic_ptr) {
17951795 if (last) {
17961796 if(r->loop_filter)
17971797 r->loop_filter(r, s->mb_height - 1);
@@ -1808,7 +1808,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 10 unmodified lines
18081808 ff_er_frame_end(&s->er, NULL);
18091809 ff_mpv_frame_end(s);
18101810 s->mb_num_left = 0;
1811− ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
1811+ ff_thread_report_progress(&s->cur_pic_ptr->tf, INT_MAX, 0);
18121812 return AVERROR_INVALIDDATA;
18131813 }
18141814 }
libavcodec/rv40.c+5−5
@@ -371,7 +371,7 @@ static void rv40_loop_filter(RV34DecContext *r, int row) · 370 unmodified lines
371371
372372 mb_pos = row * s->mb_stride;
373373 for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){
374− int mbtype = s->current_picture_ptr->mb_type[mb_pos];
374+ int mbtype = s->cur_pic_ptr->mb_type[mb_pos];
375375 if(IS_INTRA(mbtype) || IS_SEPARATE_DC(mbtype))
376376 r->cbp_luma [mb_pos] = r->deblock_coefs[mb_pos] = 0xFFFF;
377377 if(IS_INTRA(mbtype))
@@ -386,7 +386,7 @@ static void rv40_loop_filter(RV34DecContext *r, int row) · 8 unmodified lines
386386 unsigned y_to_deblock;
387387 int c_to_deblock[2];
388388
389− q = s->current_picture_ptr->qscale_table[mb_pos];
389+ q = s->cur_pic_ptr->qscale_table[mb_pos];
390390 alpha = rv40_alpha_tab[q];
391391 beta = rv40_beta_tab [q];
392392 betaY = betaC = beta * 3;
@@ -401,7 +401,7 @@ static void rv40_loop_filter(RV34DecContext *r, int row) · 8 unmodified lines
401401 if(avail[i]){
402402 int pos = mb_pos + neighbour_offs_x[i] + neighbour_offs_y[i]*s->mb_stride;
403403 mvmasks[i] = r->deblock_coefs[pos];
404− mbtype [i] = s->current_picture_ptr->mb_type[pos];
404+ mbtype [i] = s->cur_pic_ptr->mb_type[pos];
405405 cbp [i] = r->cbp_luma[pos];
406406 uvcbp[i][0] = r->cbp_chroma[pos] & 0xF;
407407 uvcbp[i][1] = r->cbp_chroma[pos] >> 4;
@@ -460,7 +460,7 @@ static void rv40_loop_filter(RV34DecContext *r, int row) · 52 unmodified lines
460460 }
461461
462462 for(j = 0; j < 16; j += 4){
463− Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize;
463+ Y = s->cur_pic_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize;
464464 for(i = 0; i < 4; i++, Y += 4){
465465 int ij = i + j;
466466 int clip_cur = y_to_deblock & (MASK_CUR << ij) ? clip[POS_CUR] : 0;
@@ -505,7 +505,7 @@ static void rv40_loop_filter(RV34DecContext *r, int row) · 38 unmodified lines
505505 }
506506 for(k = 0; k < 2; k++){
507507 for(j = 0; j < 2; j++){
508− C = s->current_picture_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j*4) * s->uvlinesize;
508+ C = s->cur_pic_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j*4) * s->uvlinesize;
509509 for(i = 0; i < 2; i++, C += 4){
510510 int ij = i + j*2;
511511 int clip_cur = c_to_deblock[k] & (MASK_CUR << ij) ? clip[POS_CUR] : 0;
libavcodec/snowenc.c+9−9
@@ -1834,9 +1834,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 1833 unmodified lines
18341834 if (ret < 0)
18351835 return ret;
18361836
1837− mpv->current_picture_ptr = &mpv->current_picture;
1838− mpv->current_picture.f = s->current_picture;
1839− mpv->current_picture.f->pts = pict->pts;
1837+ mpv->cur_pic_ptr = &mpv->cur_pic;
1838+ mpv->cur_pic.f = s->current_picture;
1839+ mpv->cur_pic.f->pts = pict->pts;
18401840 if(pic->pict_type == AV_PICTURE_TYPE_P){
18411841 int block_width = (width +15)>>4;
18421842 int block_height= (height+15)>>4;
@@ -1846,9 +1846,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 3 unmodified lines
18461846 av_assert0(s->last_picture[0]->data[0]);
18471847
18481848 mpv->avctx = s->avctx;
1849− mpv->last_picture.f = s->last_picture[0];
1850− mpv-> new_picture = s->input_picture;
1851− mpv->last_picture_ptr = &mpv->last_picture;
1849+ mpv->last_pic.f = s->last_picture[0];
1850+ mpv-> new_pic = s->input_picture;
1851+ mpv->last_pic_ptr = &mpv->last_pic;
18521852 mpv->linesize = stride;
18531853 mpv->uvlinesize = s->current_picture->linesize[1];
18541854 mpv->width = width;
@@ -2043,9 +2043,9 @@ redo_frame: · 188 unmodified lines
20432043 mpv->frame_bits = 8 * (s->c.bytestream - s->c.bytestream_start);
20442044 mpv->p_tex_bits = mpv->frame_bits - mpv->misc_bits - mpv->mv_bits;
20452045 mpv->total_bits += 8*(s->c.bytestream - s->c.bytestream_start);
2046− mpv->current_picture.display_picture_number =
2047− mpv->current_picture.coded_picture_number = avctx->frame_num;
2048− mpv->current_picture.f->quality = pic->quality;
2046+ mpv->cur_pic.display_picture_number =
2047+ mpv->cur_pic.coded_picture_number = avctx->frame_num;
2048+ mpv->cur_pic.f->quality = pic->quality;
20492049 if (enc->pass1_rc)
20502050 if (ff_rate_estimate_qscale(mpv, 0) < 0)
20512051 return -1;
libavcodec/svq1enc.c+12−12
@@ -326,13 +326,13 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane, · 325 unmodified lines
326326
327327 if (s->pict_type == AV_PICTURE_TYPE_P) {
328328 s->m.avctx = s->avctx;
329− s->m.current_picture_ptr = &s->m.current_picture;
330− s->m.last_picture_ptr = &s->m.last_picture;
331− s->m.last_picture.f->data[0] = ref_plane;
329+ s->m.cur_pic_ptr = &s->m.cur_pic;
330+ s->m.last_pic_ptr = &s->m.last_pic;
331+ s->m.last_pic.f->data[0] = ref_plane;
332332 s->m.linesize =
333− s->m.last_picture.f->linesize[0] =
334− s->m.new_picture->linesize[0] =
335− s->m.current_picture.f->linesize[0] = stride;
333+ s->m.last_pic.f->linesize[0] =
334+ s->m.new_pic->linesize[0] =
335+ s->m.cur_pic.f->linesize[0] = stride;
336336 s->m.width = width;
337337 s->m.height = height;
338338 s->m.mb_width = block_width;
@@ -370,9 +370,9 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane, · 31 unmodified lines
370370 s->m.mb_mean = (uint8_t *)s->dummy;
371371 s->m.mb_var = (uint16_t *)s->dummy;
372372 s->m.mc_mb_var = (uint16_t *)s->dummy;
373− s->m.current_picture.mb_type = s->dummy;
373+ s->m.cur_pic.mb_type = s->dummy;
374374
375− s->m.current_picture.motion_val[0] = s->motion_val8[plane] + 2;
375+ s->m.cur_pic.motion_val[0] = s->motion_val8[plane] + 2;
376376 s->m.p_mv_table = s->motion_val16[plane] +
377377 s->m.mb_stride + 1;
378378 s->m.mecc = s->mecc; // move
@@ -381,7 +381,7 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane, · 2 unmodified lines
381381 s->m.me.dia_size = s->avctx->dia_size;
382382 s->m.first_slice_line = 1;
383383 for (y = 0; y < block_height; y++) {
384− s->m.new_picture->data[0] = src - y * 16 * stride; // ugly
384+ s->m.new_pic->data[0] = src - y * 16 * stride; // ugly
385385 s->m.mb_y = y;
386386
387387 for (i = 0; i < 16 && i + 16 * y < height; i++) {
@@ -561,7 +561,7 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) · 173 unmodified lines
561561
562562 av_frame_free(&s->current_picture);
563563 av_frame_free(&s->last_picture);
564− av_frame_free(&s->m.new_picture);
564+ av_frame_free(&s->m.new_pic);
565565
566566 return 0;
567567 }
@@ -624,10 +624,10 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) · 56 unmodified lines
624624 s->dummy = av_mallocz((s->y_block_width + 1) *
625625 s->y_block_height * sizeof(int32_t));
626626 s->m.me.map = av_mallocz(2 * ME_MAP_SIZE * sizeof(*s->m.me.map));
627− s->m.new_picture = av_frame_alloc();
627+ s->m.new_pic = av_frame_alloc();
628628
629629 if (!s->m.me.scratchpad || !s->m.me.map ||
630− !s->mb_type || !s->dummy || !s->m.new_picture)
630+ !s->mb_type || !s->dummy || !s->m.new_pic)
631631 return AVERROR(ENOMEM);
632632 s->m.me.score_map = s->m.me.map + ME_MAP_SIZE;
633633
libavcodec/vaapi_mpeg2.c+6−6
@@ -42,12 +42,12 @@ static inline int mpeg2_get_is_frame_start(const MpegEncContext *s) · 41 unmodified lines
4242 static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
4343 {
4444 const MpegEncContext *s = avctx->priv_data;
45− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
45+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
4646 VAPictureParameterBufferMPEG2 pic_param;
4747 VAIQMatrixBufferMPEG2 iq_matrix;
4848 int i, err;
4949
50− pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f);
50+ pic->output_surface = ff_vaapi_get_surface_id(s->cur_pic_ptr->f);
5151
5252 pic_param = (VAPictureParameterBufferMPEG2) {
5353 .horizontal_size = s->width,
@@ -73,10 +73,10 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 19 unmodified lines
7373
7474 switch (s->pict_type) {
7575 case AV_PICTURE_TYPE_B:
76− pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f);
76+ pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_pic.f);
7777 // fall-through
7878 case AV_PICTURE_TYPE_P:
79− pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f);
79+ pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_pic.f);
8080 break;
8181 }
8282
@@ -115,7 +115,7 @@ fail: · 32 unmodified lines
115115 static int vaapi_mpeg2_end_frame(AVCodecContext *avctx)
116116 {
117117 MpegEncContext *s = avctx->priv_data;
118− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
118+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
119119 int ret;
120120
121121 ret = ff_vaapi_decode_issue(avctx, pic);
@@ -131,7 +131,7 @@ fail: · 9 unmodified lines
131131 static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
132132 {
133133 const MpegEncContext *s = avctx->priv_data;
134− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
134+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
135135 VASliceParameterBufferMPEG2 slice_param;
136136 GetBitContext gb;
137137 uint32_t quantiser_scale_code, intra_slice_flag, macroblock_offset;
libavcodec/vaapi_mpeg4.c+7−7
@@ -49,11 +49,11 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 48 unmodified lines
4949 {
5050 Mpeg4DecContext *ctx = avctx->priv_data;
5151 MpegEncContext *s = &ctx->m;
52− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
52+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
5353 VAPictureParameterBufferMPEG4 pic_param;
5454 int i, err;
5555
56− pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f);
56+ pic->output_surface = ff_vaapi_get_surface_id(s->cur_pic_ptr->f);
5757
5858 pic_param = (VAPictureParameterBufferMPEG4) {
5959 .vop_width = s->width,
@@ -78,7 +78,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 18 unmodified lines
7878 .vop_fields.bits = {
7979 .vop_coding_type = s->pict_type - AV_PICTURE_TYPE_I,
8080 .backward_reference_vop_coding_type =
81− s->pict_type == AV_PICTURE_TYPE_B ? s->next_picture.f->pict_type - AV_PICTURE_TYPE_I : 0,
81+ s->pict_type == AV_PICTURE_TYPE_B ? s->next_pic.f->pict_type - AV_PICTURE_TYPE_I : 0,
8282 .vop_rounding_type = s->no_rounding,
8383 .intra_dc_vlc_thr = mpeg4_get_intra_dc_vlc_thr(ctx),
8484 .top_field_first = s->top_field_first,
@@ -100,9 +100,9 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 15 unmodified lines
100100 }
101101
102102 if (s->pict_type == AV_PICTURE_TYPE_B)
103− pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f);
103+ pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_pic.f);
104104 if (s->pict_type != AV_PICTURE_TYPE_I)
105− pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f);
105+ pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_pic.f);
106106
107107 err = ff_vaapi_decode_make_param_buffer(avctx, pic,
108108 VAPictureParameterBufferType,
@@ -139,7 +139,7 @@ fail: · 30 unmodified lines
139139 static int vaapi_mpeg4_end_frame(AVCodecContext *avctx)
140140 {
141141 MpegEncContext *s = avctx->priv_data;
142− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
142+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
143143 int ret;
144144
145145 ret = ff_vaapi_decode_issue(avctx, pic);
@@ -155,7 +155,7 @@ fail: · 9 unmodified lines
155155 static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
156156 {
157157 MpegEncContext *s = avctx->priv_data;
158− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
158+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
159159 VASliceParameterBufferMPEG4 slice_param;
160160 int err;
161161
libavcodec/vaapi_vc1.c+6−6
@@ -253,11 +253,11 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 252 unmodified lines
253253 {
254254 const VC1Context *v = avctx->priv_data;
255255 const MpegEncContext *s = &v->s;
256− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
256+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
257257 VAPictureParameterBufferVC1 pic_param;
258258 int err;
259259
260− pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f);
260+ pic->output_surface = ff_vaapi_get_surface_id(s->cur_pic_ptr->f);
261261
262262 pic_param = (VAPictureParameterBufferVC1) {
263263 .forward_reference_picture = VA_INVALID_ID,
@@ -374,10 +374,10 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 110 unmodified lines
374374
375375 switch (s->pict_type) {
376376 case AV_PICTURE_TYPE_B:
377− pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f);
377+ pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_pic.f);
378378 // fall-through
379379 case AV_PICTURE_TYPE_P:
380− pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f);
380+ pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_pic.f);
381381 break;
382382 }
383383
@@ -450,7 +450,7 @@ static int vaapi_vc1_end_frame(AVCodecContext *avctx) · 66 unmodified lines
450450 {
451451 VC1Context *v = avctx->priv_data;
452452 MpegEncContext *s = &v->s;
453− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
453+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
454454 int ret;
455455
456456 ret = ff_vaapi_decode_issue(avctx, pic);
@@ -465,7 +465,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 8 unmodified lines
465465 {
466466 const VC1Context *v = avctx->priv_data;
467467 const MpegEncContext *s = &v->s;
468− VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
468+ VAAPIDecodePicture *pic = s->cur_pic_ptr->hwaccel_picture_private;
469469 VASliceParameterBufferVC1 slice_param;
470470 int mb_height;
471471 int err;
libavcodec/vc1.c+1−1
@@ -856,7 +856,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 855 unmodified lines
856856 v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B;
857857 else
858858 v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
859− v->s.current_picture_ptr->f->pict_type = v->s.pict_type;
859+ v->s.cur_pic_ptr->f->pict_type = v->s.pict_type;
860860 if (!v->pic_header_flag)
861861 goto parse_common_info;
862862 }
libavcodec/vc1_block.c+97−97
@@ -59,9 +59,9 @@ static inline void init_block_index(VC1Context *v) · 58 unmodified lines
5959 MpegEncContext *s = &v->s;
6060 ff_init_block_index(s);
6161 if (v->field_mode && !(v->second_field ^ v->tff)) {
62− s->dest[0] += s->current_picture_ptr->f->linesize[0];
63− s->dest[1] += s->current_picture_ptr->f->linesize[1];
64− s->dest[2] += s->current_picture_ptr->f->linesize[2];
62+ s->dest[0] += s->cur_pic_ptr->f->linesize[0];
63+ s->dest[1] += s->cur_pic_ptr->f->linesize[1];
64+ s->dest[2] += s->cur_pic_ptr->f->linesize[2];
6565 }
6666 }
6767
@@ -417,7 +417,7 @@ static inline int ff_vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n, · 349 unmodified lines
417417 int dqscale_index;
418418
419419 /* scale predictors if needed */
420− q1 = FFABS(s->current_picture.qscale_table[mb_pos]);
420+ q1 = FFABS(s->cur_pic.qscale_table[mb_pos]);
421421 dqscale_index = s->y_dc_scale_table[q1] - 1;
422422 if (dqscale_index < 0)
423423 return 0;
@@ -433,12 +433,12 @@ static inline int ff_vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n, · 9 unmodified lines
433433 a = dc_val[ - wrap];
434434
435435 if (c_avail && (n != 1 && n != 3)) {
436− q2 = FFABS(s->current_picture.qscale_table[mb_pos - 1]);
436+ q2 = FFABS(s->cur_pic.qscale_table[mb_pos - 1]);
437437 if (q2 && q2 != q1)
438438 c = (int)((unsigned)c * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x20000) >> 18;
439439 }
440440 if (a_avail && (n != 2 && n != 3)) {
441− q2 = FFABS(s->current_picture.qscale_table[mb_pos - s->mb_stride]);
441+ q2 = FFABS(s->cur_pic.qscale_table[mb_pos - s->mb_stride]);
442442 if (q2 && q2 != q1)
443443 a = (int)((unsigned)a * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x20000) >> 18;
444444 }
@@ -448,7 +448,7 @@ static inline int ff_vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n, · 3 unmodified lines
448448 off--;
449449 if (n != 2)
450450 off -= s->mb_stride;
451− q2 = FFABS(s->current_picture.qscale_table[off]);
451+ q2 = FFABS(s->cur_pic.qscale_table[off]);
452452 if (q2 && q2 != q1)
453453 b = (int)((unsigned)b * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x20000) >> 18;
454454 }
@@ -771,19 +771,19 @@ static int vc1_decode_i_block_adv(VC1Context *v, int16_t block[64], int n, · 316 unmodified lines
771771 else // top
772772 ac_val -= 16 * s->block_wrap[n];
773773
774− q1 = s->current_picture.qscale_table[mb_pos];
774+ q1 = s->cur_pic.qscale_table[mb_pos];
775775 if (n == 3)
776776 q2 = q1;
777777 else if (dc_pred_dir) {
778778 if (n == 1)
779779 q2 = q1;
780780 else if (c_avail && mb_pos)
781− q2 = s->current_picture.qscale_table[mb_pos - 1];
781+ q2 = s->cur_pic.qscale_table[mb_pos - 1];
782782 } else {
783783 if (n == 2)
784784 q2 = q1;
785785 else if (a_avail && mb_pos >= s->mb_stride)
786− q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
786+ q2 = s->cur_pic.qscale_table[mb_pos - s->mb_stride];
787787 }
788788
789789 //AC Decoding
@@ -973,11 +973,11 @@ static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n, · 183 unmodified lines
973973 else //top
974974 ac_val -= 16 * s->block_wrap[n];
975975
976− q1 = s->current_picture.qscale_table[mb_pos];
976+ q1 = s->cur_pic.qscale_table[mb_pos];
977977 if (dc_pred_dir && c_avail && mb_pos)
978− q2 = s->current_picture.qscale_table[mb_pos - 1];
978+ q2 = s->cur_pic.qscale_table[mb_pos - 1];
979979 if (!dc_pred_dir && a_avail && mb_pos >= s->mb_stride)
980− q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
980+ q2 = s->cur_pic.qscale_table[mb_pos - s->mb_stride];
981981 if (dc_pred_dir && n == 1)
982982 q2 = q1;
983983 if (!dc_pred_dir && n == 2)
@@ -1314,10 +1314,10 @@ static int vc1_decode_p_mb(VC1Context *v) · 330 unmodified lines
13141314 GET_MVDATA(dmv_x, dmv_y);
13151315
13161316 if (s->mb_intra) {
1317− s->current_picture.motion_val[1][s->block_index[0]][0] = 0;
1318− s->current_picture.motion_val[1][s->block_index[0]][1] = 0;
1317+ s->cur_pic.motion_val[1][s->block_index[0]][0] = 0;
1318+ s->cur_pic.motion_val[1][s->block_index[0]][1] = 0;
13191319 }
1320− s->current_picture.mb_type[mb_pos] = s->mb_intra ? MB_TYPE_INTRA : MB_TYPE_16x16;
1320+ s->cur_pic.mb_type[mb_pos] = s->mb_intra ? MB_TYPE_INTRA : MB_TYPE_16x16;
13211321 ff_vc1_pred_mv(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], 0, 0);
13221322
13231323 /* FIXME Set DC val for inter block ? */
@@ -1334,7 +1334,7 @@ static int vc1_decode_p_mb(VC1Context *v) · 10 unmodified lines
13341334 mquant = v->pq;
13351335 cbp = 0;
13361336 }
1337− s->current_picture.qscale_table[mb_pos] = mquant;
1337+ s->cur_pic.qscale_table[mb_pos] = mquant;
13381338
13391339 if (!v->ttmbf && !s->mb_intra && mb_has_coeffs)
13401340 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index],
@@ -1383,8 +1383,8 @@ static int vc1_decode_p_mb(VC1Context *v) · 42 unmodified lines
13831383 v->mb_type[0][s->block_index[i]] = 0;
13841384 s->dc_val[0][s->block_index[i]] = 0;
13851385 }
1386− s->current_picture.mb_type[mb_pos] = MB_TYPE_SKIP;
1387− s->current_picture.qscale_table[mb_pos] = 0;
1386+ s->cur_pic.mb_type[mb_pos] = MB_TYPE_SKIP;
1387+ s->cur_pic.qscale_table[mb_pos] = 0;
13881388 ff_vc1_pred_mv(v, 0, 0, 0, 1, v->range_x, v->range_y, v->mb_type[0], 0, 0);
13891389 ff_vc1_mc_1mv(v, 0);
13901390 }
@@ -1427,7 +1427,7 @@ static int vc1_decode_p_mb(VC1Context *v) · 36 unmodified lines
14271427 if (!intra_count && !coded_inter)
14281428 goto end;
14291429 GET_MQUANT();
1430− s->current_picture.qscale_table[mb_pos] = mquant;
1430+ s->cur_pic.qscale_table[mb_pos] = mquant;
14311431 /* test if block is intra and has pred */
14321432 {
14331433 int intrapred = 0;
@@ -1484,7 +1484,7 @@ static int vc1_decode_p_mb(VC1Context *v) · 50 unmodified lines
14841484 }
14851485 } else { // skipped MB
14861486 s->mb_intra = 0;
1487− s->current_picture.qscale_table[mb_pos] = 0;
1487+ s->cur_pic.qscale_table[mb_pos] = 0;
14881488 for (i = 0; i < 6; i++) {
14891489 v->mb_type[0][s->block_index[i]] = 0;
14901490 s->dc_val[0][s->block_index[i]] = 0;
@@ -1494,7 +1494,7 @@ static int vc1_decode_p_mb(VC1Context *v) · 3 unmodified lines
14941494 ff_vc1_mc_4mv_luma(v, i, 0, 0);
14951495 }
14961496 ff_vc1_mc_4mv_chroma(v, 0);
1497− s->current_picture.qscale_table[mb_pos] = 0;
1497+ s->cur_pic.qscale_table[mb_pos] = 0;
14981498 }
14991499 }
15001500 end:
@@ -1574,19 +1574,19 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) · 73 unmodified lines
15741574 }
15751575 if (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_INTRA) { // intra MB
15761576 for (i = 0; i < 4; i++) {
1577− s->current_picture.motion_val[1][s->block_index[i]][0] = 0;
1578− s->current_picture.motion_val[1][s->block_index[i]][1] = 0;
1577+ s->cur_pic.motion_val[1][s->block_index[i]][0] = 0;
1578+ s->cur_pic.motion_val[1][s->block_index[i]][1] = 0;
15791579 }
15801580 v->is_intra[s->mb_x] = 0x3f; // Set the bitfield to all 1.
15811581 s->mb_intra = 1;
1582− s->current_picture.mb_type[mb_pos] = MB_TYPE_INTRA;
1582+ s->cur_pic.mb_type[mb_pos] = MB_TYPE_INTRA;
15831583 fieldtx = v->fieldtx_plane[mb_pos] = get_bits1(gb);
15841584 mb_has_coeffs = get_bits1(gb);
15851585 if (mb_has_coeffs)
15861586 cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc, VC1_CBPCY_P_VLC_BITS, 2);
15871587 v->s.ac_pred = v->acpred_plane[mb_pos] = get_bits1(gb);
15881588 GET_MQUANT();
1589− s->current_picture.qscale_table[mb_pos] = mquant;
1589+ s->cur_pic.qscale_table[mb_pos] = mquant;
15901590 /* Set DC scale - y and c use the same (not sure if necessary here) */
15911591 s->y_dc_scale = s->y_dc_scale_table[FFABS(mquant)];
15921592 s->c_dc_scale = s->c_dc_scale_table[FFABS(mquant)];
@@ -1666,7 +1666,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) · 73 unmodified lines
16661666 }
16671667 if (cbp)
16681668 GET_MQUANT(); // p. 227
1669− s->current_picture.qscale_table[mb_pos] = mquant;
1669+ s->cur_pic.qscale_table[mb_pos] = mquant;
16701670 if (!v->ttmbf && cbp)
16711671 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index], VC1_TTMB_VLC_BITS, 2);
16721672 for (i = 0; i < 6; i++) {
@@ -1697,8 +1697,8 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) · 24 unmodified lines
16971697 v->mb_type[0][s->block_index[i]] = 0;
16981698 s->dc_val[0][s->block_index[i]] = 0;
16991699 }
1700− s->current_picture.mb_type[mb_pos] = MB_TYPE_SKIP;
1701− s->current_picture.qscale_table[mb_pos] = 0;
1700+ s->cur_pic.mb_type[mb_pos] = MB_TYPE_SKIP;
1701+ s->cur_pic.qscale_table[mb_pos] = 0;
17021702 v->blk_mv_type[s->block_index[0]] = 0;
17031703 v->blk_mv_type[s->block_index[1]] = 0;
17041704 v->blk_mv_type[s->block_index[2]] = 0;
@@ -1742,11 +1742,11 @@ static int vc1_decode_p_mb_intfi(VC1Context *v) · 37 unmodified lines
17421742 if (idx_mbmode <= 1) { // intra MB
17431743 v->is_intra[s->mb_x] = 0x3f; // Set the bitfield to all 1.
17441744 s->mb_intra = 1;
1745− s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0;
1746− s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0;
1747− s->current_picture.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA;
1745+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0;
1746+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0;
1747+ s->cur_pic.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA;
17481748 GET_MQUANT();
1749− s->current_picture.qscale_table[mb_pos] = mquant;
1749+ s->cur_pic.qscale_table[mb_pos] = mquant;
17501750 /* Set DC scale - y and c use the same (not sure if necessary here) */
17511751 s->y_dc_scale = s->y_dc_scale_table[FFABS(mquant)];
17521752 s->c_dc_scale = s->c_dc_scale_table[FFABS(mquant)];
@@ -1775,7 +1775,7 @@ static int vc1_decode_p_mb_intfi(VC1Context *v) · 22 unmodified lines
17751775 }
17761776 } else {
17771777 s->mb_intra = v->is_intra[s->mb_x] = 0;
1778− s->current_picture.mb_type[mb_pos + v->mb_off] = MB_TYPE_16x16;
1778+ s->cur_pic.mb_type[mb_pos + v->mb_off] = MB_TYPE_16x16;
17791779 for (i = 0; i < 6; i++)
17801780 v->mb_type[0][s->block_index[i]] = 0;
17811781 if (idx_mbmode <= 5) { // 1-MV
@@ -1803,7 +1803,7 @@ static int vc1_decode_p_mb_intfi(VC1Context *v) · 21 unmodified lines
18031803 if (cbp) {
18041804 GET_MQUANT();
18051805 }
1806− s->current_picture.qscale_table[mb_pos] = mquant;
1806+ s->cur_pic.qscale_table[mb_pos] = mquant;
18071807 if (!v->ttmbf && cbp) {
18081808 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index], VC1_TTMB_VLC_BITS, 2);
18091809 }
@@ -1875,7 +1875,7 @@ static int vc1_decode_b_mb(VC1Context *v) · 65 unmodified lines
18751875 v->mb_type[0][s->block_index[i]] = 0;
18761876 s->dc_val[0][s->block_index[i]] = 0;
18771877 }
1878− s->current_picture.qscale_table[mb_pos] = 0;
1878+ s->cur_pic.qscale_table[mb_pos] = 0;
18791879
18801880 if (!direct) {
18811881 if (!skipped) {
@@ -1912,7 +1912,7 @@ static int vc1_decode_b_mb(VC1Context *v) · 30 unmodified lines
19121912 cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc, VC1_CBPCY_P_VLC_BITS, 2);
19131913 GET_MQUANT();
19141914 s->mb_intra = 0;
1915− s->current_picture.qscale_table[mb_pos] = mquant;
1915+ s->cur_pic.qscale_table[mb_pos] = mquant;
19161916 if (!v->ttmbf)
19171917 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index], VC1_TTMB_VLC_BITS, 2);
19181918 dmv_x[0] = dmv_y[0] = dmv_x[1] = dmv_y[1] = 0;
@@ -1927,7 +1927,7 @@ static int vc1_decode_b_mb(VC1Context *v) · 8 unmodified lines
19271927 }
19281928 if (s->mb_intra && !mb_has_coeffs) {
19291929 GET_MQUANT();
1930− s->current_picture.qscale_table[mb_pos] = mquant;
1930+ s->cur_pic.qscale_table[mb_pos] = mquant;
19311931 s->ac_pred = get_bits1(gb);
19321932 cbp = 0;
19331933 ff_vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
@@ -1949,7 +1949,7 @@ static int vc1_decode_b_mb(VC1Context *v) · 15 unmodified lines
19491949 s->ac_pred = get_bits1(gb);
19501950 cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc, VC1_CBPCY_P_VLC_BITS, 2);
19511951 GET_MQUANT();
1952− s->current_picture.qscale_table[mb_pos] = mquant;
1952+ s->cur_pic.qscale_table[mb_pos] = mquant;
19531953 if (!v->ttmbf && !s->mb_intra && mb_has_coeffs)
19541954 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index], VC1_TTMB_VLC_BITS, 2);
19551955 }
@@ -2024,11 +2024,11 @@ static int vc1_decode_b_mb_intfi(VC1Context *v) · 68 unmodified lines
20242024 if (idx_mbmode <= 1) { // intra MB
20252025 v->is_intra[s->mb_x] = 0x3f; // Set the bitfield to all 1.
20262026 s->mb_intra = 1;
2027− s->current_picture.motion_val[1][s->block_index[0]][0] = 0;
2028− s->current_picture.motion_val[1][s->block_index[0]][1] = 0;
2029− s->current_picture.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA;
2027+ s->cur_pic.motion_val[1][s->block_index[0]][0] = 0;
2028+ s->cur_pic.motion_val[1][s->block_index[0]][1] = 0;
2029+ s->cur_pic.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA;
20302030 GET_MQUANT();
2031− s->current_picture.qscale_table[mb_pos] = mquant;
2031+ s->cur_pic.qscale_table[mb_pos] = mquant;
20322032 /* Set DC scale - y and c use the same (not sure if necessary here) */
20332033 s->y_dc_scale = s->y_dc_scale_table[FFABS(mquant)];
20342034 s->c_dc_scale = s->c_dc_scale_table[FFABS(mquant)];
@@ -2064,7 +2064,7 @@ static int vc1_decode_b_mb_intfi(VC1Context *v) · 29 unmodified lines
20642064 }
20652065 } else {
20662066 s->mb_intra = v->is_intra[s->mb_x] = 0;
2067− s->current_picture.mb_type[mb_pos + v->mb_off] = MB_TYPE_16x16;
2067+ s->cur_pic.mb_type[mb_pos + v->mb_off] = MB_TYPE_16x16;
20682068 for (i = 0; i < 6; i++)
20692069 v->mb_type[0][s->block_index[i]] = 0;
20702070 if (v->fmb_is_raw)
@@ -2101,7 +2101,7 @@ static int vc1_decode_b_mb_intfi(VC1Context *v) · 30 unmodified lines
21012101 if (bmvtype == BMV_TYPE_DIRECT) {
21022102 dmv_x[0] = dmv_y[0] = pred_flag[0] = 0;
21032103 dmv_x[1] = dmv_y[1] = pred_flag[0] = 0;
2104− if (!s->next_picture_ptr->field_picture) {
2104+ if (!s->next_pic_ptr->field_picture) {
21052105 av_log(s->avctx, AV_LOG_ERROR, "Mixed field/frame direct mode not supported\n");
21062106 return AVERROR_INVALIDDATA;
21072107 }
@@ -2133,7 +2133,7 @@ static int vc1_decode_b_mb_intfi(VC1Context *v) · 25 unmodified lines
21332133 if (cbp) {
21342134 GET_MQUANT();
21352135 }
2136− s->current_picture.qscale_table[mb_pos] = mquant;
2136+ s->cur_pic.qscale_table[mb_pos] = mquant;
21372137 if (!v->ttmbf && cbp) {
21382138 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index], VC1_TTMB_VLC_BITS, 2);
21392139 }
@@ -2212,21 +2212,21 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 72 unmodified lines
22122212
22132213 if (ff_vc1_mbmode_intfrp[0][idx_mbmode][0] == MV_PMODE_INTFR_INTRA) { // intra MB
22142214 for (i = 0; i < 4; i++) {
2215− s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0] = 0;
2216− s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1] = 0;
2217− s->mv[1][i][0] = s->current_picture.motion_val[1][s->block_index[i]][0] = 0;
2218− s->mv[1][i][1] = s->current_picture.motion_val[1][s->block_index[i]][1] = 0;
2215+ s->mv[0][i][0] = s->cur_pic.motion_val[0][s->block_index[i]][0] = 0;
2216+ s->mv[0][i][1] = s->cur_pic.motion_val[0][s->block_index[i]][1] = 0;
2217+ s->mv[1][i][0] = s->cur_pic.motion_val[1][s->block_index[i]][0] = 0;
2218+ s->mv[1][i][1] = s->cur_pic.motion_val[1][s->block_index[i]][1] = 0;
22192219 }
22202220 v->is_intra[s->mb_x] = 0x3f; // Set the bitfield to all 1.
22212221 s->mb_intra = 1;
2222− s->current_picture.mb_type[mb_pos] = MB_TYPE_INTRA;
2222+ s->cur_pic.mb_type[mb_pos] = MB_TYPE_INTRA;
22232223 fieldtx = v->fieldtx_plane[mb_pos] = get_bits1(gb);
22242224 mb_has_coeffs = get_bits1(gb);
22252225 if (mb_has_coeffs)
22262226 cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc, VC1_CBPCY_P_VLC_BITS, 2);
22272227 v->s.ac_pred = v->acpred_plane[mb_pos] = get_bits1(gb);
22282228 GET_MQUANT();
2229− s->current_picture.qscale_table[mb_pos] = mquant;
2229+ s->cur_pic.qscale_table[mb_pos] = mquant;
22302230 /* Set DC scale - y and c use the same (not sure if necessary here) */
22312231 s->y_dc_scale = s->y_dc_scale_table[FFABS(mquant)];
22322232 s->c_dc_scale = s->c_dc_scale_table[FFABS(mquant)];
@@ -2267,31 +2267,31 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 34 unmodified lines
22672267 direct = v->direct_mb_plane[mb_pos];
22682268
22692269 if (direct) {
2270− if (s->next_picture_ptr->field_picture)
2270+ if (s->next_pic_ptr->field_picture)
22712271 av_log(s->avctx, AV_LOG_WARNING, "Mixed frame/field direct mode not supported\n");
2272− s->mv[0][0][0] = s->current_picture.motion_val[0][s->block_index[0]][0] = scale_mv(s->next_picture.motion_val[1][s->block_index[0]][0], v->bfraction, 0, s->quarter_sample);
2273− s->mv[0][0][1] = s->current_picture.motion_val[0][s->block_index[0]][1] = scale_mv(s->next_picture.motion_val[1][s->block_index[0]][1], v->bfraction, 0, s->quarter_sample);
2274− s->mv[1][0][0] = s->current_picture.motion_val[1][s->block_index[0]][0] = scale_mv(s->next_picture.motion_val[1][s->block_index[0]][0], v->bfraction, 1, s->quarter_sample);
2275− s->mv[1][0][1] = s->current_picture.motion_val[1][s->block_index[0]][1] = scale_mv(s->next_picture.motion_val[1][s->block_index[0]][1], v->bfraction, 1, s->quarter_sample);
2272+ s->mv[0][0][0] = s->cur_pic.motion_val[0][s->block_index[0]][0] = scale_mv(s->next_pic.motion_val[1][s->block_index[0]][0], v->bfraction, 0, s->quarter_sample);
2273+ s->mv[0][0][1] = s->cur_pic.motion_val[0][s->block_index[0]][1] = scale_mv(s->next_pic.motion_val[1][s->block_index[0]][1], v->bfraction, 0, s->quarter_sample);
2274+ s->mv[1][0][0] = s->cur_pic.motion_val[1][s->block_index[0]][0] = scale_mv(s->next_pic.motion_val[1][s->block_index[0]][0], v->bfraction, 1, s->quarter_sample);
2275+ s->mv[1][0][1] = s->cur_pic.motion_val[1][s->block_index[0]][1] = scale_mv(s->next_pic.motion_val[1][s->block_index[0]][1], v->bfraction, 1, s->quarter_sample);
22762276
22772277 if (twomv) {
2278− s->mv[0][2][0] = s->current_picture.motion_val[0][s->block_index[2]][0] = scale_mv(s->next_picture.motion_val[1][s->block_index[2]][0], v->bfraction, 0, s->quarter_sample);
2279− s->mv[0][2][1] = s->current_picture.motion_val[0][s->block_index[2]][1] = scale_mv(s->next_picture.motion_val[1][s->block_index[2]][1], v->bfraction, 0, s->quarter_sample);
2280− s->mv[1][2][0] = s->current_picture.motion_val[1][s->block_index[2]][0] = scale_mv(s->next_picture.motion_val[1][s->block_index[2]][0], v->bfraction, 1, s->quarter_sample);
2281− s->mv[1][2][1] = s->current_picture.motion_val[1][s->block_index[2]][1] = scale_mv(s->next_picture.motion_val[1][s->block_index[2]][1], v->bfraction, 1, s->quarter_sample);
2278+ s->mv[0][2][0] = s->cur_pic.motion_val[0][s->block_index[2]][0] = scale_mv(s->next_pic.motion_val[1][s->block_index[2]][0], v->bfraction, 0, s->quarter_sample);
2279+ s->mv[0][2][1] = s->cur_pic.motion_val[0][s->block_index[2]][1] = scale_mv(s->next_pic.motion_val[1][s->block_index[2]][1], v->bfraction, 0, s->quarter_sample);
2280+ s->mv[1][2][0] = s->cur_pic.motion_val[1][s->block_index[2]][0] = scale_mv(s->next_pic.motion_val[1][s->block_index[2]][0], v->bfraction, 1, s->quarter_sample);
2281+ s->mv[1][2][1] = s->cur_pic.motion_val[1][s->block_index[2]][1] = scale_mv(s->next_pic.motion_val[1][s->block_index[2]][1], v->bfraction, 1, s->quarter_sample);
22822282
22832283 for (i = 1; i < 4; i += 2) {
2284− s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0] = s->mv[0][i-1][0];
2285− s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1] = s->mv[0][i-1][1];
2286− s->mv[1][i][0] = s->current_picture.motion_val[1][s->block_index[i]][0] = s->mv[1][i-1][0];
2287− s->mv[1][i][1] = s->current_picture.motion_val[1][s->block_index[i]][1] = s->mv[1][i-1][1];
2284+ s->mv[0][i][0] = s->cur_pic.motion_val[0][s->block_index[i]][0] = s->mv[0][i-1][0];
2285+ s->mv[0][i][1] = s->cur_pic.motion_val[0][s->block_index[i]][1] = s->mv[0][i-1][1];
2286+ s->mv[1][i][0] = s->cur_pic.motion_val[1][s->block_index[i]][0] = s->mv[1][i-1][0];
2287+ s->mv[1][i][1] = s->cur_pic.motion_val[1][s->block_index[i]][1] = s->mv[1][i-1][1];
22882288 }
22892289 } else {
22902290 for (i = 1; i < 4; i++) {
2291− s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0] = s->mv[0][0][0];
2292− s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1] = s->mv[0][0][1];
2293− s->mv[1][i][0] = s->current_picture.motion_val[1][s->block_index[i]][0] = s->mv[1][0][0];
2294− s->mv[1][i][1] = s->current_picture.motion_val[1][s->block_index[i]][1] = s->mv[1][0][1];
2291+ s->mv[0][i][0] = s->cur_pic.motion_val[0][s->block_index[i]][0] = s->mv[0][0][0];
2292+ s->mv[0][i][1] = s->cur_pic.motion_val[0][s->block_index[i]][1] = s->mv[0][0][1];
2293+ s->mv[1][i][0] = s->cur_pic.motion_val[1][s->block_index[i]][0] = s->mv[1][0][0];
2294+ s->mv[1][i][1] = s->cur_pic.motion_val[1][s->block_index[i]][1] = s->mv[1][0][1];
22952295 }
22962296 }
22972297 }
@@ -2393,10 +2393,10 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 95 unmodified lines
23932393
23942394 if (mvsw) {
23952395 for (i = 0; i < 2; i++) {
2396− s->mv[dir][i+2][0] = s->mv[dir][i][0] = s->current_picture.motion_val[dir][s->block_index[i+2]][0] = s->current_picture.motion_val[dir][s->block_index[i]][0];
2397− s->mv[dir][i+2][1] = s->mv[dir][i][1] = s->current_picture.motion_val[dir][s->block_index[i+2]][1] = s->current_picture.motion_val[dir][s->block_index[i]][1];
2398− s->mv[dir2][i+2][0] = s->mv[dir2][i][0] = s->current_picture.motion_val[dir2][s->block_index[i]][0] = s->current_picture.motion_val[dir2][s->block_index[i+2]][0];
2399− s->mv[dir2][i+2][1] = s->mv[dir2][i][1] = s->current_picture.motion_val[dir2][s->block_index[i]][1] = s->current_picture.motion_val[dir2][s->block_index[i+2]][1];
2396+ s->mv[dir][i+2][0] = s->mv[dir][i][0] = s->cur_pic.motion_val[dir][s->block_index[i+2]][0] = s->cur_pic.motion_val[dir][s->block_index[i]][0];
2397+ s->mv[dir][i+2][1] = s->mv[dir][i][1] = s->cur_pic.motion_val[dir][s->block_index[i+2]][1] = s->cur_pic.motion_val[dir][s->block_index[i]][1];
2398+ s->mv[dir2][i+2][0] = s->mv[dir2][i][0] = s->cur_pic.motion_val[dir2][s->block_index[i]][0] = s->cur_pic.motion_val[dir2][s->block_index[i+2]][0];
2399+ s->mv[dir2][i+2][1] = s->mv[dir2][i][1] = s->cur_pic.motion_val[dir2][s->block_index[i]][1] = s->cur_pic.motion_val[dir2][s->block_index[i+2]][1];
24002400 }
24012401 } else {
24022402 ff_vc1_pred_mv_intfr(v, 0, 0, 0, 2, v->range_x, v->range_y, !dir);
@@ -2423,15 +2423,15 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 20 unmodified lines
24232423 v->blk_mv_type[s->block_index[3]] = 1;
24242424 ff_vc1_pred_mv_intfr(v, 0, 0, 0, 2, v->range_x, v->range_y, !dir);
24252425 for (i = 0; i < 2; i++) {
2426− s->mv[!dir][i+2][0] = s->mv[!dir][i][0] = s->current_picture.motion_val[!dir][s->block_index[i+2]][0] = s->current_picture.motion_val[!dir][s->block_index[i]][0];
2427− s->mv[!dir][i+2][1] = s->mv[!dir][i][1] = s->current_picture.motion_val[!dir][s->block_index[i+2]][1] = s->current_picture.motion_val[!dir][s->block_index[i]][1];
2426+ s->mv[!dir][i+2][0] = s->mv[!dir][i][0] = s->cur_pic.motion_val[!dir][s->block_index[i+2]][0] = s->cur_pic.motion_val[!dir][s->block_index[i]][0];
2427+ s->mv[!dir][i+2][1] = s->mv[!dir][i][1] = s->cur_pic.motion_val[!dir][s->block_index[i+2]][1] = s->cur_pic.motion_val[!dir][s->block_index[i]][1];
24282428 }
24292429 ff_vc1_mc_1mv(v, dir);
24302430 }
24312431
24322432 if (cbp)
24332433 GET_MQUANT(); // p. 227
2434− s->current_picture.qscale_table[mb_pos] = mquant;
2434+ s->cur_pic.qscale_table[mb_pos] = mquant;
24352435 if (!v->ttmbf && cbp)
24362436 ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index], VC1_TTMB_VLC_BITS, 2);
24372437 for (i = 0; i < 6; i++) {
@@ -2462,8 +2462,8 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 24 unmodified lines
24622462 v->mb_type[0][s->block_index[i]] = 0;
24632463 s->dc_val[0][s->block_index[i]] = 0;
24642464 }
2465− s->current_picture.mb_type[mb_pos] = MB_TYPE_SKIP;
2466− s->current_picture.qscale_table[mb_pos] = 0;
2465+ s->cur_pic.mb_type[mb_pos] = MB_TYPE_SKIP;
2466+ s->cur_pic.qscale_table[mb_pos] = 0;
24672467 v->blk_mv_type[s->block_index[0]] = 0;
24682468 v->blk_mv_type[s->block_index[1]] = 0;
24692469 v->blk_mv_type[s->block_index[2]] = 0;
@@ -2481,10 +2481,10 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 11 unmodified lines
24812481 if (mvsw)
24822482 dir2 = !dir;
24832483 for (i = 0; i < 2; i++) {
2484− s->mv[dir][i+2][0] = s->mv[dir][i][0] = s->current_picture.motion_val[dir][s->block_index[i+2]][0] = s->current_picture.motion_val[dir][s->block_index[i]][0];
2485− s->mv[dir][i+2][1] = s->mv[dir][i][1] = s->current_picture.motion_val[dir][s->block_index[i+2]][1] = s->current_picture.motion_val[dir][s->block_index[i]][1];
2486− s->mv[dir2][i+2][0] = s->mv[dir2][i][0] = s->current_picture.motion_val[dir2][s->block_index[i]][0] = s->current_picture.motion_val[dir2][s->block_index[i+2]][0];
2487− s->mv[dir2][i+2][1] = s->mv[dir2][i][1] = s->current_picture.motion_val[dir2][s->block_index[i]][1] = s->current_picture.motion_val[dir2][s->block_index[i+2]][1];
2484+ s->mv[dir][i+2][0] = s->mv[dir][i][0] = s->cur_pic.motion_val[dir][s->block_index[i+2]][0] = s->cur_pic.motion_val[dir][s->block_index[i]][0];
2485+ s->mv[dir][i+2][1] = s->mv[dir][i][1] = s->cur_pic.motion_val[dir][s->block_index[i+2]][1] = s->cur_pic.motion_val[dir][s->block_index[i]][1];
2486+ s->mv[dir2][i+2][0] = s->mv[dir2][i][0] = s->cur_pic.motion_val[dir2][s->block_index[i]][0] = s->cur_pic.motion_val[dir2][s->block_index[i+2]][0];
2487+ s->mv[dir2][i+2][1] = s->mv[dir2][i][1] = s->cur_pic.motion_val[dir2][s->block_index[i]][1] = s->cur_pic.motion_val[dir2][s->block_index[i+2]][1];
24882488 }
24892489 } else {
24902490 v->blk_mv_type[s->block_index[0]] = 1;
@@ -2493,8 +2493,8 @@ static int vc1_decode_b_mb_intfr(VC1Context *v) · 2 unmodified lines
24932493 v->blk_mv_type[s->block_index[3]] = 1;
24942494 ff_vc1_pred_mv_intfr(v, 0, 0, 0, 2, v->range_x, v->range_y, !dir);
24952495 for (i = 0; i < 2; i++) {
2496− s->mv[!dir][i+2][0] = s->mv[!dir][i][0] = s->current_picture.motion_val[!dir][s->block_index[i+2]][0] = s->current_picture.motion_val[!dir][s->block_index[i]][0];
2497− s->mv[!dir][i+2][1] = s->mv[!dir][i][1] = s->current_picture.motion_val[!dir][s->block_index[i+2]][1] = s->current_picture.motion_val[!dir][s->block_index[i]][1];
2496+ s->mv[!dir][i+2][0] = s->mv[!dir][i][0] = s->cur_pic.motion_val[!dir][s->block_index[i+2]][0] = s->cur_pic.motion_val[!dir][s->block_index[i]][0];
2497+ s->mv[!dir][i+2][1] = s->mv[!dir][i][1] = s->cur_pic.motion_val[!dir][s->block_index[i+2]][1] = s->cur_pic.motion_val[!dir][s->block_index[i]][1];
24982498 }
24992499 }
25002500 }
@@ -2563,11 +2563,11 @@ static void vc1_decode_i_blocks(VC1Context *v) · 62 unmodified lines
25632563 update_block_index(s);
25642564 s->bdsp.clear_blocks(v->block[v->cur_blk_idx][0]);
25652565 mb_pos = s->mb_x + s->mb_y * s->mb_width;
2566− s->current_picture.mb_type[mb_pos] = MB_TYPE_INTRA;
2567− s->current_picture.qscale_table[mb_pos] = v->pq;
2566+ s->cur_pic.mb_type[mb_pos] = MB_TYPE_INTRA;
2567+ s->cur_pic.qscale_table[mb_pos] = v->pq;
25682568 for (int i = 0; i < 4; i++) {
2569− s->current_picture.motion_val[1][s->block_index[i]][0] = 0;
2570− s->current_picture.motion_val[1][s->block_index[i]][1] = 0;
2569+ s->cur_pic.motion_val[1][s->block_index[i]][0] = 0;
2570+ s->cur_pic.motion_val[1][s->block_index[i]][1] = 0;
25712571 }
25722572
25732573 // do actual MB decoding and displaying
@@ -2693,10 +2693,10 @@ static int vc1_decode_i_blocks_adv(VC1Context *v) · 119 unmodified lines
26932693 update_block_index(s);
26942694 s->bdsp.clear_blocks(v->block[v->cur_blk_idx][0]);
26952695 mb_pos = s->mb_x + s->mb_y * s->mb_stride;
2696− s->current_picture.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA;
2696+ s->cur_pic.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA;
26972697 for (int i = 0; i < 4; i++) {
2698− s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = 0;
2699− s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][1] = 0;
2698+ s->cur_pic.motion_val[1][s->block_index[i] + v->blocks_off][0] = 0;
2699+ s->cur_pic.motion_val[1][s->block_index[i] + v->blocks_off][1] = 0;
27002700 }
27012701
27022702 // do actual MB decoding and displaying
@@ -2719,7 +2719,7 @@ static int vc1_decode_i_blocks_adv(VC1Context *v) · 16 unmodified lines
27192719
27202720 GET_MQUANT();
27212721
2722− s->current_picture.qscale_table[mb_pos] = mquant;
2722+ s->cur_pic.qscale_table[mb_pos] = mquant;
27232723 /* Set DC scale - y and c use the same */
27242724 s->y_dc_scale = s->y_dc_scale_table[FFABS(mquant)];
27252725 s->c_dc_scale = s->c_dc_scale_table[FFABS(mquant)];
@@ -2943,7 +2943,7 @@ static void vc1_decode_skip_blocks(VC1Context *v) · 217 unmodified lines
29432943 {
29442944 MpegEncContext *s = &v->s;
29452945
2946− if (!v->s.last_picture.f->data[0])
2946+ if (!v->s.last_pic.f->data[0])
29472947 return;
29482948
29492949 ff_er_add_slice(&s->er, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, ER_MB_END);
@@ -2952,9 +2952,9 @@ static void vc1_decode_skip_blocks(VC1Context *v) · 2 unmodified lines
29522952 s->mb_x = 0;
29532953 init_block_index(v);
29542954 update_block_index(s);
2955− memcpy(s->dest[0], s->last_picture.f->data[0] + s->mb_y * 16 * s->linesize, s->linesize * 16);
2956− memcpy(s->dest[1], s->last_picture.f->data[1] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8);
2957− memcpy(s->dest[2], s->last_picture.f->data[2] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8);
2955+ memcpy(s->dest[0], s->last_pic.f->data[0] + s->mb_y * 16 * s->linesize, s->linesize * 16);
2956+ memcpy(s->dest[1], s->last_pic.f->data[1] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8);
2957+ memcpy(s->dest[2], s->last_pic.f->data[2] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8);
29582958 s->first_slice_line = 0;
29592959 }
29602960 }
@@ -2964,7 +2964,7 @@ void ff_vc1_decode_blocks(VC1Context *v) · 3 unmodified lines
29642964
29652965 v->s.esc3_level_length = 0;
29662966 if (v->x8_type) {
2967− ff_intrax8_decode_picture(&v->x8, &v->s.current_picture,
2967+ ff_intrax8_decode_picture(&v->x8, &v->s.cur_pic,
29682968 &v->s.gb, &v->s.mb_x, &v->s.mb_y,
29692969 2 * v->pq + v->halfpq, v->pq * !v->pquantizer,
29702970 v->s.loop_filter, v->s.low_delay);
libavcodec/vc1_loopfilter.c+15−15
@@ -500,7 +500,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 499 unmodified lines
500500 cbp,
501501 is_intra,
502502 i > 3 ? uvmv :
503− &s->current_picture.motion_val[0][s->block_index[i] - 4 * s->b8_stride - 2 + v->blocks_off],
503+ &s->cur_pic.motion_val[0][s->block_index[i] - 4 * s->b8_stride - 2 + v->blocks_off],
504504 i > 3 ? &v->mv_f[0][s->block_index[i] - 2 * s->mb_stride - 1 + v->mb_off] :
505505 &v->mv_f[0][s->block_index[i] - 4 * s->b8_stride - 2 + v->blocks_off],
506506 ttblk,
@@ -520,7 +520,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 13 unmodified lines
520520 cbp,
521521 is_intra,
522522 i > 3 ? uvmv :
523− &s->current_picture.motion_val[0][s->block_index[i] - 4 * s->b8_stride + v->blocks_off],
523+ &s->cur_pic.motion_val[0][s->block_index[i] - 4 * s->b8_stride + v->blocks_off],
524524 i > 3 ? &v->mv_f[0][s->block_index[i] - 2 * s->mb_stride + v->mb_off] :
525525 &v->mv_f[0][s->block_index[i] - 4 * s->b8_stride + v->blocks_off],
526526 ttblk,
@@ -543,7 +543,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 16 unmodified lines
543543 cbp,
544544 is_intra,
545545 i > 3 ? uvmv :
546− &s->current_picture.motion_val[0][s->block_index[i] - 2 * s->b8_stride - 2 + v->blocks_off],
546+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 * s->b8_stride - 2 + v->blocks_off],
547547 i > 3 ? &v->mv_f[0][s->block_index[i] - s->mb_stride - 1 + v->mb_off] :
548548 &v->mv_f[0][s->block_index[i] - 2 * s->b8_stride - 2 + v->blocks_off],
549549 ttblk,
@@ -562,7 +562,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 12 unmodified lines
562562 cbp,
563563 is_intra,
564564 i > 3 ? uvmv :
565− &s->current_picture.motion_val[0][s->block_index[i] - 2 + v->blocks_off],
565+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 + v->blocks_off],
566566 i > 3 ? &v->mv_f[0][s->block_index[i] - 1 + v->mb_off] :
567567 &v->mv_f[0][s->block_index[i] - 2 + v->blocks_off],
568568 ttblk,
@@ -583,7 +583,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 14 unmodified lines
583583 cbp,
584584 is_intra,
585585 i > 3 ? uvmv :
586− &s->current_picture.motion_val[0][s->block_index[i] - 2 * s->b8_stride + v->blocks_off],
586+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 * s->b8_stride + v->blocks_off],
587587 i > 3 ? &v->mv_f[0][s->block_index[i] - s->mb_stride + v->mb_off] :
588588 &v->mv_f[0][s->block_index[i] - 2 * s->b8_stride + v->blocks_off],
589589 ttblk,
@@ -602,7 +602,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 12 unmodified lines
602602 cbp,
603603 is_intra,
604604 i > 3 ? uvmv :
605− &s->current_picture.motion_val[0][s->block_index[i] + v->blocks_off],
605+ &s->cur_pic.motion_val[0][s->block_index[i] + v->blocks_off],
606606 i > 3 ? &v->mv_f[0][s->block_index[i] + v->mb_off] :
607607 &v->mv_f[0][s->block_index[i] + v->blocks_off],
608608 ttblk,
@@ -625,7 +625,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 16 unmodified lines
625625 cbp,
626626 is_intra,
627627 i > 3 ? uvmv :
628− &s->current_picture.motion_val[0][s->block_index[i] - 4 * s->b8_stride - 4 + v->blocks_off],
628+ &s->cur_pic.motion_val[0][s->block_index[i] - 4 * s->b8_stride - 4 + v->blocks_off],
629629 i > 3 ? &v->mv_f[0][s->block_index[i] - 2 * s->mb_stride - 2 + v->mb_off] :
630630 &v->mv_f[0][s->block_index[i] - 4 * s->b8_stride - 4 + v->blocks_off],
631631 ttblk,
@@ -646,7 +646,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 14 unmodified lines
646646 cbp,
647647 is_intra,
648648 i > 3 ? uvmv :
649− &s->current_picture.motion_val[0][s->block_index[i] - 4 * s->b8_stride - 2 + v->blocks_off],
649+ &s->cur_pic.motion_val[0][s->block_index[i] - 4 * s->b8_stride - 2 + v->blocks_off],
650650 i > 3 ? &v->mv_f[0][s->block_index[i] - 2 * s->mb_stride - 1 + v->mb_off] :
651651 &v->mv_f[0][s->block_index[i] - 4 * s->b8_stride - 2 + v->blocks_off],
652652 ttblk,
@@ -665,7 +665,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 12 unmodified lines
665665 cbp,
666666 is_intra,
667667 i > 3 ? uvmv :
668− &s->current_picture.motion_val[0][s->block_index[i] - 4 * s->b8_stride + v->blocks_off],
668+ &s->cur_pic.motion_val[0][s->block_index[i] - 4 * s->b8_stride + v->blocks_off],
669669 i > 3 ? &v->mv_f[0][s->block_index[i] - 2 * s->mb_stride + v->mb_off] :
670670 &v->mv_f[0][s->block_index[i] - 4 * s->b8_stride + v->blocks_off],
671671 ttblk,
@@ -688,7 +688,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 16 unmodified lines
688688 cbp,
689689 is_intra,
690690 i > 3 ? uvmv :
691− &s->current_picture.motion_val[0][s->block_index[i] - 2 * s->b8_stride - 4 + v->blocks_off],
691+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 * s->b8_stride - 4 + v->blocks_off],
692692 i > 3 ? &v->mv_f[0][s->block_index[i] - s->mb_stride - 2 + v->mb_off] :
693693 &v->mv_f[0][s->block_index[i] - 2 * s->b8_stride - 4 + v->blocks_off],
694694 ttblk,
@@ -709,7 +709,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 14 unmodified lines
709709 cbp,
710710 is_intra,
711711 i > 3 ? uvmv :
712− &s->current_picture.motion_val[0][s->block_index[i] - 2 * s->b8_stride - 2 + v->blocks_off],
712+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 * s->b8_stride - 2 + v->blocks_off],
713713 i > 3 ? &v->mv_f[0][s->block_index[i] - s->mb_stride - 1 + v->mb_off] :
714714 &v->mv_f[0][s->block_index[i] - 2 * s->b8_stride - 2 + v->blocks_off],
715715 ttblk,
@@ -728,7 +728,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 12 unmodified lines
728728 cbp,
729729 is_intra,
730730 i > 3 ? uvmv :
731− &s->current_picture.motion_val[0][s->block_index[i] - 2 * s->b8_stride + v->blocks_off],
731+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 * s->b8_stride + v->blocks_off],
732732 i > 3 ? &v->mv_f[0][s->block_index[i] - s->mb_stride + v->mb_off] :
733733 &v->mv_f[0][s->block_index[i] - 2 * s->b8_stride + v->blocks_off],
734734 ttblk,
@@ -749,7 +749,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 14 unmodified lines
749749 cbp,
750750 is_intra,
751751 i > 3 ? uvmv :
752− &s->current_picture.motion_val[0][s->block_index[i] - 4 + v->blocks_off],
752+ &s->cur_pic.motion_val[0][s->block_index[i] - 4 + v->blocks_off],
753753 i > 3 ? &v->mv_f[0][s->block_index[i] - 2 + v->mb_off] :
754754 &v->mv_f[0][s->block_index[i] - 4 + v->blocks_off],
755755 ttblk,
@@ -770,7 +770,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 14 unmodified lines
770770 cbp,
771771 is_intra,
772772 i > 3 ? uvmv :
773− &s->current_picture.motion_val[0][s->block_index[i] - 2 + v->blocks_off],
773+ &s->cur_pic.motion_val[0][s->block_index[i] - 2 + v->blocks_off],
774774 i > 3 ? &v->mv_f[0][s->block_index[i] - 1 + v->mb_off] :
775775 &v->mv_f[0][s->block_index[i] - 2 + v->blocks_off],
776776 ttblk,
@@ -789,7 +789,7 @@ void ff_vc1_p_loop_filter(VC1Context *v) · 12 unmodified lines
789789 cbp,
790790 is_intra,
791791 i > 3 ? uvmv :
792− &s->current_picture.motion_val[0][s->block_index[i] + v->blocks_off],
792+ &s->cur_pic.motion_val[0][s->block_index[i] + v->blocks_off],
793793 i > 3 ? &v->mv_f[0][s->block_index[i] + v->mb_off] :
794794 &v->mv_f[0][s->block_index[i] + v->blocks_off],
795795 ttblk,
libavcodec/vc1_mc.c+56−56
@@ -184,11 +184,11 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) · 183 unmodified lines
184184
185185 if ((!v->field_mode ||
186186 (v->ref_field_type[dir] == 1 && v->cur_field_type == 1)) &&
187− !v->s.last_picture.f->data[0])
187+ !v->s.last_pic.f->data[0])
188188 return;
189189
190− linesize = s->current_picture_ptr->f->linesize[0];
191− uvlinesize = s->current_picture_ptr->f->linesize[1];
190+ linesize = s->cur_pic_ptr->f->linesize[0];
191+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
192192
193193 mx = s->mv[dir][0][0];
194194 my = s->mv[dir][0][1];
@@ -196,8 +196,8 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) · 1 unmodified line
196196 // store motion vectors for further use in B-frames
197197 if (s->pict_type == AV_PICTURE_TYPE_P) {
198198 for (i = 0; i < 4; i++) {
199− s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
200− s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][1] = my;
199+ s->cur_pic.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
200+ s->cur_pic.motion_val[1][s->block_index[i] + v->blocks_off][1] = my;
201201 }
202202 }
203203
@@ -219,30 +219,30 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) · 15 unmodified lines
219219 }
220220 if (!dir) {
221221 if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
222− srcY = s->current_picture.f->data[0];
223− srcU = s->current_picture.f->data[1];
224− srcV = s->current_picture.f->data[2];
222+ srcY = s->cur_pic.f->data[0];
223+ srcU = s->cur_pic.f->data[1];
224+ srcV = s->cur_pic.f->data[2];
225225 luty = v->curr_luty;
226226 lutuv = v->curr_lutuv;
227227 use_ic = *v->curr_use_ic;
228228 interlace = 1;
229229 } else {
230− srcY = s->last_picture.f->data[0];
231− srcU = s->last_picture.f->data[1];
232− srcV = s->last_picture.f->data[2];
230+ srcY = s->last_pic.f->data[0];
231+ srcU = s->last_pic.f->data[1];
232+ srcV = s->last_pic.f->data[2];
233233 luty = v->last_luty;
234234 lutuv = v->last_lutuv;
235235 use_ic = v->last_use_ic;
236− interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
236+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
237237 }
238238 } else {
239− srcY = s->next_picture.f->data[0];
240− srcU = s->next_picture.f->data[1];
241− srcV = s->next_picture.f->data[2];
239+ srcY = s->next_pic.f->data[0];
240+ srcU = s->next_pic.f->data[1];
241+ srcV = s->next_pic.f->data[2];
242242 luty = v->next_luty;
243243 lutuv = v->next_lutuv;
244244 use_ic = v->next_use_ic;
245− interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
245+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
246246 }
247247
248248 if (!srcY || !srcU) {
@@ -464,31 +464,31 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) · 215 unmodified lines
464464
465465 if ((!v->field_mode ||
466466 (v->ref_field_type[dir] == 1 && v->cur_field_type == 1)) &&
467− !v->s.last_picture.f->data[0])
467+ !v->s.last_pic.f->data[0])
468468 return;
469469
470− linesize = s->current_picture_ptr->f->linesize[0];
470+ linesize = s->cur_pic_ptr->f->linesize[0];
471471
472472 mx = s->mv[dir][n][0];
473473 my = s->mv[dir][n][1];
474474
475475 if (!dir) {
476476 if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
477− srcY = s->current_picture.f->data[0];
477+ srcY = s->cur_pic.f->data[0];
478478 luty = v->curr_luty;
479479 use_ic = *v->curr_use_ic;
480480 interlace = 1;
481481 } else {
482− srcY = s->last_picture.f->data[0];
482+ srcY = s->last_pic.f->data[0];
483483 luty = v->last_luty;
484484 use_ic = v->last_use_ic;
485− interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
485+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
486486 }
487487 } else {
488− srcY = s->next_picture.f->data[0];
488+ srcY = s->next_pic.f->data[0];
489489 luty = v->next_luty;
490490 use_ic = v->next_use_ic;
491− interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
491+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
492492 }
493493
494494 if (!srcY) {
@@ -503,8 +503,8 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) · 8 unmodified lines
503503
504504 if (s->pict_type == AV_PICTURE_TYPE_P && n == 3 && v->field_mode) {
505505 int opp_count = get_luma_mv(v, 0,
506− &s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0],
507− &s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1]);
506+ &s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0],
507+ &s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1]);
508508 int k, f = opp_count > 2;
509509 for (k = 0; k < 4; k++)
510510 v->mv_f[1][s->block_index[k] + v->blocks_off] = f;
@@ -515,8 +515,8 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) · 4 unmodified lines
515515 int width = s->avctx->coded_width;
516516 int height = s->avctx->coded_height >> 1;
517517 if (s->pict_type == AV_PICTURE_TYPE_P) {
518− s->current_picture.motion_val[1][s->block_index[n] + v->blocks_off][0] = mx;
519− s->current_picture.motion_val[1][s->block_index[n] + v->blocks_off][1] = my;
518+ s->cur_pic.motion_val[1][s->block_index[n] + v->blocks_off][0] = mx;
519+ s->cur_pic.motion_val[1][s->block_index[n] + v->blocks_off][1] = my;
520520 }
521521 qx = (s->mb_x * 16) + (mx >> 2);
522522 qy = (s->mb_y * 8) + (my >> 3);
@@ -645,7 +645,7 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) · 122 unmodified lines
645645 int interlace;
646646 int uvlinesize;
647647
648− if (!v->field_mode && !v->s.last_picture.f->data[0])
648+ if (!v->field_mode && !v->s.last_pic.f->data[0])
649649 return;
650650 if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
651651 return;
@@ -654,8 +654,8 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) · 2 unmodified lines
654654 if (!v->field_mode || !v->numref) {
655655 int valid_count = get_chroma_mv(v, dir, &tx, &ty);
656656 if (!valid_count) {
657− s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0;
658− s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0;
657+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0;
658+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0;
659659 v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;
660660 return; //no need to do MC for intra blocks
661661 }
@@ -664,12 +664,12 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) · 2 unmodified lines
664664 int opp_count = get_luma_mv(v, dir, &tx, &ty);
665665 chroma_ref_type = v->cur_field_type ^ (opp_count > 2);
666666 }
667− if (v->field_mode && chroma_ref_type == 1 && v->cur_field_type == 1 && !v->s.last_picture.f->data[0])
667+ if (v->field_mode && chroma_ref_type == 1 && v->cur_field_type == 1 && !v->s.last_pic.f->data[0])
668668 return;
669− s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0] = tx;
670− s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1] = ty;
669+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0] = tx;
670+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1] = ty;
671671
672− uvlinesize = s->current_picture_ptr->f->linesize[1];
672+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
673673
674674 uvmx = (tx + ((tx & 3) == 3)) >> 1;
675675 uvmy = (ty + ((ty & 3) == 3)) >> 1;
@@ -698,24 +698,24 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) · 22 unmodified lines
698698
699699 if (!dir) {
700700 if (v->field_mode && (v->cur_field_type != chroma_ref_type) && v->second_field) {
701− srcU = s->current_picture.f->data[1];
702− srcV = s->current_picture.f->data[2];
701+ srcU = s->cur_pic.f->data[1];
702+ srcV = s->cur_pic.f->data[2];
703703 lutuv = v->curr_lutuv;
704704 use_ic = *v->curr_use_ic;
705705 interlace = 1;
706706 } else {
707− srcU = s->last_picture.f->data[1];
708− srcV = s->last_picture.f->data[2];
707+ srcU = s->last_pic.f->data[1];
708+ srcV = s->last_pic.f->data[2];
709709 lutuv = v->last_lutuv;
710710 use_ic = v->last_use_ic;
711− interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
711+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
712712 }
713713 } else {
714− srcU = s->next_picture.f->data[1];
715− srcV = s->next_picture.f->data[2];
714+ srcU = s->next_pic.f->data[1];
715+ srcV = s->next_pic.f->data[2];
716716 lutuv = v->next_lutuv;
717717 use_ic = v->next_use_ic;
718− interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
718+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
719719 }
720720
721721 if (!srcU) {
@@ -856,7 +856,7 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) · 134 unmodified lines
856856 if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
857857 return;
858858
859− uvlinesize = s->current_picture_ptr->f->linesize[1];
859+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
860860
861861 for (i = 0; i < 4; i++) {
862862 int d = i < 2 ? dir: dir2;
@@ -880,17 +880,17 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) · 17 unmodified lines
880880 else
881881 uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1);
882882 if (i < 2 ? dir : dir2) {
883− srcU = s->next_picture.f->data[1];
884− srcV = s->next_picture.f->data[2];
883+ srcU = s->next_pic.f->data[1];
884+ srcV = s->next_pic.f->data[2];
885885 lutuv = v->next_lutuv;
886886 use_ic = v->next_use_ic;
887− interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
887+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
888888 } else {
889− srcU = s->last_picture.f->data[1];
890− srcV = s->last_picture.f->data[2];
889+ srcU = s->last_pic.f->data[1];
890+ srcV = s->last_pic.f->data[2];
891891 lutuv = v->last_lutuv;
892892 use_ic = v->last_use_ic;
893− interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
893+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
894894 }
895895 if (!srcU)
896896 return;
@@ -1012,11 +1012,11 @@ void ff_vc1_interp_mc(VC1Context *v) · 115 unmodified lines
10121012 int interlace;
10131013 int linesize, uvlinesize;
10141014
1015− if (!v->field_mode && !v->s.next_picture.f->data[0])
1015+ if (!v->field_mode && !v->s.next_pic.f->data[0])
10161016 return;
10171017
1018− linesize = s->current_picture_ptr->f->linesize[0];
1019− uvlinesize = s->current_picture_ptr->f->linesize[1];
1018+ linesize = s->cur_pic_ptr->f->linesize[0];
1019+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
10201020
10211021 mx = s->mv[1][0][0];
10221022 my = s->mv[1][0][1];
@@ -1030,11 +1030,11 @@ void ff_vc1_interp_mc(VC1Context *v) · 7 unmodified lines
10301030 uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1));
10311031 uvmy = uvmy + ((uvmy < 0) ? -(uvmy & 1) : (uvmy & 1));
10321032 }
1033− srcY = s->next_picture.f->data[0];
1034− srcU = s->next_picture.f->data[1];
1035− srcV = s->next_picture.f->data[2];
1033+ srcY = s->next_pic.f->data[0];
1034+ srcU = s->next_pic.f->data[1];
1035+ srcV = s->next_pic.f->data[2];
10361036
1037− interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
1037+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
10381038
10391039 src_x = s->mb_x * 16 + (mx >> 2);
10401040 src_y = s->mb_y * 16 + (my >> 2);
libavcodec/vc1_pred.c+107−107
@@ -241,24 +241,24 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 240 unmodified lines
241241 xy = s->block_index[n];
242242
243243 if (s->mb_intra) {
244− s->mv[0][n][0] = s->current_picture.motion_val[0][xy + v->blocks_off][0] = 0;
245− s->mv[0][n][1] = s->current_picture.motion_val[0][xy + v->blocks_off][1] = 0;
246− s->current_picture.motion_val[1][xy + v->blocks_off][0] = 0;
247− s->current_picture.motion_val[1][xy + v->blocks_off][1] = 0;
244+ s->mv[0][n][0] = s->cur_pic.motion_val[0][xy + v->blocks_off][0] = 0;
245+ s->mv[0][n][1] = s->cur_pic.motion_val[0][xy + v->blocks_off][1] = 0;
246+ s->cur_pic.motion_val[1][xy + v->blocks_off][0] = 0;
247+ s->cur_pic.motion_val[1][xy + v->blocks_off][1] = 0;
248248 if (mv1) { /* duplicate motion data for 1-MV block */
249− s->current_picture.motion_val[0][xy + 1 + v->blocks_off][0] = 0;
250− s->current_picture.motion_val[0][xy + 1 + v->blocks_off][1] = 0;
251− s->current_picture.motion_val[0][xy + wrap + v->blocks_off][0] = 0;
252− s->current_picture.motion_val[0][xy + wrap + v->blocks_off][1] = 0;
253− s->current_picture.motion_val[0][xy + wrap + 1 + v->blocks_off][0] = 0;
254− s->current_picture.motion_val[0][xy + wrap + 1 + v->blocks_off][1] = 0;
249+ s->cur_pic.motion_val[0][xy + 1 + v->blocks_off][0] = 0;
250+ s->cur_pic.motion_val[0][xy + 1 + v->blocks_off][1] = 0;
251+ s->cur_pic.motion_val[0][xy + wrap + v->blocks_off][0] = 0;
252+ s->cur_pic.motion_val[0][xy + wrap + v->blocks_off][1] = 0;
253+ s->cur_pic.motion_val[0][xy + wrap + 1 + v->blocks_off][0] = 0;
254+ s->cur_pic.motion_val[0][xy + wrap + 1 + v->blocks_off][1] = 0;
255255 v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;
256− s->current_picture.motion_val[1][xy + 1 + v->blocks_off][0] = 0;
257− s->current_picture.motion_val[1][xy + 1 + v->blocks_off][1] = 0;
258− s->current_picture.motion_val[1][xy + wrap + v->blocks_off][0] = 0;
259− s->current_picture.motion_val[1][xy + wrap + v->blocks_off][1] = 0;
260− s->current_picture.motion_val[1][xy + wrap + 1 + v->blocks_off][0] = 0;
261− s->current_picture.motion_val[1][xy + wrap + 1 + v->blocks_off][1] = 0;
256+ s->cur_pic.motion_val[1][xy + 1 + v->blocks_off][0] = 0;
257+ s->cur_pic.motion_val[1][xy + 1 + v->blocks_off][1] = 0;
258+ s->cur_pic.motion_val[1][xy + wrap + v->blocks_off][0] = 0;
259+ s->cur_pic.motion_val[1][xy + wrap + v->blocks_off][1] = 0;
260+ s->cur_pic.motion_val[1][xy + wrap + 1 + v->blocks_off][0] = 0;
261+ s->cur_pic.motion_val[1][xy + wrap + 1 + v->blocks_off][1] = 0;
262262 }
263263 return;
264264 }
@@ -301,7 +301,7 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 36 unmodified lines
301301 }
302302
303303 if (a_valid) {
304− A = s->current_picture.motion_val[dir][xy - wrap + v->blocks_off];
304+ A = s->cur_pic.motion_val[dir][xy - wrap + v->blocks_off];
305305 a_f = v->mv_f[dir][xy - wrap + v->blocks_off];
306306 num_oppfield += a_f;
307307 num_samefield += 1 - a_f;
@@ -312,7 +312,7 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 4 unmodified lines
312312 a_f = 0;
313313 }
314314 if (b_valid) {
315− B = s->current_picture.motion_val[dir][xy - wrap + off + v->blocks_off];
315+ B = s->cur_pic.motion_val[dir][xy - wrap + off + v->blocks_off];
316316 b_f = v->mv_f[dir][xy - wrap + off + v->blocks_off];
317317 num_oppfield += b_f;
318318 num_samefield += 1 - b_f;
@@ -323,7 +323,7 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 4 unmodified lines
323323 b_f = 0;
324324 }
325325 if (c_valid) {
326− C = s->current_picture.motion_val[dir][xy - 1 + v->blocks_off];
326+ C = s->cur_pic.motion_val[dir][xy - 1 + v->blocks_off];
327327 c_f = v->mv_f[dir][xy - 1 + v->blocks_off];
328328 num_oppfield += c_f;
329329 num_samefield += 1 - c_f;
@@ -451,15 +451,15 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 121 unmodified lines
451451 if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)
452452 y_bias = 1;
453453 /* store MV using signed modulus of MV range defined in 4.11 */
454− s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
455− s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1] = ((py + dmv_y + r_y - y_bias) & ((r_y << 1) - 1)) - r_y + y_bias;
454+ s->mv[dir][n][0] = s->cur_pic.motion_val[dir][xy + v->blocks_off][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
455+ s->mv[dir][n][1] = s->cur_pic.motion_val[dir][xy + v->blocks_off][1] = ((py + dmv_y + r_y - y_bias) & ((r_y << 1) - 1)) - r_y + y_bias;
456456 if (mv1) { /* duplicate motion data for 1-MV block */
457− s->current_picture.motion_val[dir][xy + 1 + v->blocks_off][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0];
458− s->current_picture.motion_val[dir][xy + 1 + v->blocks_off][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1];
459− s->current_picture.motion_val[dir][xy + wrap + v->blocks_off][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0];
460− s->current_picture.motion_val[dir][xy + wrap + v->blocks_off][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1];
461− s->current_picture.motion_val[dir][xy + wrap + 1 + v->blocks_off][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0];
462− s->current_picture.motion_val[dir][xy + wrap + 1 + v->blocks_off][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1];
457+ s->cur_pic.motion_val[dir][xy + 1 + v->blocks_off][0] = s->cur_pic.motion_val[dir][xy + v->blocks_off][0];
458+ s->cur_pic.motion_val[dir][xy + 1 + v->blocks_off][1] = s->cur_pic.motion_val[dir][xy + v->blocks_off][1];
459+ s->cur_pic.motion_val[dir][xy + wrap + v->blocks_off][0] = s->cur_pic.motion_val[dir][xy + v->blocks_off][0];
460+ s->cur_pic.motion_val[dir][xy + wrap + v->blocks_off][1] = s->cur_pic.motion_val[dir][xy + v->blocks_off][1];
461+ s->cur_pic.motion_val[dir][xy + wrap + 1 + v->blocks_off][0] = s->cur_pic.motion_val[dir][xy + v->blocks_off][0];
462+ s->cur_pic.motion_val[dir][xy + wrap + 1 + v->blocks_off][1] = s->cur_pic.motion_val[dir][xy + v->blocks_off][1];
463463 v->mv_f[dir][xy + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off];
464464 v->mv_f[dir][xy + wrap + v->blocks_off] = v->mv_f[dir][xy + wrap + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off];
465465 }
@@ -483,24 +483,24 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 17 unmodified lines
483483 xy = s->block_index[n];
484484
485485 if (s->mb_intra) {
486− s->mv[0][n][0] = s->current_picture.motion_val[0][xy][0] = 0;
487− s->mv[0][n][1] = s->current_picture.motion_val[0][xy][1] = 0;
488− s->current_picture.motion_val[1][xy][0] = 0;
489− s->current_picture.motion_val[1][xy][1] = 0;
486+ s->mv[0][n][0] = s->cur_pic.motion_val[0][xy][0] = 0;
487+ s->mv[0][n][1] = s->cur_pic.motion_val[0][xy][1] = 0;
488+ s->cur_pic.motion_val[1][xy][0] = 0;
489+ s->cur_pic.motion_val[1][xy][1] = 0;
490490 if (mvn == 1) { /* duplicate motion data for 1-MV block */
491− s->current_picture.motion_val[0][xy + 1][0] = 0;
492− s->current_picture.motion_val[0][xy + 1][1] = 0;
493− s->current_picture.motion_val[0][xy + wrap][0] = 0;
494− s->current_picture.motion_val[0][xy + wrap][1] = 0;
495− s->current_picture.motion_val[0][xy + wrap + 1][0] = 0;
496− s->current_picture.motion_val[0][xy + wrap + 1][1] = 0;
491+ s->cur_pic.motion_val[0][xy + 1][0] = 0;
492+ s->cur_pic.motion_val[0][xy + 1][1] = 0;
493+ s->cur_pic.motion_val[0][xy + wrap][0] = 0;
494+ s->cur_pic.motion_val[0][xy + wrap][1] = 0;
495+ s->cur_pic.motion_val[0][xy + wrap + 1][0] = 0;
496+ s->cur_pic.motion_val[0][xy + wrap + 1][1] = 0;
497497 v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;
498− s->current_picture.motion_val[1][xy + 1][0] = 0;
499− s->current_picture.motion_val[1][xy + 1][1] = 0;
500− s->current_picture.motion_val[1][xy + wrap][0] = 0;
501− s->current_picture.motion_val[1][xy + wrap][1] = 0;
502− s->current_picture.motion_val[1][xy + wrap + 1][0] = 0;
503− s->current_picture.motion_val[1][xy + wrap + 1][1] = 0;
498+ s->cur_pic.motion_val[1][xy + 1][0] = 0;
499+ s->cur_pic.motion_val[1][xy + 1][1] = 0;
500+ s->cur_pic.motion_val[1][xy + wrap][0] = 0;
501+ s->cur_pic.motion_val[1][xy + wrap][1] = 0;
502+ s->cur_pic.motion_val[1][xy + wrap + 1][0] = 0;
503+ s->cur_pic.motion_val[1][xy + wrap + 1][1] = 0;
504504 }
505505 return;
506506 }
@@ -510,14 +510,14 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 3 unmodified lines
510510 if (s->mb_x || (n == 1) || (n == 3)) {
511511 if ((v->blk_mv_type[xy]) // current block (MB) has a field MV
512512 || (!v->blk_mv_type[xy] && !v->blk_mv_type[xy - 1])) { // or both have frame MV
513− A[0] = s->current_picture.motion_val[dir][xy - 1][0];
514− A[1] = s->current_picture.motion_val[dir][xy - 1][1];
513+ A[0] = s->cur_pic.motion_val[dir][xy - 1][0];
514+ A[1] = s->cur_pic.motion_val[dir][xy - 1][1];
515515 a_valid = 1;
516516 } else { // current block has frame mv and cand. has field MV (so average)
517− A[0] = (s->current_picture.motion_val[dir][xy - 1][0]
518− + s->current_picture.motion_val[dir][xy - 1 + off * wrap][0] + 1) >> 1;
519− A[1] = (s->current_picture.motion_val[dir][xy - 1][1]
520− + s->current_picture.motion_val[dir][xy - 1 + off * wrap][1] + 1) >> 1;
517+ A[0] = (s->cur_pic.motion_val[dir][xy - 1][0]
518+ + s->cur_pic.motion_val[dir][xy - 1 + off * wrap][0] + 1) >> 1;
519+ A[1] = (s->cur_pic.motion_val[dir][xy - 1][1]
520+ + s->cur_pic.motion_val[dir][xy - 1 + off * wrap][1] + 1) >> 1;
521521 a_valid = 1;
522522 }
523523 if (!(n & 1) && v->is_intra[s->mb_x - 1]) {
@@ -537,11 +537,11 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 13 unmodified lines
537537 if (v->blk_mv_type[pos_b] && v->blk_mv_type[xy]) {
538538 n_adj = (n & 2) | (n & 1);
539539 }
540− B[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][0];
541− B[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][1];
540+ B[0] = s->cur_pic.motion_val[dir][s->block_index[n_adj] - 2 * wrap][0];
541+ B[1] = s->cur_pic.motion_val[dir][s->block_index[n_adj] - 2 * wrap][1];
542542 if (v->blk_mv_type[pos_b] && !v->blk_mv_type[xy]) {
543− B[0] = (B[0] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][0] + 1) >> 1;
544− B[1] = (B[1] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][1] + 1) >> 1;
543+ B[0] = (B[0] + s->cur_pic.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][0] + 1) >> 1;
544+ B[1] = (B[1] + s->cur_pic.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][1] + 1) >> 1;
545545 }
546546 }
547547 if (s->mb_width > 1) {
@@ -552,11 +552,11 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 4 unmodified lines
552552 if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) {
553553 n_adj = n & 2;
554554 }
555− C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][0];
556− C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][1];
555+ C[0] = s->cur_pic.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][0];
556+ C[1] = s->cur_pic.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][1];
557557 if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) {
558− C[0] = (1 + C[0] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][0])) >> 1;
559− C[1] = (1 + C[1] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][1])) >> 1;
558+ C[0] = (1 + C[0] + (s->cur_pic.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][0])) >> 1;
559+ C[1] = (1 + C[1] + (s->cur_pic.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][1])) >> 1;
560560 }
561561 if (s->mb_x == s->mb_width - 1) {
562562 if (!v->is_intra[s->mb_x - s->mb_stride - 1]) {
@@ -566,11 +566,11 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 3 unmodified lines
566566 if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) {
567567 n_adj = n | 1;
568568 }
569− C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][0];
570− C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][1];
569+ C[0] = s->cur_pic.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][0];
570+ C[1] = s->cur_pic.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][1];
571571 if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) {
572− C[0] = (1 + C[0] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][0]) >> 1;
573− C[1] = (1 + C[1] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][1]) >> 1;
572+ C[0] = (1 + C[0] + s->cur_pic.motion_val[dir][s->block_index[1] - 2 * wrap - 2][0]) >> 1;
573+ C[1] = (1 + C[1] + s->cur_pic.motion_val[dir][s->block_index[1] - 2 * wrap - 2][1]) >> 1;
574574 }
575575 } else
576576 c_valid = 0;
@@ -581,12 +581,12 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 4 unmodified lines
581581 } else {
582582 pos_b = s->block_index[1];
583583 b_valid = 1;
584− B[0] = s->current_picture.motion_val[dir][pos_b][0];
585− B[1] = s->current_picture.motion_val[dir][pos_b][1];
584+ B[0] = s->cur_pic.motion_val[dir][pos_b][0];
585+ B[1] = s->cur_pic.motion_val[dir][pos_b][1];
586586 pos_c = s->block_index[0];
587587 c_valid = 1;
588− C[0] = s->current_picture.motion_val[dir][pos_c][0];
589− C[1] = s->current_picture.motion_val[dir][pos_c][1];
588+ C[0] = s->cur_pic.motion_val[dir][pos_c][0];
589+ C[1] = s->cur_pic.motion_val[dir][pos_c][1];
590590 }
591591
592592 total_valid = a_valid + b_valid + c_valid;
@@ -671,18 +671,18 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, · 78 unmodified lines
671671 }
672672
673673 /* store MV using signed modulus of MV range defined in 4.11 */
674− s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
675− s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y;
674+ s->mv[dir][n][0] = s->cur_pic.motion_val[dir][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
675+ s->mv[dir][n][1] = s->cur_pic.motion_val[dir][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y;
676676 if (mvn == 1) { /* duplicate motion data for 1-MV block */
677− s->current_picture.motion_val[dir][xy + 1 ][0] = s->current_picture.motion_val[dir][xy][0];
678− s->current_picture.motion_val[dir][xy + 1 ][1] = s->current_picture.motion_val[dir][xy][1];
679− s->current_picture.motion_val[dir][xy + wrap ][0] = s->current_picture.motion_val[dir][xy][0];
680− s->current_picture.motion_val[dir][xy + wrap ][1] = s->current_picture.motion_val[dir][xy][1];
681− s->current_picture.motion_val[dir][xy + wrap + 1][0] = s->current_picture.motion_val[dir][xy][0];
682− s->current_picture.motion_val[dir][xy + wrap + 1][1] = s->current_picture.motion_val[dir][xy][1];
677+ s->cur_pic.motion_val[dir][xy + 1 ][0] = s->cur_pic.motion_val[dir][xy][0];
678+ s->cur_pic.motion_val[dir][xy + 1 ][1] = s->cur_pic.motion_val[dir][xy][1];
679+ s->cur_pic.motion_val[dir][xy + wrap ][0] = s->cur_pic.motion_val[dir][xy][0];
680+ s->cur_pic.motion_val[dir][xy + wrap ][1] = s->cur_pic.motion_val[dir][xy][1];
681+ s->cur_pic.motion_val[dir][xy + wrap + 1][0] = s->cur_pic.motion_val[dir][xy][0];
682+ s->cur_pic.motion_val[dir][xy + wrap + 1][1] = s->cur_pic.motion_val[dir][xy][1];
683683 } else if (mvn == 2) { /* duplicate motion data for 2-Field MV block */
684− s->current_picture.motion_val[dir][xy + 1][0] = s->current_picture.motion_val[dir][xy][0];
685− s->current_picture.motion_val[dir][xy + 1][1] = s->current_picture.motion_val[dir][xy][1];
684+ s->cur_pic.motion_val[dir][xy + 1][0] = s->cur_pic.motion_val[dir][xy][0];
685+ s->cur_pic.motion_val[dir][xy + 1][1] = s->cur_pic.motion_val[dir][xy][1];
686686 s->mv[dir][n + 1][0] = s->mv[dir][n][0];
687687 s->mv[dir][n + 1][1] = s->mv[dir][n][1];
688688 }
@@ -715,19 +715,19 @@ void ff_vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], · 26 unmodified lines
715715 xy = s->block_index[0];
716716
717717 if (s->mb_intra) {
718− s->current_picture.motion_val[0][xy][0] =
719− s->current_picture.motion_val[0][xy][1] =
720− s->current_picture.motion_val[1][xy][0] =
721− s->current_picture.motion_val[1][xy][1] = 0;
718+ s->cur_pic.motion_val[0][xy][0] =
719+ s->cur_pic.motion_val[0][xy][1] =
720+ s->cur_pic.motion_val[1][xy][0] =
721+ s->cur_pic.motion_val[1][xy][1] = 0;
722722 return;
723723 }
724− if (direct && s->next_picture_ptr->field_picture)
724+ if (direct && s->next_pic_ptr->field_picture)
725725 av_log(s->avctx, AV_LOG_WARNING, "Mixed frame/field direct mode not supported\n");
726726
727− s->mv[0][0][0] = scale_mv(s->next_picture.motion_val[1][xy][0], v->bfraction, 0, s->quarter_sample);
728− s->mv[0][0][1] = scale_mv(s->next_picture.motion_val[1][xy][1], v->bfraction, 0, s->quarter_sample);
729− s->mv[1][0][0] = scale_mv(s->next_picture.motion_val[1][xy][0], v->bfraction, 1, s->quarter_sample);
730− s->mv[1][0][1] = scale_mv(s->next_picture.motion_val[1][xy][1], v->bfraction, 1, s->quarter_sample);
727+ s->mv[0][0][0] = scale_mv(s->next_pic.motion_val[1][xy][0], v->bfraction, 0, s->quarter_sample);
728+ s->mv[0][0][1] = scale_mv(s->next_pic.motion_val[1][xy][1], v->bfraction, 0, s->quarter_sample);
729+ s->mv[1][0][0] = scale_mv(s->next_pic.motion_val[1][xy][0], v->bfraction, 1, s->quarter_sample);
730+ s->mv[1][0][1] = scale_mv(s->next_pic.motion_val[1][xy][1], v->bfraction, 1, s->quarter_sample);
731731
732732 /* Pullback predicted motion vectors as specified in 8.4.5.4 */
733733 s->mv[0][0][0] = av_clip(s->mv[0][0][0], -60 - (s->mb_x << 6), (s->mb_width << 6) - 4 - (s->mb_x << 6));
@@ -735,18 +735,18 @@ void ff_vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], · 1 unmodified line
735735 s->mv[1][0][0] = av_clip(s->mv[1][0][0], -60 - (s->mb_x << 6), (s->mb_width << 6) - 4 - (s->mb_x << 6));
736736 s->mv[1][0][1] = av_clip(s->mv[1][0][1], -60 - (s->mb_y << 6), (s->mb_height << 6) - 4 - (s->mb_y << 6));
737737 if (direct) {
738− s->current_picture.motion_val[0][xy][0] = s->mv[0][0][0];
739− s->current_picture.motion_val[0][xy][1] = s->mv[0][0][1];
740− s->current_picture.motion_val[1][xy][0] = s->mv[1][0][0];
741− s->current_picture.motion_val[1][xy][1] = s->mv[1][0][1];
738+ s->cur_pic.motion_val[0][xy][0] = s->mv[0][0][0];
739+ s->cur_pic.motion_val[0][xy][1] = s->mv[0][0][1];
740+ s->cur_pic.motion_val[1][xy][0] = s->mv[1][0][0];
741+ s->cur_pic.motion_val[1][xy][1] = s->mv[1][0][1];
742742 return;
743743 }
744744
745745 if ((mvtype == BMV_TYPE_FORWARD) || (mvtype == BMV_TYPE_INTERPOLATED)) {
746− C = s->current_picture.motion_val[0][xy - 2];
747− A = s->current_picture.motion_val[0][xy - wrap * 2];
746+ C = s->cur_pic.motion_val[0][xy - 2];
747+ A = s->cur_pic.motion_val[0][xy - wrap * 2];
748748 off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
749− B = s->current_picture.motion_val[0][xy - wrap * 2 + off];
749+ B = s->cur_pic.motion_val[0][xy - wrap * 2 + off];
750750
751751 if (!s->mb_x) C[0] = C[1] = 0;
752752 if (!s->first_slice_line) { // predictor A is not out of bounds
@@ -812,10 +812,10 @@ void ff_vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], · 59 unmodified lines
812812 s->mv[0][0][1] = ((py + dmv_y[0] + r_y) & ((r_y << 1) - 1)) - r_y;
813813 }
814814 if ((mvtype == BMV_TYPE_BACKWARD) || (mvtype == BMV_TYPE_INTERPOLATED)) {
815− C = s->current_picture.motion_val[1][xy - 2];
816− A = s->current_picture.motion_val[1][xy - wrap * 2];
815+ C = s->cur_pic.motion_val[1][xy - 2];
816+ A = s->cur_pic.motion_val[1][xy - wrap * 2];
817817 off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
818− B = s->current_picture.motion_val[1][xy - wrap * 2 + off];
818+ B = s->cur_pic.motion_val[1][xy - wrap * 2 + off];
819819
820820 if (!s->mb_x)
821821 C[0] = C[1] = 0;
@@ -882,10 +882,10 @@ void ff_vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], · 60 unmodified lines
882882 s->mv[1][0][0] = ((px + dmv_x[1] + r_x) & ((r_x << 1) - 1)) - r_x;
883883 s->mv[1][0][1] = ((py + dmv_y[1] + r_y) & ((r_y << 1) - 1)) - r_y;
884884 }
885− s->current_picture.motion_val[0][xy][0] = s->mv[0][0][0];
886− s->current_picture.motion_val[0][xy][1] = s->mv[0][0][1];
887− s->current_picture.motion_val[1][xy][0] = s->mv[1][0][0];
888− s->current_picture.motion_val[1][xy][1] = s->mv[1][0][1];
885+ s->cur_pic.motion_val[0][xy][0] = s->mv[0][0][0];
886+ s->cur_pic.motion_val[0][xy][1] = s->mv[0][0][1];
887+ s->cur_pic.motion_val[1][xy][0] = s->mv[1][0][0];
888+ s->cur_pic.motion_val[1][xy][1] = s->mv[1][0][1];
889889 }
890890
891891 void ff_vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dmv_y,
@@ -897,14 +897,14 @@ void ff_vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dmv_y, · 5 unmodified lines
897897
898898 if (v->bmvtype == BMV_TYPE_DIRECT) {
899899 int total_opp, k, f;
900− if (s->next_picture.mb_type[mb_pos + v->mb_off] != MB_TYPE_INTRA) {
901− s->mv[0][0][0] = scale_mv(s->next_picture.motion_val[1][s->block_index[0] + v->blocks_off][0],
900+ if (s->next_pic.mb_type[mb_pos + v->mb_off] != MB_TYPE_INTRA) {
901+ s->mv[0][0][0] = scale_mv(s->next_pic.motion_val[1][s->block_index[0] + v->blocks_off][0],
902902 v->bfraction, 0, s->quarter_sample);
903− s->mv[0][0][1] = scale_mv(s->next_picture.motion_val[1][s->block_index[0] + v->blocks_off][1],
903+ s->mv[0][0][1] = scale_mv(s->next_pic.motion_val[1][s->block_index[0] + v->blocks_off][1],
904904 v->bfraction, 0, s->quarter_sample);
905− s->mv[1][0][0] = scale_mv(s->next_picture.motion_val[1][s->block_index[0] + v->blocks_off][0],
905+ s->mv[1][0][0] = scale_mv(s->next_pic.motion_val[1][s->block_index[0] + v->blocks_off][0],
906906 v->bfraction, 1, s->quarter_sample);
907− s->mv[1][0][1] = scale_mv(s->next_picture.motion_val[1][s->block_index[0] + v->blocks_off][1],
907+ s->mv[1][0][1] = scale_mv(s->next_pic.motion_val[1][s->block_index[0] + v->blocks_off][1],
908908 v->bfraction, 1, s->quarter_sample);
909909
910910 total_opp = v->mv_f_next[0][s->block_index[0] + v->blocks_off]
@@ -919,10 +919,10 @@ void ff_vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dmv_y, · 8 unmodified lines
919919 }
920920 v->ref_field_type[0] = v->ref_field_type[1] = v->cur_field_type ^ f;
921921 for (k = 0; k < 4; k++) {
922− s->current_picture.motion_val[0][s->block_index[k] + v->blocks_off][0] = s->mv[0][0][0];
923− s->current_picture.motion_val[0][s->block_index[k] + v->blocks_off][1] = s->mv[0][0][1];
924− s->current_picture.motion_val[1][s->block_index[k] + v->blocks_off][0] = s->mv[1][0][0];
925− s->current_picture.motion_val[1][s->block_index[k] + v->blocks_off][1] = s->mv[1][0][1];
922+ s->cur_pic.motion_val[0][s->block_index[k] + v->blocks_off][0] = s->mv[0][0][0];
923+ s->cur_pic.motion_val[0][s->block_index[k] + v->blocks_off][1] = s->mv[0][0][1];
924+ s->cur_pic.motion_val[1][s->block_index[k] + v->blocks_off][0] = s->mv[1][0][0];
925+ s->cur_pic.motion_val[1][s->block_index[k] + v->blocks_off][1] = s->mv[1][0][1];
926926 v->mv_f[0][s->block_index[k] + v->blocks_off] = f;
927927 v->mv_f[1][s->block_index[k] + v->blocks_off] = f;
928928 }
libavcodec/vc1dec.c+29−29
@@ -235,15 +235,15 @@ static void vc1_draw_sprites(VC1Context *v, SpriteData* sd) · 234 unmodified lines
235235 v->sprite_output_frame->linesize[plane] * row;
236236
237237 for (sprite = 0; sprite <= v->two_sprites; sprite++) {
238− uint8_t *iplane = s->current_picture.f->data[plane];
239− int iline = s->current_picture.f->linesize[plane];
238+ uint8_t *iplane = s->cur_pic.f->data[plane];
239+ int iline = s->cur_pic.f->linesize[plane];
240240 int ycoord = yoff[sprite] + yadv[sprite] * row;
241241 int yline = ycoord >> 16;
242242 int next_line;
243243 ysub[sprite] = ycoord & 0xFFFF;
244244 if (sprite) {
245− iplane = s->last_picture.f->data[plane];
246− iline = s->last_picture.f->linesize[plane];
245+ iplane = s->last_pic.f->data[plane];
246+ iline = s->last_pic.f->linesize[plane];
247247 }
248248 next_line = FFMIN(yline + 1, (v->sprite_height >> !!plane) - 1) * iline;
249249 if (!(xoff[sprite] & 0xFFFF) && xadv[sprite] == 1 << 16) {
@@ -317,12 +317,12 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb) · 67 unmodified lines
317317 if (ret < 0)
318318 return ret;
319319
320− if (!s->current_picture.f || !s->current_picture.f->data[0]) {
320+ if (!s->cur_pic.f || !s->cur_pic.f->data[0]) {
321321 av_log(avctx, AV_LOG_ERROR, "Got no sprites\n");
322322 return AVERROR_UNKNOWN;
323323 }
324324
325− if (v->two_sprites && (!s->last_picture_ptr || !s->last_picture.f->data[0])) {
325+ if (v->two_sprites && (!s->last_pic_ptr || !s->last_pic.f->data[0])) {
326326 av_log(avctx, AV_LOG_WARNING, "Need two sprites, only got one\n");
327327 v->two_sprites = 0;
328328 }
@@ -340,7 +340,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx) · 11 unmodified lines
340340 {
341341 VC1Context *v = avctx->priv_data;
342342 MpegEncContext *s = &v->s;
343− AVFrame *f = s->current_picture.f;
343+ AVFrame *f = s->cur_pic.f;
344344 int plane, i;
345345
346346 /* Windows Media Image codecs have a convergence interval of two keyframes.
@@ -837,10 +837,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 490 unmodified lines
837837 /* no supplementary picture */
838838 if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == VC1_CODE_ENDOFSEQ)) {
839839 /* special case for last picture */
840− if (s->low_delay == 0 && s->next_picture_ptr) {
841− if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0)
840+ if (s->low_delay == 0 && s->next_pic_ptr) {
841+ if ((ret = av_frame_ref(pict, s->next_pic_ptr->f)) < 0)
842842 return ret;
843− s->next_picture_ptr = NULL;
843+ s->next_pic_ptr = NULL;
844844
845845 *got_frame = 1;
846846 }
@@ -1047,7 +1047,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 200 unmodified lines
10471047 }
10481048
10491049 /* skip B-frames if we don't have reference frames */
1050− if (!s->last_picture_ptr && s->pict_type == AV_PICTURE_TYPE_B) {
1050+ if (!s->last_pic_ptr && s->pict_type == AV_PICTURE_TYPE_B) {
10511051 av_log(v->s.avctx, AV_LOG_DEBUG, "Skipping B frame without reference frames\n");
10521052 goto end;
10531053 }
@@ -1061,19 +1061,19 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 7 unmodified lines
10611061 goto err;
10621062 }
10631063
1064− v->s.current_picture_ptr->field_picture = v->field_mode;
1065− v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (v->fcm != PROGRESSIVE);
1066− v->s.current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!v->tff;
1064+ v->s.cur_pic_ptr->field_picture = v->field_mode;
1065+ v->s.cur_pic_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (v->fcm != PROGRESSIVE);
1066+ v->s.cur_pic_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!v->tff;
10671067
10681068 // process pulldown flags
1069− s->current_picture_ptr->f->repeat_pict = 0;
1069+ s->cur_pic_ptr->f->repeat_pict = 0;
10701070 // Pulldown flags are only valid when 'broadcast' has been set.
10711071 if (v->rff) {
10721072 // repeat field
1073− s->current_picture_ptr->f->repeat_pict = 1;
1073+ s->cur_pic_ptr->f->repeat_pict = 1;
10741074 } else if (v->rptfrm) {
10751075 // repeat frames
1076− s->current_picture_ptr->f->repeat_pict = v->rptfrm * 2;
1076+ s->cur_pic_ptr->f->repeat_pict = v->rptfrm * 2;
10771077 }
10781078
10791079 if (avctx->hwaccel) {
@@ -1135,7 +1135,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 55 unmodified lines
11351135 ret = AVERROR_INVALIDDATA;
11361136 goto err;
11371137 }
1138− v->s.current_picture_ptr->f->pict_type = v->s.pict_type;
1138+ v->s.cur_pic_ptr->f->pict_type = v->s.pict_type;
11391139
11401140 ret = hwaccel->start_frame(avctx, buf_start_second_field,
11411141 (buf + buf_size) - buf_start_second_field);
@@ -1230,9 +1230,9 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 88 unmodified lines
12301230
12311231 v->end_mb_x = s->mb_width;
12321232 if (v->field_mode) {
1233− s->current_picture.f->linesize[0] <<= 1;
1234− s->current_picture.f->linesize[1] <<= 1;
1235− s->current_picture.f->linesize[2] <<= 1;
1233+ s->cur_pic.f->linesize[0] <<= 1;
1234+ s->cur_pic.f->linesize[1] <<= 1;
1235+ s->cur_pic.f->linesize[2] <<= 1;
12361236 s->linesize <<= 1;
12371237 s->uvlinesize <<= 1;
12381238 }
@@ -1307,9 +1307,9 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 68 unmodified lines
13071307 }
13081308 if (v->field_mode) {
13091309 v->second_field = 0;
1310− s->current_picture.f->linesize[0] >>= 1;
1311− s->current_picture.f->linesize[1] >>= 1;
1312− s->current_picture.f->linesize[2] >>= 1;
1310+ s->cur_pic.f->linesize[0] >>= 1;
1311+ s->cur_pic.f->linesize[1] >>= 1;
1312+ s->cur_pic.f->linesize[2] >>= 1;
13131313 s->linesize >>= 1;
13141314 s->uvlinesize >>= 1;
13151315 if (v->s.pict_type != AV_PICTURE_TYPE_BI && v->s.pict_type != AV_PICTURE_TYPE_B) {
@@ -1353,16 +1353,16 @@ image: · 37 unmodified lines
13531353 *got_frame = 1;
13541354 } else {
13551355 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
1356− if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
1356+ if ((ret = av_frame_ref(pict, s->cur_pic_ptr->f)) < 0)
13571357 goto err;
13581358 if (!v->field_mode)
1359− ff_print_debug_info(s, s->current_picture_ptr, pict);
1359+ ff_print_debug_info(s, s->cur_pic_ptr, pict);
13601360 *got_frame = 1;
1361− } else if (s->last_picture_ptr) {
1362− if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
1361+ } else if (s->last_pic_ptr) {
1362+ if ((ret = av_frame_ref(pict, s->last_pic_ptr->f)) < 0)
13631363 goto err;
13641364 if (!v->field_mode)
1365− ff_print_debug_info(s, s->last_picture_ptr, pict);
1365+ ff_print_debug_info(s, s->last_pic_ptr, pict);
13661366 *got_frame = 1;
13671367 }
13681368 }
libavcodec/vdpau.c+1−1
@@ -370,7 +370,7 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, · 369 unmodified lines
370370 int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
371371 {
372372 MpegEncContext *s = avctx->priv_data;
373− Picture *pic = s->current_picture_ptr;
373+ Picture *pic = s->cur_pic_ptr;
374374 struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
375375 int val;
376376
libavcodec/vdpau_mpeg12.c+4−4
@@ -35,7 +35,7 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, · 34 unmodified lines
3535 const uint8_t *buffer, uint32_t size)
3636 {
3737 MpegEncContext * const s = avctx->priv_data;
38− Picture *pic = s->current_picture_ptr;
38+ Picture *pic = s->cur_pic_ptr;
3939 struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
4040 VdpPictureInfoMPEG1Or2 *info = &pic_ctx->info.mpeg;
4141 VdpVideoSurface ref;
@@ -47,12 +47,12 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, · 5 unmodified lines
4747
4848 switch (s->pict_type) {
4949 case AV_PICTURE_TYPE_B:
50− ref = ff_vdpau_get_surface_id(s->next_picture.f);
50+ ref = ff_vdpau_get_surface_id(s->next_pic.f);
5151 assert(ref != VDP_INVALID_HANDLE);
5252 info->backward_reference = ref;
5353 /* fall through to forward prediction */
5454 case AV_PICTURE_TYPE_P:
55− ref = ff_vdpau_get_surface_id(s->last_picture.f);
55+ ref = ff_vdpau_get_surface_id(s->last_pic.f);
5656 info->forward_reference = ref;
5757 }
5858
@@ -87,7 +87,7 @@ static int vdpau_mpeg_decode_slice(AVCodecContext *avctx, · 28 unmodified lines
8787 const uint8_t *buffer, uint32_t size)
8888 {
8989 MpegEncContext * const s = avctx->priv_data;
90− Picture *pic = s->current_picture_ptr;
90+ Picture *pic = s->cur_pic_ptr;
9191 struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
9292 int val;
9393
libavcodec/vdpau_mpeg4.c+3−3
@@ -34,7 +34,7 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, · 33 unmodified lines
3434 {
3535 Mpeg4DecContext *ctx = avctx->priv_data;
3636 MpegEncContext * const s = &ctx->m;
37− Picture *pic = s->current_picture_ptr;
37+ Picture *pic = s->cur_pic_ptr;
3838 struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
3939 VdpPictureInfoMPEG4Part2 *info = &pic_ctx->info.mpeg4;
4040 VdpVideoSurface ref;
@@ -47,13 +47,13 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, · 6 unmodified lines
4747
4848 switch (s->pict_type) {
4949 case AV_PICTURE_TYPE_B:
50− ref = ff_vdpau_get_surface_id(s->next_picture.f);
50+ ref = ff_vdpau_get_surface_id(s->next_pic.f);
5151 assert(ref != VDP_INVALID_HANDLE);
5252 info->backward_reference = ref;
5353 info->vop_coding_type = 2;
5454 /* fall-through */
5555 case AV_PICTURE_TYPE_P:
56− ref = ff_vdpau_get_surface_id(s->last_picture.f);
56+ ref = ff_vdpau_get_surface_id(s->last_pic.f);
5757 assert(ref != VDP_INVALID_HANDLE);
5858 info->forward_reference = ref;
5959 }
libavcodec/vdpau_vc1.c+6−6
@@ -36,7 +36,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, · 35 unmodified lines
3636 {
3737 VC1Context * const v = avctx->priv_data;
3838 MpegEncContext * const s = &v->s;
39− Picture *pic = s->current_picture_ptr;
39+ Picture *pic = s->cur_pic_ptr;
4040 struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
4141 VdpPictureInfoVC1 *info = &pic_ctx->info.vc1;
4242 VdpVideoSurface ref;
@@ -47,15 +47,15 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, · 4 unmodified lines
4747
4848 switch (s->pict_type) {
4949 case AV_PICTURE_TYPE_B:
50− if (s->next_picture_ptr) {
51− ref = ff_vdpau_get_surface_id(s->next_picture.f);
50+ if (s->next_pic_ptr) {
51+ ref = ff_vdpau_get_surface_id(s->next_pic.f);
5252 assert(ref != VDP_INVALID_HANDLE);
5353 info->backward_reference = ref;
5454 }
5555 /* fall-through */
5656 case AV_PICTURE_TYPE_P:
57− if (s->last_picture_ptr) {
58− ref = ff_vdpau_get_surface_id(s->last_picture.f);
57+ if (s->last_pic_ptr) {
58+ ref = ff_vdpau_get_surface_id(s->last_pic.f);
5959 assert(ref != VDP_INVALID_HANDLE);
6060 info->forward_reference = ref;
6161 }
@@ -104,7 +104,7 @@ static int vdpau_vc1_decode_slice(AVCodecContext *avctx, · 42 unmodified lines
104104 {
105105 VC1Context * const v = avctx->priv_data;
106106 MpegEncContext * const s = &v->s;
107− Picture *pic = s->current_picture_ptr;
107+ Picture *pic = s->cur_pic_ptr;
108108 struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
109109 int val;
110110
libavcodec/videotoolbox.c+1−1
@@ -1108,7 +1108,7 @@ static int videotoolbox_mpeg_decode_slice(AVCodecContext *avctx, · 1107 unmodified lines
11081108 static int videotoolbox_mpeg_end_frame(AVCodecContext *avctx)
11091109 {
11101110 MpegEncContext *s = avctx->priv_data;
1111− AVFrame *frame = s->current_picture_ptr->f;
1111+ AVFrame *frame = s->cur_pic_ptr->f;
11121112
11131113 return ff_videotoolbox_common_end_frame(avctx, frame);
11141114 }
libavcodec/wmv2dec.c+9−9
@@ -103,7 +103,7 @@ static int parse_mb_skip(WMV2DecContext *w) · 102 unmodified lines
103103 int mb_x, mb_y;
104104 int coded_mb_count = 0;
105105 MpegEncContext *const s = &w->s;
106− uint32_t *const mb_type = s->current_picture_ptr->mb_type;
106+ uint32_t *const mb_type = s->cur_pic_ptr->mb_type;
107107
108108 w->skip_type = get_bits(&s->gb, 2);
109109 switch (w->skip_type) {
@@ -238,8 +238,8 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s) · 128 unmodified lines
238238
239239 if (s->pict_type == AV_PICTURE_TYPE_I) {
240240 /* Is filling with zeroes really the right thing to do? */
241− memset(s->current_picture_ptr->mb_type, 0,
242− sizeof(*s->current_picture_ptr->mb_type) *
241+ memset(s->cur_pic_ptr->mb_type, 0,
242+ sizeof(*s->cur_pic_ptr->mb_type) *
243243 s->mb_height * s->mb_stride);
244244 if (w->j_type_bit)
245245 w->j_type = get_bits1(&s->gb);
@@ -331,7 +331,7 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s) · 85 unmodified lines
331331 s->esc3_run_length = 0;
332332
333333 if (w->j_type) {
334− ff_intrax8_decode_picture(&w->x8, &s->current_picture,
334+ ff_intrax8_decode_picture(&w->x8, &s->cur_pic,
335335 &s->gb, &s->mb_x, &s->mb_y,
336336 2 * s->qscale, (s->qscale - 1) | 1,
337337 s->loop_filter, s->low_delay);
@@ -366,11 +366,11 @@ static int16_t *wmv2_pred_motion(WMV2DecContext *w, int *px, int *py) · 28 unmodified lines
366366 wrap = s->b8_stride;
367367 xy = s->block_index[0];
368368
369− mot_val = s->current_picture.motion_val[0][xy];
369+ mot_val = s->cur_pic.motion_val[0][xy];
370370
371− A = s->current_picture.motion_val[0][xy - 1];
372− B = s->current_picture.motion_val[0][xy - wrap];
373− C = s->current_picture.motion_val[0][xy + 2 - wrap];
371+ A = s->cur_pic.motion_val[0][xy - 1];
372+ B = s->cur_pic.motion_val[0][xy - wrap];
373+ C = s->cur_pic.motion_val[0][xy + 2 - wrap];
374374
375375 if (s->mb_x && !s->first_slice_line && !s->mspel && w->top_left_mv_flag)
376376 diff = FFMAX(FFABS(A[0] - B[0]), FFABS(A[1] - B[1]));
@@ -452,7 +452,7 @@ static int wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 75 unmodified lines
452452 return 0;
453453
454454 if (s->pict_type == AV_PICTURE_TYPE_P) {
455− if (IS_SKIP(s->current_picture.mb_type[s->mb_y * s->mb_stride + s->mb_x])) {
455+ if (IS_SKIP(s->cur_pic.mb_type[s->mb_y * s->mb_stride + s->mb_x])) {
456456 /* skip mb */
457457 s->mb_intra = 0;
458458 for (i = 0; i < 6; i++)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t