[vlc-commits] contribs: faad2: fix 4 channels groups handling
Francois Cartegnie
git at videolan.org
Wed Aug 23 12:52:47 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug 23 12:34:12 2017 +0200| [85f0e45b2304afa64ace2e3f0ddc19ad8b5accfb] | committer: Francois Cartegnie
contribs: faad2: fix 4 channels groups handling
fixes output when channels are declared as 4 back or side chans
refs #18719
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85f0e45b2304afa64ace2e3f0ddc19ad8b5accfb
---
contrib/src/faad2/faad2-fix-4channels-groups.patch | 25 ++++++++++++++++++++++
contrib/src/faad2/rules.mak | 1 +
2 files changed, 26 insertions(+)
diff --git a/contrib/src/faad2/faad2-fix-4channels-groups.patch b/contrib/src/faad2/faad2-fix-4channels-groups.patch
new file mode 100644
index 0000000000..3ac27c71ca
--- /dev/null
+++ b/contrib/src/faad2/faad2-fix-4channels-groups.patch
@@ -0,0 +1,25 @@
+diff -Naur faad2/libfaad/decoder.c faad2_patched/libfaad/decoder.c
+--- faad2/libfaad/decoder.c 2017-08-23 12:31:12.495650331 +0200
++++ faad2_patched/libfaad/decoder.c 2017-08-23 12:30:44.755816954 +0200
+@@ -600,6 +601,21 @@
+ hInfo->num_lfe_channels = hDecoder->pce.num_lfe_channels;
+ total += hInfo->num_lfe_channels;
+
++ /* Patch when channels are declared as 1 + 4 */
++ if(total <= 8)
++ {
++ if(hInfo->num_front_channels < 2 && hInfo->num_side_channels > 3)
++ {
++ hInfo->num_front_channels += 2;
++ hInfo->num_side_channels -= 2;
++ }
++ if(hInfo->num_side_channels < 2 && hInfo->num_back_channels > 3)
++ {
++ hInfo->num_side_channels += 2;
++ hInfo->num_back_channels -= 2;
++ }
++ }
++
+ chdir = hInfo->num_front_channels;
+ if (chdir & 1)
+ {
diff --git a/contrib/src/faad2/rules.mak b/contrib/src/faad2/rules.mak
index 4a4467b714..48bd86d4e6 100644
--- a/contrib/src/faad2/rules.mak
+++ b/contrib/src/faad2/rules.mak
@@ -24,6 +24,7 @@ endif
$(APPLY) $(SRC)/faad2/faad2-fix-71wPCEmapping.patch
$(APPLY) $(SRC)/faad2/faad2-fix-cpe-reconstruction.patch
$(APPLY) $(SRC)/faad2/faad2-add-define.patch
+ $(APPLY) $(SRC)/faad2/faad2-fix-4channels-groups.patch
cd $(UNPACK_DIR) && $(CC) -iquote . -E - </dev/null || sed -i 's/-iquote /-I/' libfaad/Makefile.am
$(MOVE)
More information about the vlc-commits
mailing list