Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-17 22:04:32 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-12-17 22:04:32 +0400
commit4e1dc600a16e1ba302d7ac707670e4f6129d1dde (patch)
treefaf66ef166e373070fc2bb04e7c32c111ea42d5d /libavcodec/hevc_sei.c
parent682b28b41098f4445581076c44fb8420306eacec (diff)
parent3a149e23d37f06d49ab0bb013a3b9cb0224bba5c (diff)
Merge commit '3a149e23d37f06d49ab0bb013a3b9cb0224bba5c'
* commit '3a149e23d37f06d49ab0bb013a3b9cb0224bba5c': hevc: Refactor decode_nal_sei_frame_packing_arrangement Conflicts: libavcodec/hevc_sei.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_sei.c')
-rw-r--r--libavcodec/hevc_sei.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 4fa509c571..216db37e53 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -52,34 +52,26 @@ static void decode_nal_sei_decoded_picture_hash(HEVCContext *s)
static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
{
GetBitContext *gb = &s->HEVClc->gb;
- int cancel;
- int quincunx = 0;
- int content = -1;
- int type = -1;
get_ue_golomb(gb); // frame_packing_arrangement_id
- cancel = get_bits1(gb); // frame_packing_cancel_flag
- if (cancel == 0) {
- type = get_bits(gb, 7); // frame_packing_arrangement_type
- quincunx = get_bits1(gb); // quincunx_sampling_flag
- content = get_bits(gb, 6); // content_interpretation_type
+ s->sei_frame_packing_present = !get_bits1(gb);
+
+ if (s->sei_frame_packing_present) {
+ s->frame_packing_arrangement_type = get_bits(gb, 7);
+ s->quincunx_subsampling = get_bits1(gb);
+ s->content_interpretation_type = get_bits(gb, 6);
// the following skips spatial_flipping_flag frame0_flipped_flag
// field_views_flag current_frame_is_frame0_flag
// frame0_self_contained_flag frame1_self_contained_flag
skip_bits(gb, 6);
- if (quincunx == 0 && type != 5)
+ if (!s->quincunx_subsampling && s->frame_packing_arrangement_type != 5)
skip_bits(gb, 16); // frame[01]_grid_position_[xy]
skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
skip_bits1(gb); // frame_packing_arrangement_persistance_flag
}
skip_bits1(gb); // upsampled_aspect_ratio_flag
-
- s->sei_frame_packing_present = (cancel == 0);
- s->frame_packing_arrangement_type = type;
- s->content_interpretation_type = content;
- s->quincunx_subsampling = quincunx;
}
static int decode_pic_timing(HEVCContext *s)