ittiam-systems / libmpegh

MPEG-H 3D Audio Low Complexity Profile Decoder. Encoder: https://github.com/ittiam-systems/libmpeghe
http://www.ittiam.com/
BSD 3-Clause Clear License
87 stars 20 forks source link

Unable to decode "BL@L3" and "LC@L3, BL@L3" format profile? #21

Closed sclsj closed 4 months ago

sclsj commented 1 year ago
ia_mpeghd_testbench -ifile:/Users/jin/Documents/Fraunhofer\ MPEG-H\ Plugin\ BL.mp4 -ofile:/Users/jin/Documents/Fraunhofer\ MPEG-H\ Plugin.wav
-ifile:/Users/jin/Documents/Fraunhofer MPEG-H Plugin BL.mp4 -ofile:/Users/jin/Documents/Fraunhofer MPEG-H Plugin.wav 
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                      IA_MPEG_H_3D_AUD_DEC_ARM $Rev: 1.2 $

fatal error: Ittiam mpegh_dec  core coder module :Initialization: : Initialization fatal error

https://user-images.githubusercontent.com/38654636/197081283-2ca03631-90e2-4786-9d47-06e1cc453748.mp4

mediainfo /Users/jin/Documents/Fraunhofer\ MPEG-H\ Plugin\ LC+BL.mp4 
General
Complete name                            : /Users/jin/Documents/Fraunhofer MPEG-H Plugin LC+BL.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42)
File size                                : 80.8 KiB
Duration                                 : 10 s 0 ms
Overall bit rate                         : 66.2 kb/s
Encoded date                             : UTC 2022-10-20 23:59:31
Tagged date                              : UTC 2022-10-20 23:59:31

Audio
ID                                       : 1
Format                                   : MPEG-H 3D Audio
Format profile                           : LC@L3, BL@L3
Codec ID                                 : mhm1
Duration                                 : 10 s 0 ms
Duration_LastFrame                       : -5 ms
Bit rate                                 : 64.0 kb/s
Channel(s)                               : 12 channels (7.1.4)
Channel layout                           : L R C LFE Lb Rb Lss Rss Tfl Tfr Tbl Tbr
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Stream size                              : 78.3 KiB (97%)
Encoded date                             : UTC 2022-10-20 23:59:31
Tagged date                              : UTC 2022-10-20 23:59:31
DRC effect type(s)                       : General (1-0) / General (2-0)
Sample peak level                        : -2.656 dBFS
Program loudness                         : -4.50 LKFS
Signal group #1                          : 1 object
 Type                                    : Object
 Number of objects                       : 1 object
Codec configuration box                  : mhaC

https://user-images.githubusercontent.com/38654636/197081284-fddf2f77-b06d-40e5-a56d-34149613749a.mp4

mediainfo /Users/jin/Documents/Fraunhofer\ MPEG-H\ Plugin.mp4 
General
Complete name                            : /Users/jin/Documents/Fraunhofer MPEG-H Plugin.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42)
File size                                : 120 KiB
Duration                                 : 10 s 0 ms
Overall bit rate                         : 98.2 kb/s
Encoded date                             : UTC 2022-10-20 03:11:26
Tagged date                              : UTC 2022-10-20 03:11:26

Audio
ID                                       : 1
Format                                   : MPEG-H 3D Audio
Format profile                           : BL@L3
Codec ID                                 : mhm1
Duration                                 : 10 s 0 ms
Duration_LastFrame                       : -5 ms
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 12 channels (7.1.4)
Channel layout                           : L R C LFE Lb Rb Lss Rss Tfl Tfr Tbl Tbr
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Stream size                              : 117 KiB (98%)
Encoded date                             : UTC 2022-10-20 03:11:26
Tagged date                              : UTC 2022-10-20 03:11:26
DRC effect type(s)                       : General (1-0) / General (2-0)
Sample peak level                        : -2.656 dBFS
Program loudness                         : -4.50 LKFS
Signal group #1                          : 1 object
 Type                                    : Object
 Number of objects                       : 1 object
