[FFmpeg-cvslog] avformat/vvc: use align_get_bits() where useful

James Almer git at videolan.org
Sat May 18 19:31:19 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat May 18 11:49:43 2024 -0300| [9ab8dddf1f2e1ffb7ee24b550173247f7c63c692] | committer: James Almer

avformat/vvc: use align_get_bits() where useful

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavformat/vvc.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/libavformat/vvc.c b/libavformat/vvc.c
index 19143f85dd..449c933881 100644
--- a/libavformat/vvc.c
+++ b/libavformat/vvc.c
@@ -191,15 +191,13 @@ static void vvcc_parse_ptl(GetBitContext *gb,
             general_ptl.num_bytes_constraint_info = j;
             skip_bits(gb, gci_num_reserved_bits);
         }
-        while (gb->index % 8 != 0)
-            skip_bits1(gb);
+        align_get_bits(gb);
     }
 
     for (int i = max_sub_layers_minus1 - 1; i >= 0; i--)
         general_ptl.ptl_sublayer_level_present_flag[i] = get_bits1(gb);
 
-    while (gb->index % 8 != 0)
-        skip_bits1(gb);
+    align_get_bits(gb);
 
     for (int i = max_sub_layers_minus1 - 1; i >= 0; i--) {
         if (general_ptl.ptl_sublayer_level_present_flag[i])
@@ -307,8 +305,7 @@ static int vvcc_parse_vps(GetBitContext *gb,
             vps_ptl_max_tid[i] = vps_max_sublayers_minus1;
     }
 
-    while (gb->index % 8 != 0)
-        skip_bits1(gb);
+    align_get_bits(gb);
 
     for (int i = 0; i <= vps_num_ptls_minus1; i++)
         vvcc_parse_ptl(gb, vvcc, vps_pt_present_flag[i], vps_ptl_max_tid[i]);



More information about the ffmpeg-cvslog mailing list