[FFmpeg-cvslog] avformat/av1: rename some AV1SequenceParameters fields

James Almer git at videolan.org
Mon Aug 5 21:06:08 EEST 2019


ffmpeg | branch: release/4.2 | James Almer <jamrial at gmail.com> | Tue Jul 30 11:48:38 2019 -0300| [6e53b43d487e38be7fd0c5910264433216ddcd56] | committer: James Almer

avformat/av1: rename some AV1SequenceParameters fields

Cosmetic change.

Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 0d597a69bad6e98d088f4c17989abd6a6a34084d)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e53b43d487e38be7fd0c5910264433216ddcd56
---

 libavformat/av1.c | 24 ++++++++++++------------
 libavformat/av1.h |  6 +++---
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/libavformat/av1.c b/libavformat/av1.c
index cc8918e577..43e40453c8 100644
--- a/libavformat/av1.c
+++ b/libavformat/av1.c
@@ -95,10 +95,10 @@ static inline void uvlc(GetBitContext *gb)
 static int parse_color_config(AV1SequenceParameters *seq_params, GetBitContext *gb)
 {
     seq_params->high_bitdepth = get_bits1(gb);
-    if (seq_params->seq_profile == FF_PROFILE_AV1_PROFESSIONAL && seq_params->high_bitdepth)
+    if (seq_params->profile == FF_PROFILE_AV1_PROFESSIONAL && seq_params->high_bitdepth)
         seq_params->twelve_bit = get_bits1(gb);
 
-    if (seq_params->seq_profile == FF_PROFILE_AV1_HIGH)
+    if (seq_params->profile == FF_PROFILE_AV1_HIGH)
         seq_params->monochrome = 0;
     else
         seq_params->monochrome = get_bits1(gb);
@@ -128,10 +128,10 @@ static int parse_color_config(AV1SequenceParameters *seq_params, GetBitContext *
     } else {
         seq_params->color_range = get_bits1(gb);
 
-        if (seq_params->seq_profile == FF_PROFILE_AV1_MAIN) {
+        if (seq_params->profile == FF_PROFILE_AV1_MAIN) {
             seq_params->chroma_subsampling_x = 1;
             seq_params->chroma_subsampling_y = 1;
-        } else if (seq_params->seq_profile == FF_PROFILE_AV1_HIGH) {
+        } else if (seq_params->profile == FF_PROFILE_AV1_HIGH) {
             seq_params->chroma_subsampling_x = 0;
             seq_params->chroma_subsampling_y = 0;
         } else {
@@ -172,14 +172,14 @@ static int parse_sequence_header(AV1SequenceParameters *seq_params, const uint8_
 
     memset(seq_params, 0, sizeof(*seq_params));
 
-    seq_params->seq_profile = get_bits(&gb, 3);
+    seq_params->profile = get_bits(&gb, 3);
 
     skip_bits1(&gb); // still_picture
     reduced_still_picture_header = get_bits1(&gb);
 
     if (reduced_still_picture_header) {
-        seq_params->seq_level_idx_0 = get_bits(&gb, 5);
-        seq_params->seq_tier_0 = 0;
+        seq_params->level = get_bits(&gb, 5);
+        seq_params->tier = 0;
     } else {
         int initial_display_delay_present_flag, operating_points_cnt_minus_1;
         int decoder_model_info_present_flag, buffer_delay_length_minus_1;
@@ -229,8 +229,8 @@ static int parse_sequence_header(AV1SequenceParameters *seq_params, const uint8_
             }
 
             if (i == 0) {
-               seq_params->seq_level_idx_0 = seq_level_idx;
-               seq_params->seq_tier_0 = seq_tier;
+               seq_params->level = seq_level_idx;
+               seq_params->tier = seq_tier;
             }
         }
     }
@@ -380,9 +380,9 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size)
 
     put_bits(&pbc, 1, 1); // marker
     put_bits(&pbc, 7, 1); // version
-    put_bits(&pbc, 3, seq_params.seq_profile);
-    put_bits(&pbc, 5, seq_params.seq_level_idx_0);
-    put_bits(&pbc, 1, seq_params.seq_tier_0);
+    put_bits(&pbc, 3, seq_params.profile);
+    put_bits(&pbc, 5, seq_params.level);
+    put_bits(&pbc, 1, seq_params.tier);
     put_bits(&pbc, 1, seq_params.high_bitdepth);
     put_bits(&pbc, 1, seq_params.twelve_bit);
     put_bits(&pbc, 1, seq_params.monochrome);
diff --git a/libavformat/av1.h b/libavformat/av1.h
index f2e5be76e4..308bff4818 100644
--- a/libavformat/av1.h
+++ b/libavformat/av1.h
@@ -26,9 +26,9 @@
 #include "avio.h"
 
 typedef struct AV1SequenceParameters {
-    uint8_t seq_profile;
-    uint8_t seq_level_idx_0;
-    uint8_t seq_tier_0;
+    uint8_t profile;
+    uint8_t level;
+    uint8_t tier;
     uint8_t high_bitdepth;
     uint8_t twelve_bit;
     uint8_t monochrome;



More information about the ffmpeg-cvslog mailing list