]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cbs_h264_syntax_template.c
avcodec/dirac_arith: Make table only used here static
[ffmpeg] / libavcodec / cbs_h264_syntax_template.c
index 878d348b948a53fd2600b49b55aae4d0fc0d17c0..b65460996b1b478c1ab0bf7ccf482fc3326cdf9b 100644 (file)
@@ -1366,7 +1366,7 @@ static int FUNC(slice_header)(CodedBitstreamContext *ctx, RWContext *rw,
                    (sps->pic_height_in_map_units_minus1 + 1);
         max = (pic_size + pps->slice_group_change_rate_minus1) /
               (pps->slice_group_change_rate_minus1 + 1);
-        bits = av_log2(2 * max - 1);
+        bits = av_ceil_log2(max + 1);
 
         u(bits, slice_group_change_cycle, 0, max);
     }