]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_parse.c
avcodec/cavsdec, h264*, hevc_parser: Use get_ue_golomb_31 where possible
[ffmpeg] / libavcodec / h264_parse.c
index 352ffea94899087d92b792eba4ea59436b303cf7..1c1d1c04b02ba4fa756da8445e2f2f0e6f597f42 100644 (file)
@@ -35,7 +35,7 @@ int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
     pwt->use_weight             = 0;
     pwt->use_weight_chroma      = 0;
 
-    pwt->luma_log2_weight_denom = get_ue_golomb(gb);
+    pwt->luma_log2_weight_denom = get_ue_golomb_31(gb);
     if (pwt->luma_log2_weight_denom > 7U) {
         av_log(logctx, AV_LOG_ERROR, "luma_log2_weight_denom %d is out of range\n", pwt->luma_log2_weight_denom);
         pwt->luma_log2_weight_denom = 0;
@@ -43,7 +43,7 @@ int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
     luma_def = 1 << pwt->luma_log2_weight_denom;
 
     if (sps->chroma_format_idc) {
-        pwt->chroma_log2_weight_denom = get_ue_golomb(gb);
+        pwt->chroma_log2_weight_denom = get_ue_golomb_31(gb);
         if (pwt->chroma_log2_weight_denom > 7U) {
             av_log(logctx, AV_LOG_ERROR, "chroma_log2_weight_denom %d is out of range\n", pwt->chroma_log2_weight_denom);
             pwt->chroma_log2_weight_denom = 0;