ffmpeg patches for TERMUX from Andrew + mpeg formats
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / ffmpeg-4.4.patch_1
diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-4.4.patch_1 b/cinelerra-5.1/thirdparty/src/ffmpeg-4.4.patch_1
new file mode 100644 (file)
index 0000000..b453e71
--- /dev/null
@@ -0,0 +1,35 @@
+--- ffmpeg-4.4/libavcodec/aaccoder.c.orig      2021-05-08 11:52:41.824074401 +0300
++++ ffmpeg-4.4/libavcodec/aaccoder.c   2021-05-08 11:55:06.868074410 +0300
+@@ -800,7 +800,7 @@
+
+                 for (sid_sf_boost = 0; sid_sf_boost < 4; sid_sf_boost++) {
+                     float dist1 = 0.0f, dist2 = 0.0f;
+-                    int B0 = 0, B1 = 0;
++                    int B0_ = 0, B1 = 0;
+                     int minidx;
+                     int mididx, sididx;
+                     int midcb, sidcb;
+@@ -862,12 +862,12 @@
+                                                     sididx,
+                                                     sidcb,
+                                                     mslambda / (minthr * bmax), INFINITY, &b4, NULL, 0);
+-                        B0 += b1+b2;
++                        B0_ += b1+b2;
+                         B1 += b3+b4;
+                         dist1 -= b1+b2;
+                         dist2 -= b3+b4;
+                     }
+-                    cpe->ms_mask[w*16+g] = dist2 <= dist1 && B1 < B0;
++                    cpe->ms_mask[w*16+g] = dist2 <= dist1 && B1 < B0_;
+                     if (cpe->ms_mask[w*16+g]) {
+                         if (sce0->band_type[w*16+g] != NOISE_BT && sce1->band_type[w*16+g] != NOISE_BT) {
+                             sce0->sf_idx[w*16+g] = mididx;
+@@ -879,7 +879,7 @@
+                             cpe->ms_mask[w*16+g] = 0;
+                         }
+                         break;
+-                    } else if (B1 > B0) {
++                    } else if (B1 > B0_) {
+                         /* More boost won't fix this */
+                         break;
+                     }