aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1_mc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-04 03:34:28 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-12 11:19:44 +0200
commitec1eba792aed90df5e151cb3c68e67d3d9730834 (patch)
tree4f42b643f05da0617268eb7523ab4787ba056643 /libavcodec/vc1_mc.c
parent3a4e7694a13edc185a00393c2e6872ff3e17756b (diff)
downloadffmpeg-ec1eba792aed90df5e151cb3c68e67d3d9730834.tar.gz
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. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vc1_mc.c')
-rw-r--r--libavcodec/vc1_mc.c112
1 files changed, 56 insertions, 56 deletions
diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
index 8f0b3f6fab..e24328569d 100644
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -184,11 +184,11 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
if ((!v->field_mode ||
(v->ref_field_type[dir] == 1 && v->cur_field_type == 1)) &&
- !v->s.last_picture.f->data[0])
+ !v->s.last_pic.f->data[0])
return;
- linesize = s->current_picture_ptr->f->linesize[0];
- uvlinesize = s->current_picture_ptr->f->linesize[1];
+ linesize = s->cur_pic_ptr->f->linesize[0];
+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
mx = s->mv[dir][0][0];
my = s->mv[dir][0][1];
@@ -196,8 +196,8 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
// store motion vectors for further use in B-frames
if (s->pict_type == AV_PICTURE_TYPE_P) {
for (i = 0; i < 4; i++) {
- s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
- s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][1] = my;
+ s->cur_pic.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
+ s->cur_pic.motion_val[1][s->block_index[i] + v->blocks_off][1] = my;
}
}
@@ -219,30 +219,30 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
}
if (!dir) {
if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
- srcY = s->current_picture.f->data[0];
- srcU = s->current_picture.f->data[1];
- srcV = s->current_picture.f->data[2];
+ srcY = s->cur_pic.f->data[0];
+ srcU = s->cur_pic.f->data[1];
+ srcV = s->cur_pic.f->data[2];
luty = v->curr_luty;
lutuv = v->curr_lutuv;
use_ic = *v->curr_use_ic;
interlace = 1;
} else {
- srcY = s->last_picture.f->data[0];
- srcU = s->last_picture.f->data[1];
- srcV = s->last_picture.f->data[2];
+ srcY = s->last_pic.f->data[0];
+ srcU = s->last_pic.f->data[1];
+ srcV = s->last_pic.f->data[2];
luty = v->last_luty;
lutuv = v->last_lutuv;
use_ic = v->last_use_ic;
- interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
} else {
- srcY = s->next_picture.f->data[0];
- srcU = s->next_picture.f->data[1];
- srcV = s->next_picture.f->data[2];
+ srcY = s->next_pic.f->data[0];
+ srcU = s->next_pic.f->data[1];
+ srcV = s->next_pic.f->data[2];
luty = v->next_luty;
lutuv = v->next_lutuv;
use_ic = v->next_use_ic;
- interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
if (!srcY || !srcU) {
@@ -464,31 +464,31 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
if ((!v->field_mode ||
(v->ref_field_type[dir] == 1 && v->cur_field_type == 1)) &&
- !v->s.last_picture.f->data[0])
+ !v->s.last_pic.f->data[0])
return;
- linesize = s->current_picture_ptr->f->linesize[0];
+ linesize = s->cur_pic_ptr->f->linesize[0];
mx = s->mv[dir][n][0];
my = s->mv[dir][n][1];
if (!dir) {
if (v->field_mode && (v->cur_field_type != v->ref_field_type[dir]) && v->second_field) {
- srcY = s->current_picture.f->data[0];
+ srcY = s->cur_pic.f->data[0];
luty = v->curr_luty;
use_ic = *v->curr_use_ic;
interlace = 1;
} else {
- srcY = s->last_picture.f->data[0];
+ srcY = s->last_pic.f->data[0];
luty = v->last_luty;
use_ic = v->last_use_ic;
- interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
} else {
- srcY = s->next_picture.f->data[0];
+ srcY = s->next_pic.f->data[0];
luty = v->next_luty;
use_ic = v->next_use_ic;
- interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
if (!srcY) {
@@ -503,8 +503,8 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
if (s->pict_type == AV_PICTURE_TYPE_P && n == 3 && v->field_mode) {
int opp_count = get_luma_mv(v, 0,
- &s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0],
- &s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1]);
+ &s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0],
+ &s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1]);
int k, f = opp_count > 2;
for (k = 0; k < 4; k++)
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)
int width = s->avctx->coded_width;
int height = s->avctx->coded_height >> 1;
if (s->pict_type == AV_PICTURE_TYPE_P) {
- s->current_picture.motion_val[1][s->block_index[n] + v->blocks_off][0] = mx;
- s->current_picture.motion_val[1][s->block_index[n] + v->blocks_off][1] = my;
+ s->cur_pic.motion_val[1][s->block_index[n] + v->blocks_off][0] = mx;
+ s->cur_pic.motion_val[1][s->block_index[n] + v->blocks_off][1] = my;
}
qx = (s->mb_x * 16) + (mx >> 2);
qy = (s->mb_y * 8) + (my >> 3);
@@ -645,7 +645,7 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
int interlace;
int uvlinesize;
- if (!v->field_mode && !v->s.last_picture.f->data[0])
+ if (!v->field_mode && !v->s.last_pic.f->data[0])
return;
if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
@@ -654,8 +654,8 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
if (!v->field_mode || !v->numref) {
int valid_count = get_chroma_mv(v, dir, &tx, &ty);
if (!valid_count) {
- s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0;
- s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0;
+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0;
+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0;
v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;
return; //no need to do MC for intra blocks
}
@@ -664,12 +664,12 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
int opp_count = get_luma_mv(v, dir, &tx, &ty);
chroma_ref_type = v->cur_field_type ^ (opp_count > 2);
}
- if (v->field_mode && chroma_ref_type == 1 && v->cur_field_type == 1 && !v->s.last_picture.f->data[0])
+ if (v->field_mode && chroma_ref_type == 1 && v->cur_field_type == 1 && !v->s.last_pic.f->data[0])
return;
- s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0] = tx;
- s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1] = ty;
+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][0] = tx;
+ s->cur_pic.motion_val[1][s->block_index[0] + v->blocks_off][1] = ty;
- uvlinesize = s->current_picture_ptr->f->linesize[1];
+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
uvmx = (tx + ((tx & 3) == 3)) >> 1;
uvmy = (ty + ((ty & 3) == 3)) >> 1;
@@ -698,24 +698,24 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
if (!dir) {
if (v->field_mode && (v->cur_field_type != chroma_ref_type) && v->second_field) {
- srcU = s->current_picture.f->data[1];
- srcV = s->current_picture.f->data[2];
+ srcU = s->cur_pic.f->data[1];
+ srcV = s->cur_pic.f->data[2];
lutuv = v->curr_lutuv;
use_ic = *v->curr_use_ic;
interlace = 1;
} else {
- srcU = s->last_picture.f->data[1];
- srcV = s->last_picture.f->data[2];
+ srcU = s->last_pic.f->data[1];
+ srcV = s->last_pic.f->data[2];
lutuv = v->last_lutuv;
use_ic = v->last_use_ic;
- interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
} else {
- srcU = s->next_picture.f->data[1];
- srcV = s->next_picture.f->data[2];
+ srcU = s->next_pic.f->data[1];
+ srcV = s->next_pic.f->data[2];
lutuv = v->next_lutuv;
use_ic = v->next_use_ic;
- interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
if (!srcU) {
@@ -856,7 +856,7 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
return;
- uvlinesize = s->current_picture_ptr->f->linesize[1];
+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
for (i = 0; i < 4; i++) {
int d = i < 2 ? dir: dir2;
@@ -880,17 +880,17 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg)
else
uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1);
if (i < 2 ? dir : dir2) {
- srcU = s->next_picture.f->data[1];
- srcV = s->next_picture.f->data[2];
+ srcU = s->next_pic.f->data[1];
+ srcV = s->next_pic.f->data[2];
lutuv = v->next_lutuv;
use_ic = v->next_use_ic;
- interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
} else {
- srcU = s->last_picture.f->data[1];
- srcV = s->last_picture.f->data[2];
+ srcU = s->last_pic.f->data[1];
+ srcV = s->last_pic.f->data[2];
lutuv = v->last_lutuv;
use_ic = v->last_use_ic;
- interlace = !!(s->last_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->last_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
}
if (!srcU)
return;
@@ -1012,11 +1012,11 @@ void ff_vc1_interp_mc(VC1Context *v)
int interlace;
int linesize, uvlinesize;
- if (!v->field_mode && !v->s.next_picture.f->data[0])
+ if (!v->field_mode && !v->s.next_pic.f->data[0])
return;
- linesize = s->current_picture_ptr->f->linesize[0];
- uvlinesize = s->current_picture_ptr->f->linesize[1];
+ linesize = s->cur_pic_ptr->f->linesize[0];
+ uvlinesize = s->cur_pic_ptr->f->linesize[1];
mx = s->mv[1][0][0];
my = s->mv[1][0][1];
@@ -1030,11 +1030,11 @@ void ff_vc1_interp_mc(VC1Context *v)
uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1));
uvmy = uvmy + ((uvmy < 0) ? -(uvmy & 1) : (uvmy & 1));
}
- srcY = s->next_picture.f->data[0];
- srcU = s->next_picture.f->data[1];
- srcV = s->next_picture.f->data[2];
+ srcY = s->next_pic.f->data[0];
+ srcU = s->next_pic.f->data[1];
+ srcV = s->next_pic.f->data[2];
- interlace = !!(s->next_picture.f->flags & AV_FRAME_FLAG_INTERLACED);
+ interlace = !!(s->next_pic.f->flags & AV_FRAME_FLAG_INTERLACED);
src_x = s->mb_x * 16 + (mx >> 2);
src_y = s->mb_y * 16 + (my >> 2);