diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-07-02 12:02:15 -0400 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-07-09 10:18:06 -0400 |
commit | 0569a7e0bd2006d9a5248d17a1f4bf3ca654ae50 (patch) | |
tree | 6e5c1f8623a9eec558be6eee5f5ef6d5567d0c8b /libavcodec/hevc_sei.c | |
parent | 18e3d61e9e3b52c177aa7a1f2a054a8a753e1b09 (diff) | |
download | ffmpeg-0569a7e0bd2006d9a5248d17a1f4bf3ca654ae50.tar.gz |
hevc: parse display orientation SEI message
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/hevc_sei.c')
-rw-r--r-- | libavcodec/hevc_sei.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c index b011596599..978a0e3878 100644 --- a/libavcodec/hevc_sei.c +++ b/libavcodec/hevc_sei.c @@ -71,6 +71,21 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s) skip_bits1(gb); // upsampled_aspect_ratio_flag } +static void decode_nal_sei_display_orientation(HEVCContext *s) +{ + GetBitContext *gb = &s->HEVClc.gb; + + s->sei_display_orientation_present = !get_bits1(gb); + + if (s->sei_display_orientation_present) { + s->sei_hflip = get_bits1(gb); // hor_flip + s->sei_vflip = get_bits1(gb); // ver_flip + + s->sei_anticlockwise_rotation = get_bits(gb, 16); + skip_bits1(gb); // display_orientation_persistence_flag + } +} + static int decode_nal_sei_message(HEVCContext *s) { GetBitContext *gb = &s->HEVClc.gb; @@ -94,6 +109,8 @@ static int decode_nal_sei_message(HEVCContext *s) decode_nal_sei_decoded_picture_hash(s); else if (payload_type == 45) decode_nal_sei_frame_packing_arrangement(s); + else if (payload_type == 47) + decode_nal_sei_display_orientation(s); else { av_log(s->avctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", payload_type); skip_bits(gb, 8 * payload_size); |