Codec configuration box                  : mhaC

Source file: MPF.wav.zip ADM.wav.zip

Source object produced by sox -v 0.50 -n -r 48k -b 16 -c 1 1.wav synth 10 sin 120. Source file produced by trial with MPEG-H Authoring Tool working. Encoded mp4 produced by MPEG-H EncMux. The latter two comes from "the MPEG-H Authoring Suite 5.0 which is available for free here: https://www.iis.fraunhofer.de/en/ff/amm/dl/software/mas.html"

SakethSathuvalli commented 1 year ago

Hi @sclsj,

Can You please let us know if the decode failure happens with our latest commit - 3b23f65 ?

Thanks!

SakethSathuvalli commented 1 year ago

Hi @sclsj,

I was wondering if You got a chance to try decoding the files with our latest commit!

sclsj commented 1 year ago

Yep, still the same problem (error output) with freshly cloned and built project.

With that being said, I'm doing autoreconf -i ; ./configure; make to build the project. It seems like I can also build the project using cmake (which I tried; it gave an error, see below) or the makefile in build/make (which I tried before successfully, but I don't remember how I did it)? Is there any difference between these three way of compiling?

Cmake error (`mkdir buildnew ; cd buildnew ; cmake ../)

make
[  0%] Building C object CMakeFiles/ia_mpeghd_lib.dir/decoder/impd_drc_dynamic_payload.c.o
[  1%] Building C object CMakeFiles/ia_mpeghd_lib.dir/decoder/impd_drc_extr_delta_coded_info.c.o
[  2%] Building C object CMakeFiles/ia_mpeghd_lib.dir/decoder/impd_drc_filter_bank.c.o
In file included from /Users/jin/libmpeghnew/decoder/impd_drc_filter_bank.c:36:
/Users/jin/libmpeghnew/decoder/impeghd_type_def.h:55:13: error: typedef redefinition with different types ('int' vs '__darwin_intptr_t' (aka 'long'))
typedef int intptr_t;
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/_types/_intptr_t.h:32:33: note: previous definition is here
typedef __darwin_intptr_t       intptr_t;
                                ^
1 error generated.
make[2]: *** [CMakeFiles/ia_mpeghd_lib.dir/decoder/impd_drc_filter_bank.c.o] Error 1
make[1]: *** [CMakeFiles/ia_mpeghd_lib.dir/all] Error 2
make: *** [all] Error 2
SakethSathuvalli commented 1 year ago

Hi @sclsj,

We follwed the steps provided here and the build was successful on macOS. Can You provide details about Cmake version you used and the compiler you are using ?

sclsj commented 1 year ago
cmake --version
cmake version 3.25.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
cmake ../  -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jin/libmpegh_compileerror/bin
cc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
c++ --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
sclsj commented 1 year ago

Also tried with gcc version 12.2.0 installed with homebrew:

export CC=/opt/homebrew/bin/gcc-12
export CXX=/opt/homebrew/bin/g++-12 
cmake ../
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/homebrew/bin/gcc-12 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/bin/g++-12 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jin/libmpegh_compileerror/bin

Got the same error with make.

sclsj commented 1 year ago

Apparently by commenting out that line (55) the program is able to compile. I'm not sure if that causes any unexpected behaviors, but it seems like the executable works and passed the smoke test provided.

sclsj commented 1 year ago

Hello.

For your reference, I cloned the latest repo and compiled again using autoreconf and saw no errors.

sclsj commented 11 months ago

Hello, this issue might be a duplicate of #54. Let me know if I should close this issue.

SakethSathuvalli commented 9 months ago

Hi @sclsj,

The fix for #54 is available on latest main now. Please try latest main build once.

Thanks!

SakethSathuvalli commented 4 months ago

Closing due to no activity since long time.