]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3enc.c
lavc/x264: Use FF_CODEC_CAP_INIT_THREADSAFE if x264 is new.
[ffmpeg] / libavcodec / ac3enc.c
index e7e18af92d5b75813552f0a3a616a3b763b723e0..76872a8fe05f82fb3cb884b9a0d33e3d6942aa30 100644 (file)
@@ -652,7 +652,7 @@ void ff_ac3_process_exponents(AC3EncodeContext *s)
  */
 static void count_frame_bits_fixed(AC3EncodeContext *s)
 {
-    static const int frame_bits_inc[8] = { 0, 0, 2, 2, 2, 4, 2, 4 };
+    static const uint8_t frame_bits_inc[8] = { 0, 0, 2, 2, 2, 4, 2, 4 };
     int blk;
     int frame_bits;
 
@@ -1065,7 +1065,7 @@ static int bit_alloc(AC3EncodeContext *s, int snr_offset)
 {
     int blk, ch;
 
-    snr_offset = (snr_offset - 240) << 2;
+    snr_offset = (snr_offset - 240) * 4;
 
     reset_block_bap(s);
     for (blk = 0; blk < s->num_blocks; blk++) {