Commit 5e9b39b3 authored by James Almer's avatar James Almer

avcodec/h264_sei: remove redundant prefix to H264SEIFramePacking fields

Cosmetic change.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 83ecdc9a
......@@ -259,7 +259,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
s->picture_structure = AV_PICTURE_STRUCTURE_UNKNOWN;
ff_h264_sei_uninit(&p->sei);
p->sei.frame_packing.frame_packing_arrangement_cancel_flag = -1;
p->sei.frame_packing.arrangement_cancel_flag = -1;
if (!buf_size)
return 0;
......
......@@ -313,12 +313,12 @@ static int decode_buffering_period(H264SEIBufferingPeriod *h, GetBitContext *gb,
static int decode_frame_packing_arrangement(H264SEIFramePacking *h,
GetBitContext *gb)
{
h->frame_packing_arrangement_id = get_ue_golomb_long(gb);
h->frame_packing_arrangement_cancel_flag = get_bits1(gb);
h->present = !h->frame_packing_arrangement_cancel_flag;
h->arrangement_id = get_ue_golomb_long(gb);
h->arrangement_cancel_flag = get_bits1(gb);
h->present = !h->arrangement_cancel_flag;
if (h->present) {
h->frame_packing_arrangement_type = get_bits(gb, 7);
h->arrangement_type = get_bits(gb, 7);
h->quincunx_sampling_flag = get_bits1(gb);
h->content_interpretation_type = get_bits(gb, 6);
......@@ -328,10 +328,10 @@ static int decode_frame_packing_arrangement(H264SEIFramePacking *h,
// frame0_self_contained_flag, frame1_self_contained_flag
skip_bits(gb, 2);
if (!h->quincunx_sampling_flag && h->frame_packing_arrangement_type != 5)
if (!h->quincunx_sampling_flag && h->arrangement_type != 5)
skip_bits(gb, 16); // frame[01]_grid_position_[xy]
skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
h->frame_packing_arrangement_repetition_period = get_ue_golomb_long(gb);
h->arrangement_repetition_period = get_ue_golomb_long(gb);
}
skip_bits1(gb); // frame_packing_arrangement_extension_flag
......@@ -465,8 +465,8 @@ int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb,
const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h)
{
if (h->frame_packing_arrangement_cancel_flag == 0) {
switch (h->frame_packing_arrangement_type) {
if (h->arrangement_cancel_flag == 0) {
switch (h->arrangement_type) {
case H264_SEI_FPA_TYPE_CHECKERBOARD:
if (h->content_interpretation_type == 2)
return "checkerboard_rl";
......@@ -501,7 +501,7 @@ const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h)
default:
return "mono";
}
} else if (h->frame_packing_arrangement_cancel_flag == 1) {
} else if (h->arrangement_cancel_flag == 1) {
return "mono";
} else {
return NULL;
......
......@@ -119,10 +119,10 @@ typedef struct H264SEIBufferingPeriod {
typedef struct H264SEIFramePacking {
int present;
int frame_packing_arrangement_id;
int frame_packing_arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received
H264_SEI_FpaType frame_packing_arrangement_type;
int frame_packing_arrangement_repetition_period;
int arrangement_id;
int arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received
H264_SEI_FpaType arrangement_type;
int arrangement_repetition_period;
int content_interpretation_type;
int quincunx_sampling_flag;
int current_frame_is_frame0_flag;
......
......@@ -1198,13 +1198,13 @@ static int h264_export_frame_props(H264Context *h)
}
if (h->sei.frame_packing.present &&
h->sei.frame_packing.frame_packing_arrangement_type <= 6 &&
h->sei.frame_packing.arrangement_type <= 6 &&
h->sei.frame_packing.content_interpretation_type > 0 &&
h->sei.frame_packing.content_interpretation_type < 3) {
H264SEIFramePacking *fp = &h->sei.frame_packing;
AVStereo3D *stereo = av_stereo3d_create_side_data(cur->f);
if (stereo) {
switch (fp->frame_packing_arrangement_type) {
switch (fp->arrangement_type) {
case 0:
stereo->type = AV_STEREO3D_CHECKERBOARD;
break;
......@@ -1234,7 +1234,7 @@ static int h264_export_frame_props(H264Context *h)
if (fp->content_interpretation_type == 2)
stereo->flags = AV_STEREO3D_FLAG_INVERT;
if (fp->frame_packing_arrangement_type == 5) {
if (fp->arrangement_type == 5) {
if (fp->current_frame_is_frame0_flag)
stereo->view = AV_STEREO3D_VIEW_LEFT;
else
......
......@@ -319,7 +319,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h->x264_build = -1;
h->frame_recovered = 0;
h->poc.prev_frame_num = -1;
h->sei.frame_packing.frame_packing_arrangement_cancel_flag = -1;
h->sei.frame_packing.arrangement_cancel_flag = -1;
h->sei.unregistered.x264_build = -1;
h->next_outputed_poc = INT_MIN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment