|
|
|
@ -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; |
|
|
|
|