]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/svq3.c
arm/aarch64: vp9lpf: Calculate !hev directly
[ffmpeg] / libavcodec / svq3.c
index e0747d58844dbf08d918d53d6fa338645686faea..06e3d37590df05f830293f6c4af769220642e824 100644 (file)
@@ -629,11 +629,6 @@ static av_always_inline void hl_decode_mb_idct_luma(SVQ3Context *s,
     }
 }
 
-static av_always_inline int dctcoef_get(int16_t *mb, int index)
-{
-    return AV_RN16A(mb + index);
-}
-
 static av_always_inline void hl_decode_mb_predict_luma(SVQ3Context *s,
                                                        int mb_type,
                                                        const int *block_offset,
@@ -1070,14 +1065,16 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
         av_log(s->avctx, AV_LOG_ERROR, "illegal slice type %u \n", slice_id);
         return -1;
     }
+    if (get_bits1(&s->gb_slice)) {
+        avpriv_report_missing_feature(s->avctx, "Media key encryption");
+        return AVERROR_PATCHWELCOME;
+    }
 
     s->slice_type = ff_h264_golomb_to_pict_type[slice_id];
 
     if ((header & 0x9F) == 2) {
-        i = (s->mb_num < 64) ? 6 : (1 + av_log2(s->mb_num - 1));
+        i = (s->mb_num < 64) ? 5 : av_log2(s->mb_num - 1);
         get_bits(&s->gb_slice, i);
-    } else {
-        skip_bits1(&s->gb_slice);
     }
 
     s->slice_num      = get_bits(&s->gb_slice, 8);