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, ...@@ -259,7 +259,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
s->picture_structure = AV_PICTURE_STRUCTURE_UNKNOWN; s->picture_structure = AV_PICTURE_STRUCTURE_UNKNOWN;
ff_h264_sei_uninit(&p->sei); 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) if (!buf_size)
return 0; return 0;
......
...@@ -313,12 +313,12 @@ static int decode_buffering_period(H264SEIBufferingPeriod *h, GetBitContext *gb, ...@@ -313,12 +313,12 @@ static int decode_buffering_period(H264SEIBufferingPeriod *h, GetBitContext *gb,
static int decode_frame_packing_arrangement(H264SEIFramePacking *h, static int decode_frame_packing_arrangement(H264SEIFramePacking *h,
GetBitContext *gb) GetBitContext *gb)
{ {
h->frame_packing_arrangement_id = get_ue_golomb_long(gb); h->arrangement_id = get_ue_golomb_long(gb);
h->frame_packing_arrangement_cancel_flag = get_bits1(gb); h->arrangement_cancel_flag = get_bits1(gb);
h->present = !h->frame_packing_arrangement_cancel_flag; h->present = !h->arrangement_cancel_flag;
if (h->present) { 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->quincunx_sampling_flag = get_bits1(gb);
h->content_interpretation_type = get_bits(gb, 6); h->content_interpretation_type = get_bits(gb, 6);
...@@ -328,10 +328,10 @@ static int decode_frame_packing_arrangement(H264SEIFramePacking *h, ...@@ -328,10 +328,10 @@ static int decode_frame_packing_arrangement(H264SEIFramePacking *h,
// frame0_self_contained_flag, frame1_self_contained_flag // frame0_self_contained_flag, frame1_self_contained_flag
skip_bits(gb, 2); 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, 16); // frame[01]_grid_position_[xy]
skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte 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 skip_bits1(gb); // frame_packing_arrangement_extension_flag
...@@ -465,8 +465,8 @@ int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb, ...@@ -465,8 +465,8 @@ int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb,
const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h) const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h)
{ {
if (h->frame_packing_arrangement_cancel_flag == 0) { if (h->arrangement_cancel_flag == 0) {
switch (h->frame_packing_arrangement_type) { switch (h->arrangement_type) {
case H264_SEI_FPA_TYPE_CHECKERBOARD: case H264_SEI_FPA_TYPE_CHECKERBOARD:
if (h->content_interpretation_type == 2) if (h->content_interpretation_type == 2)
return "checkerboard_rl"; return "checkerboard_rl";
...@@ -501,7 +501,7 @@ const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h) ...@@ -501,7 +501,7 @@ const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h)
default: default:
return "mono"; return "mono";
} }
} else if (h->frame_packing_arrangement_cancel_flag == 1) { } else if (h->arrangement_cancel_flag == 1) {
return "mono"; return "mono";
} else { } else {
return NULL; return NULL;
......
...@@ -119,10 +119,10 @@ typedef struct H264SEIBufferingPeriod { ...@@ -119,10 +119,10 @@ typedef struct H264SEIBufferingPeriod {
typedef struct H264SEIFramePacking { typedef struct H264SEIFramePacking {
int present; int present;
int frame_packing_arrangement_id; int arrangement_id;
int frame_packing_arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received int arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received
H264_SEI_FpaType frame_packing_arrangement_type; H264_SEI_FpaType arrangement_type;
int frame_packing_arrangement_repetition_period; int arrangement_repetition_period;
int content_interpretation_type; int content_interpretation_type;
int quincunx_sampling_flag; int quincunx_sampling_flag;
int current_frame_is_frame0_flag; int current_frame_is_frame0_flag;
......
...@@ -1198,13 +1198,13 @@ static int h264_export_frame_props(H264Context *h) ...@@ -1198,13 +1198,13 @@ static int h264_export_frame_props(H264Context *h)
} }
if (h->sei.frame_packing.present && 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 > 0 &&
h->sei.frame_packing.content_interpretation_type < 3) { h->sei.frame_packing.content_interpretation_type < 3) {
H264SEIFramePacking *fp = &h->sei.frame_packing; H264SEIFramePacking *fp = &h->sei.frame_packing;
AVStereo3D *stereo = av_stereo3d_create_side_data(cur->f); AVStereo3D *stereo = av_stereo3d_create_side_data(cur->f);
if (stereo) { if (stereo) {
switch (fp->frame_packing_arrangement_type) { switch (fp->arrangement_type) {
case 0: case 0:
stereo->type = AV_STEREO3D_CHECKERBOARD; stereo->type = AV_STEREO3D_CHECKERBOARD;
break; break;
...@@ -1234,7 +1234,7 @@ static int h264_export_frame_props(H264Context *h) ...@@ -1234,7 +1234,7 @@ static int h264_export_frame_props(H264Context *h)
if (fp->content_interpretation_type == 2) if (fp->content_interpretation_type == 2)
stereo->flags = AV_STEREO3D_FLAG_INVERT; 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) if (fp->current_frame_is_frame0_flag)
stereo->view = AV_STEREO3D_VIEW_LEFT; stereo->view = AV_STEREO3D_VIEW_LEFT;
else else
......
...@@ -319,7 +319,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h) ...@@ -319,7 +319,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h->x264_build = -1; h->x264_build = -1;
h->frame_recovered = 0; h->frame_recovered = 0;
h->poc.prev_frame_num = -1; 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->sei.unregistered.x264_build = -1;
h->next_outputed_poc = INT_MIN; 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