From c546ef216f9c580be60b00b01ffc1fb927ce8a67 Mon Sep 17 00:00:00 2001 From: Neo Date: Tue, 25 Jun 2019 00:59:46 +0800 Subject: [PATCH 1/3] upgrade gitignore --- .gitignore | 701 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 675 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 520a863..103d497 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,640 @@ +*.iml +# Created by .ignore support plugin (hsz.mobi) +### NotepadPP ### +# Notepad++ backups # +*.bak + + +### Eclipse ### + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# Eclipse Core +.project + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + + +### Git ### +*.orig + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json + + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon +# Thumbnails +._* +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Emacs ### +# -*- mode: gitignore; -*- +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + + +### Vim ### +# swap +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +# session +Session.vim +# temporary +.netrwhist +# auto-generated tag files +tags + + +### Intellij+iml ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/workspace.xml +.idea/tasks.xml + +# Sensitive or high-churn files: +.idea/dataSources/ +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml + +# Gradle: +.idea/gradle.xml +.idea/libraries + +# Mongo Explorer plugin: +.idea/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### Intellij+iml Patch ### +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + + +### Java ### +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### Gradle ### +.gradle +/build/ +.externalNativeBuild + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +*.vcxproj.filters + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ +Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/ + +### VisualStudio Patch ### +build/ + +### NetBeans template +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + +# Mac OS X Garbage +.DS_Store +Thumbs.db + +.idea/ + +### Android Studio +fabric.properties +mobile/mobile.iml +app/app.iml +app/*.iml +tv/tv.iml +*.iml +mobile/*.iml +tv/*.iml +.idea/workspace.xml +.idea/libraries +.idea/ +.idea +/build +/captures +### Android template # Built application files *.apk *.ap_ - -# Files for the ART/Dalvik VM +/build +/captures +# Files for the Dalvik VM *.dex - +/Properties +/SignKeys +/apk_output_folder # Java class files *.class # Generated files bin/ gen/ -out/ +R.java # Gradle files .gradle/ -build/ # Local configuration file (sdk path, etc) local.properties @@ -26,30 +645,60 @@ proguard/ # Log Files *.log -# Android Studio Navigation editor temp files -.navigation/ -# Android Studio captures folder -captures/ +### Java template +*.class -# Intellij -*.iml -.idea/workspace.xml -.idea/tasks.xml -.idea/gradle.xml -.idea/dictionaries -.idea/libraries +# Mobile Tools for Java (J2ME) +.mtj.tmp/ -# Keystore files -*.jks +# Package Files # +*.jar +*.war +*.ear -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### Eclipse template +*.pydevproject +.metadata +.gradle +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +.settings/ +.loadpath +/build +/captures +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +# sbteclipse plugin +.target + +# TeXlipse plugin +.texlipse + +# Android Studio +*.iml + +# Keep external libs +!app/libs/*.jar -# Google Services (e.g. APIs or Firebase) -google-services.json +# script output +check-dpi.txt* -# Freeline -freeline.py -freeline/ -freeline_project_description.json From 05f66e886f974d5d8ed3b8e9673f649aef4e0e27 Mon Sep 17 00:00:00 2001 From: Neo Date: Tue, 25 Jun 2019 01:00:11 +0800 Subject: [PATCH 2/3] upgrade build.gradle --- app/build.gradle | 7 ++++--- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.jar | Bin 54708 -> 0 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- library/build.gradle | 8 ++++---- library/src/main/res/values/strings.xml | 3 --- 6 files changed, 10 insertions(+), 12 deletions(-) delete mode 100644 gradle/wrapper/gradle-wrapper.jar delete mode 100644 library/src/main/res/values/strings.xml diff --git a/app/build.gradle b/app/build.gradle index 1424f69..bf9a855 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 28 + buildToolsVersion "29.0.0" defaultConfig { applicationId "jaygoo.demo.mp3converter" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -21,7 +22,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.yanzhenjie:permission:2.0.0-rc12' implementation project(path: ':library') } diff --git a/build.gradle b/build.gradle index da422c4..2657f94 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.1' + classpath 'com.android.tools.build:gradle:3.4.1' } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7a3265ee94c0ab25cf079ac8ccdf87f41d455d42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54708 zcmagFV|ZrKvM!pAZQHhO+qP}9lTNj?q^^Y^VFp)SH8qbSJ)2BQ2girk4u zvO<3q)c?v~^Z#E_K}1nTQbJ9gQ9<%vVRAxVj)8FwL5_iTdUB>&m3fhE=kRWl;g`&m z!W5kh{WsV%fO*%je&j+Lv4xxK~zsEYQls$Q-p&dwID|A)!7uWtJF-=Tm1{V@#x*+kUI$=%KUuf2ka zjiZ{oiL1MXE2EjciJM!jrjFNwCh`~hL>iem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;5*7K$B`zPjJ%m2pwr*G6tf8tN%a

_x$+l{{cH8$W#CT diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d7722fb..0d3e2df 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/library/build.gradle b/library/build.gradle index 7f7f421..fac74b6 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -12,11 +12,11 @@ apply plugin: 'com.github.dcendents.android-maven' group='com.github.Jay-Goo' android { - compileSdkVersion 27 - + compileSdkVersion 28 + buildToolsVersion "29.0.0" defaultConfig { minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" @@ -61,7 +61,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' } diff --git a/library/src/main/res/values/strings.xml b/library/src/main/res/values/strings.xml deleted file mode 100644 index 6d51856..0000000 --- a/library/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Library - From e3736da3a5bcd683ee5a1d66febd216b80947249 Mon Sep 17 00:00:00 2001 From: Neo Date: Tue, 25 Jun 2019 02:12:57 +0800 Subject: [PATCH 3/3] simulate submodue --lame <--fail --- Lame/.gitignore | 704 +++++++++ Lame/LameMP3/CMake/.gitignore | 1 + Lame/LameMP3/CMake/CMakeLists.txt | 22 + Lame/LameMP3/CMake/LICENSE | 21 + Lame/LameMP3/CMake/README.md | 80 + Lame/LameMP3/CMake/build.gradle | 54 + Lame/LameMP3/CMake/proguard-rules.pro | 21 + .../CMake/src/main/AndroidManifest.xml | 6 + .../CMake/src/main/cpp/lamemp3/CMakeLists.txt | 45 + .../CMake}/src/main/cpp/lamemp3/VbrTag.c | 295 ++-- .../CMake/src/main/cpp/lamemp3/VbrTag.h | 82 + .../CMake}/src/main/cpp/lamemp3/bitstream.c | 225 ++- .../CMake/src/main/cpp/lamemp3/bitstream.h | 44 + .../CMake}/src/main/cpp/lamemp3/encoder.c | 136 +- .../CMake/src/main/cpp/lamemp3/encoder.h | 153 ++ .../LameMP3/CMake}/src/main/cpp/lamemp3/fft.c | 90 +- Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.h | 35 + .../src/main/cpp/lamemp3/gain_analysis.c | 230 ++- .../src/main/cpp/lamemp3/gain_analysis.h | 113 ++ .../CMake}/src/main/cpp/lamemp3/id3tag.c | 772 ++++----- .../CMake/src/main/cpp/lamemp3/id3tag.h | 65 + .../CMake/src/main/cpp/lamemp3/l3side.h | 95 ++ .../src/main/cpp/lamemp3/lame-analysis.h | 95 ++ .../CMake}/src/main/cpp/lamemp3/lame.c | 529 +++---- .../LameMP3/CMake/src/main/cpp/lamemp3/lame.h | 1400 +++++++++++++++++ .../src/main/cpp/lamemp3/lame_global_flags.h | 186 +++ .../CMake/src/main/cpp/lamemp3/lameerror.h | 26 + .../CMake/src/main/cpp/lamemp3/machine.h | 195 +++ .../src/main/cpp/lamemp3/mpglib_interface.c | 0 .../CMake}/src/main/cpp/lamemp3/newmdct.c | 801 +++++----- .../CMake/src/main/cpp/lamemp3/newmdct.h | 27 + .../CMake/src/main/cpp/lamemp3/presets.c | 391 +++++ .../CMake}/src/main/cpp/lamemp3/psymodel.c | 638 ++++---- .../CMake/src/main/cpp/lamemp3/psymodel.h | 64 + .../CMake}/src/main/cpp/lamemp3/quantize.c | 646 ++++---- .../CMake/src/main/cpp/lamemp3/quantize.h | 38 + .../src/main/cpp/lamemp3/quantize_pvt.c | 451 +++--- .../CMake/src/main/cpp/lamemp3/quantize_pvt.h | 127 ++ .../CMake}/src/main/cpp/lamemp3/reservoir.c | 41 +- .../CMake/src/main/cpp/lamemp3/reservoir.h | 34 + .../CMake}/src/main/cpp/lamemp3/set_get.c | 627 +++----- .../CMake/src/main/cpp/lamemp3/set_get.h | 85 + .../CMake/src/main/cpp/lamemp3/tables.c | 558 +++++++ .../CMake/src/main/cpp/lamemp3/tables.h | 95 ++ .../CMake}/src/main/cpp/lamemp3/takehiro.c | 441 +++--- .../CMake}/src/main/cpp/lamemp3/util.c | 297 ++-- .../LameMP3/CMake/src/main/cpp/lamemp3/util.h | 635 ++++++++ .../CMake}/src/main/cpp/lamemp3/vbrquantize.c | 471 +++--- .../CMake/src/main/cpp/lamemp3/vbrquantize.h | 28 + .../src/main/cpp/lamemp3/vector/lame_intrin.h | 33 + .../cpp/lamemp3/vector/xmm_quantize_sub.c | 3 +- .../CMake}/src/main/cpp/lamemp3/version.c | 53 +- .../CMake/src/main/cpp/lamemp3/version.h | 68 + .../src/main/jniLibs/arm64-v8a/liblame.so | Bin 0 -> 884208 bytes .../src/main/jniLibs/armeabi-v7a/liblame.so | Bin 0 -> 798136 bytes .../CMake/src/main/jniLibs/x86_64/liblame.so | Bin 0 -> 911992 bytes Lame/build.gradle | 89 ++ Lame/gradle.properties | 15 + Lame/gradle/wrapper/gradle-wrapper.properties | 5 + Lame/gradlew | 172 ++ Lame/gradlew.bat | 84 + Lame/settings.gradle | 4 + library/CMakeLists.txt | 29 +- library/build.gradle | 3 +- library/src/main/cpp/CMakeLists.txt | 8 + library/src/main/cpp/lamemp3/presets.c | 405 ----- library/src/main/cpp/lamemp3/tables.c | 564 ------- library/src/main/jniLibs/arm64-v8a/liblame.so | Bin 0 -> 884264 bytes .../src/main/jniLibs/armeabi-v7a/liblame.so | Bin 0 -> 798200 bytes .../main/jniLibs/armeabi/liblame-mp3-utils.so | Bin 1165924 -> 0 bytes .../main/jniLibs/mips/liblame-mp3-utils.so | Bin 1629444 -> 0 bytes .../main/jniLibs/mips64/liblame-mp3-utils.so | Bin 1618904 -> 0 bytes library/src/main/jniLibs/x86_64/liblame.so | Bin 0 -> 912056 bytes settings.gradle | 2 + 74 files changed, 9019 insertions(+), 4733 deletions(-) create mode 100644 Lame/.gitignore create mode 100644 Lame/LameMP3/CMake/.gitignore create mode 100644 Lame/LameMP3/CMake/CMakeLists.txt create mode 100644 Lame/LameMP3/CMake/LICENSE create mode 100644 Lame/LameMP3/CMake/README.md create mode 100644 Lame/LameMP3/CMake/build.gradle create mode 100644 Lame/LameMP3/CMake/proguard-rules.pro create mode 100644 Lame/LameMP3/CMake/src/main/AndroidManifest.xml create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/CMakeLists.txt rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/VbrTag.c (81%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/bitstream.c (88%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/encoder.c (87%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/fft.c (83%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/gain_analysis.c (56%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/id3tag.c (75%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/l3side.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame-analysis.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/lame.c (89%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame_global_flags.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/lameerror.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/machine.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/mpglib_interface.c (100%) rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/newmdct.c (50%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/presets.c rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/psymodel.c (84%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/quantize.c (83%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/quantize_pvt.c (69%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/reservoir.c (92%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/set_get.c (78%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.c create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/takehiro.c (81%) rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/util.c (83%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/vbrquantize.c (83%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.h create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/lame_intrin.h rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c (99%) rename {library => Lame/LameMP3/CMake}/src/main/cpp/lamemp3/version.c (87%) create mode 100644 Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.h create mode 100644 Lame/LameMP3/CMake/src/main/jniLibs/arm64-v8a/liblame.so create mode 100644 Lame/LameMP3/CMake/src/main/jniLibs/armeabi-v7a/liblame.so create mode 100644 Lame/LameMP3/CMake/src/main/jniLibs/x86_64/liblame.so create mode 100644 Lame/build.gradle create mode 100644 Lame/gradle.properties create mode 100644 Lame/gradle/wrapper/gradle-wrapper.properties create mode 100644 Lame/gradlew create mode 100644 Lame/gradlew.bat create mode 100644 Lame/settings.gradle create mode 100644 library/src/main/cpp/CMakeLists.txt delete mode 100644 library/src/main/cpp/lamemp3/presets.c delete mode 100644 library/src/main/cpp/lamemp3/tables.c create mode 100644 library/src/main/jniLibs/arm64-v8a/liblame.so create mode 100644 library/src/main/jniLibs/armeabi-v7a/liblame.so delete mode 100755 library/src/main/jniLibs/armeabi/liblame-mp3-utils.so delete mode 100755 library/src/main/jniLibs/mips/liblame-mp3-utils.so delete mode 100755 library/src/main/jniLibs/mips64/liblame-mp3-utils.so create mode 100644 library/src/main/jniLibs/x86_64/liblame.so diff --git a/Lame/.gitignore b/Lame/.gitignore new file mode 100644 index 0000000..103d497 --- /dev/null +++ b/Lame/.gitignore @@ -0,0 +1,704 @@ +*.iml +# Created by .ignore support plugin (hsz.mobi) +### NotepadPP ### +# Notepad++ backups # +*.bak + + +### Eclipse ### + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# Eclipse Core +.project + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + + +### Git ### +*.orig + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json + + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon +# Thumbnails +._* +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Emacs ### +# -*- mode: gitignore; -*- +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + + +### Vim ### +# swap +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +# session +Session.vim +# temporary +.netrwhist +# auto-generated tag files +tags + + +### Intellij+iml ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/workspace.xml +.idea/tasks.xml + +# Sensitive or high-churn files: +.idea/dataSources/ +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml + +# Gradle: +.idea/gradle.xml +.idea/libraries + +# Mongo Explorer plugin: +.idea/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### Intellij+iml Patch ### +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + + +### Java ### +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### Gradle ### +.gradle +/build/ +.externalNativeBuild + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +*.vcxproj.filters + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ +Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/ + +### VisualStudio Patch ### +build/ + +### NetBeans template +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + +# Mac OS X Garbage +.DS_Store +Thumbs.db + +.idea/ + +### Android Studio +fabric.properties +mobile/mobile.iml +app/app.iml +app/*.iml +tv/tv.iml +*.iml +mobile/*.iml +tv/*.iml +.idea/workspace.xml +.idea/libraries +.idea/ +.idea +/build +/captures +### Android template +# Built application files +*.apk +*.ap_ +/build +/captures +# Files for the Dalvik VM +*.dex +/Properties +/SignKeys +/apk_output_folder +# Java class files +*.class + +# Generated files +bin/ +gen/ +R.java + +# Gradle files +.gradle/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + + +### Java template +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### Eclipse template +*.pydevproject +.metadata +.gradle +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +.settings/ +.loadpath +/build +/captures +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +# sbteclipse plugin +.target + +# TeXlipse plugin +.texlipse + +# Android Studio +*.iml + +# Keep external libs +!app/libs/*.jar + +# script output +check-dpi.txt* + diff --git a/Lame/LameMP3/CMake/.gitignore b/Lame/LameMP3/CMake/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/Lame/LameMP3/CMake/.gitignore @@ -0,0 +1 @@ +/build diff --git a/Lame/LameMP3/CMake/CMakeLists.txt b/Lame/LameMP3/CMake/CMakeLists.txt new file mode 100644 index 0000000..70b38f4 --- /dev/null +++ b/Lame/LameMP3/CMake/CMakeLists.txt @@ -0,0 +1,22 @@ +# For more information about using CMake with Android Studio, read the +# documentation: https://d.android.com/studio/projects/add-native-code.html + +# Sets the minimum version of CMake required to build the native library. + +cmake_minimum_required(VERSION 3.4.1) + +#define cpp source path +#set(SRC_DIR src/main/cpp/lamemp3) + +#set *.h source path +include_directories(src/main/cpp/lamemp3) + +#set cpp source path +#aux_source_directory(src/main/cpp/lamemp3 SRC_LIST) + +#set *.so files output path,please add this before add_library +#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}) +set(jnilibs "${CMAKE_SOURCE_DIR}/src/main/jniLibs") +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${jnilibs}/${ANDROID_ABI}) + +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/src/main/cpp/lamemp3) \ No newline at end of file diff --git a/Lame/LameMP3/CMake/LICENSE b/Lame/LameMP3/CMake/LICENSE new file mode 100644 index 0000000..1e88809 --- /dev/null +++ b/Lame/LameMP3/CMake/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Jay-Goo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Lame/LameMP3/CMake/README.md b/Lame/LameMP3/CMake/README.md new file mode 100644 index 0000000..c6a3e14 --- /dev/null +++ b/Lame/LameMP3/CMake/README.md @@ -0,0 +1,80 @@ +# Mp3Converter +Use latest [Lame-3.100](http://lame.sourceforge.net/) to transform PCM, WAV, AIFF and other uncompressed formats into MP3 format files. +http://gujinjie.top/article/%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0Android%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8NDK%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AAMP3%E8%BD%AC%E7%A0%81%E5%BA%93/ +http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2018/0419/9615.html +https://github.com/GavinCT/AndroidMP3Recorder +https://github.com/Jay-Goo/Mp3Converter +# Usage +## Dependencies + +``` +//Project build.gradle +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } + } +//Module build.gradle +dependencies { + implementation 'com.github.Jay-Goo:Mp3Converter:v0.0.3' + } +``` +## Methods + +``` + /** + * init lame + * @param inSampleRate + * input sample rate in Hz + * @param channel + * number of channels + * @param mode + * 0 = CBR, 1 = VBR, 2 = ABR. default = 0 + * @param outSampleRate + * output sample rate in Hz + * @param outBitRate + * rate compression ratio in KHz + * @param quality + * quality=0..9. 0=best (very slow). 9=worst.
+ * recommended:
+ * 2 near-best quality, not too slow
+ * 5 good quality, fast
+ * 7 ok quality, really fast + */ + Mp3Converter.init(44100, 1, 0, 44100, 96, 7); + + /** + * file convert to mp3 +     * it may cost a lot of time and better put it in a thread +     * @param input + * file path to be converted + * @param mp3 + * mp3 output file path + */ + Mp3Converter.convertMp3(inputPath, mp3Path); + + + /** + * get converted bytes in inputBuffer + * @return + * converted bytes in inputBuffer + * to ignore the deviation of the file size,when return to -1 represents convert complete + */ + Mp3Converter.getConvertBytes() +``` +## Build +You can use Android Studio `Make Module 'library'`to create your *.so files, they will be created in your `library/src/jniLibs`Folder. + +# ABI +This library support `armeabi-v7a`, `arm64-v8a`, `mips`, `mips64`, `x86`, `x86_64` + +# Blog +You can learn how to build this library through [this article](https://gujinjie.top/2018/04/19/%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0Android%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8NDK%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AAMP3%E8%BD%AC%E7%A0%81%E5%BA%93/). + +# Future +Support amr format + +# License +MIT License +Copyright (c) 2018 Jay-Goo diff --git a/Lame/LameMP3/CMake/build.gradle b/Lame/LameMP3/CMake/build.gradle new file mode 100644 index 0000000..838e3b2 --- /dev/null +++ b/Lame/LameMP3/CMake/build.gradle @@ -0,0 +1,54 @@ +apply plugin: 'com.android.library' + +android { + compileSdkVersion 28 + buildToolsVersion "29.0.0" + defaultConfig { + minSdkVersion 16 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + externalNativeBuild { + cmake { + cppFlags "-std=c++11" + abiFilters "armeabi-v7a", "x86", "x86_64", "arm64-v8a" + } + } + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + + externalNativeBuild { + cmake { + path "CMakeLists.txt" + } + } + + packagingOptions { + pickFirst 'lib/armeabi-v7a/libmp3lame.so' + pickFirst 'lib/arm64-v8a/libmp3lame.so' + pickFirst 'lib/armeabi/libmp3lame.so' + pickFirst 'lib/x86/libmp3lame.so' + pickFirst 'lib/mips/libmp3lame.so' + pickFirst 'lib/mips64/libmp3lame.so' + pickFirst 'lib/x86_64/libmp3lame.so' + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) +} + +// Ref :https://stackoverflow.com/questions/39613452/copy-shared-objects-to-jnilibs-when-using-cmake-for-android +task copySoTojniLibs(type: Copy, dependsOn: 'bundleDebug') { + from ('.externalNativeBuild/cmake/debug/libs') { + include '**/*.so' + } + into 'src/main/jniLibs' +} diff --git a/Lame/LameMP3/CMake/proguard-rules.pro b/Lame/LameMP3/CMake/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/Lame/LameMP3/CMake/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/Lame/LameMP3/CMake/src/main/AndroidManifest.xml b/Lame/LameMP3/CMake/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b53ed6d --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/CMakeLists.txt b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/CMakeLists.txt new file mode 100644 index 0000000..fc16404 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/CMakeLists.txt @@ -0,0 +1,45 @@ +#add cpp files into library +# SUBDIRECTORY method +add_library( + # Sets the name of the library. + lame + # Sets the library as a shared library. + SHARED + # Provides a relative path to your source file(s). + lame.c + bitstream.c + encoder.c + fft.c + gain_analysis.c + id3tag.c + mpglib_interface.c + newmdct.c + presets.c + psymodel.c + quantize.c + quantize_pvt.c + reservoir.c + set_get.c + tables.c + takehiro.c + vbrquantize.c + util.c + VbrTag.c + version.c +) + +find_library( # Sets the name of the path variable. + log-lib + # Specifies the name of the NDK library that + # you want CMake to locate. + log) + +# Specifies libraries CMake should link to your target library. You +# can link multiple libraries, such as libraries you define in this +# build script, prebuilt third-party libraries, or system libraries. + +target_link_libraries( # Specifies the target library. + lame + # Links the target library to the log library + # included in the NDK. + ${log-lib}) \ No newline at end of file diff --git a/library/src/main/cpp/lamemp3/VbrTag.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.c similarity index 81% rename from library/src/main/cpp/lamemp3/VbrTag.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.c index c72bdf1..8578967 100644 --- a/library/src/main/cpp/lamemp3/VbrTag.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.c @@ -37,7 +37,6 @@ #include "bitstream.h" #include "VbrTag.h" #include "lame_global_flags.h" -#include "tables.h" #ifdef __sun__ /* woraround for SunOS 4.x, it has SEEK_* defined here */ @@ -69,12 +68,10 @@ #define XING_BITRATE2 64 #define XING_BITRATE25 32 -extern const char* get_lame_tag_encoder_short_version(void); - -static const char VBRTag0[] = { "Xing" }; -static const char VBRTag1[] = { "Info" }; - +extern const char *get_lame_tag_encoder_short_version(void); +static const char VBRTag0[] = {"Xing"}; +static const char VBRTag1[] = {"Info"}; /* Lookup table for fast CRC computation @@ -82,52 +79,48 @@ static const char VBRTag1[] = { "Info" }; * Uses the polynomial x^16+x^15+x^2+1 */ static const unsigned int crc16_lookup[256] = { - 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, - 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, - 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, - 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, - 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, - 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, - 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, - 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, - 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, - 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, - 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, - 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, - 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, - 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, - 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, - 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, - 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, - 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, - 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, - 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, - 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, - 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, - 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, - 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, - 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, - 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, - 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, - 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, - 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, - 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, - 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, - 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 }; - - - /*********************************************************************** * Robert Hegemann 2001-01-17 ***********************************************************************/ static void -addVbr(VBR_seek_info_t * v, int bitrate) -{ - int i; +addVbr(VBR_seek_info_t *v, int bitrate) { + int i; v->nVbrNumFrames++; v->sum += bitrate; @@ -152,16 +145,15 @@ addVbr(VBR_seek_info_t * v, int bitrate) } static void -Xing_seek_table(VBR_seek_info_t const* v, unsigned char *t) -{ - int i, indx; - int seek_point; +Xing_seek_table(VBR_seek_info_t const *v, unsigned char *t) { + int i, indx; + int seek_point; if (v->pos <= 0) return; for (i = 1; i < NUMTOCENTRIES; ++i) { - float j = i / (float) NUMTOCENTRIES, act, sum; + float j = i / (float) NUMTOCENTRIES, act, sum; indx = (int) (floor(j * v->pos)); if (indx > v->pos - 1) indx = v->pos - 1; @@ -197,9 +189,8 @@ print_seeking(unsigned char *t) **************************************************************************** */ void -AddVbrFrame(lame_internal_flags * gfc) -{ - int kbps = bitrate_table[gfc->cfg.version][gfc->ov_enc.bitrate_index]; +AddVbrFrame(lame_internal_flags *gfc) { + int kbps = bitrate_table[gfc->cfg.version][gfc->ov_enc.bitrate_index]; assert(gfc->VBR_seek_table.bag); addVbr(&gfc->VBR_seek_table, kbps); } @@ -207,9 +198,8 @@ AddVbrFrame(lame_internal_flags * gfc) /*-------------------------------------------------------------*/ static int -ExtractI4(const unsigned char *buf) -{ - int x; +ExtractI4(const unsigned char *buf) { + int x; /* big endian extract */ x = buf[0]; x <<= 8; @@ -222,8 +212,7 @@ ExtractI4(const unsigned char *buf) } static void -CreateI4(unsigned char *buf, uint32_t nValue) -{ +CreateI4(unsigned char *buf, uint32_t nValue) { /* big endian create */ buf[0] = (nValue >> 24) & 0xff; buf[1] = (nValue >> 16) & 0xff; @@ -232,10 +221,8 @@ CreateI4(unsigned char *buf, uint32_t nValue) } - static void -CreateI2(unsigned char *buf, int nValue) -{ +CreateI2(unsigned char *buf, int nValue) { /* big endian create */ buf[0] = (nValue >> 8) & 0xff; buf[1] = (nValue) & 0xff; @@ -243,9 +230,8 @@ CreateI2(unsigned char *buf, int nValue) /* check for magic strings*/ static int -IsVbrTag(const unsigned char *buf) -{ - int isTag0, isTag1; +IsVbrTag(const unsigned char *buf) { + int isTag0, isTag1; isTag0 = ((buf[0] == VBRTag0[0]) && (buf[1] == VBRTag0[1]) && (buf[2] == VBRTag0[2]) && (buf[3] == VBRTag0[3])); @@ -255,14 +241,13 @@ IsVbrTag(const unsigned char *buf) return (isTag0 || isTag1); } -#define SHIFT_IN_BITS_VALUE(x,n,v) ( x = (x << (n)) | ( (v) & ~(-1 << (n)) ) ) +#define SHIFT_IN_BITS_VALUE(x, n, v) ( x = (x << (n)) | ( (v) & ~(-1 << (n)) ) ) static void -setLameTagFrameHeader(lame_internal_flags const *gfc, unsigned char *buffer) -{ +setLameTagFrameHeader(lame_internal_flags const *gfc, unsigned char *buffer) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t const *const eov = &gfc->ov_enc; - char abyte, bbyte; + char abyte, bbyte; SHIFT_IN_BITS_VALUE(buffer[0], 8u, 0xffu); @@ -289,11 +274,10 @@ setLameTagFrameHeader(lame_internal_flags const *gfc, unsigned char *buffer) buffer[0] = (uint8_t) 0xff; abyte = (buffer[1] & (unsigned char) 0xf1); { - int bitrate; + int bitrate; if (1 == cfg->version) { bitrate = XING_BITRATE1; - } - else { + } else { if (cfg->samplerate_out < 16000) bitrate = XING_BITRATE25; else @@ -317,8 +301,7 @@ setLameTagFrameHeader(lame_internal_flags const *gfc, unsigned char *buffer) buffer[1] = abyte | (char) 0x0a; /* was 0x0b; */ abyte = buffer[2] & (char) 0x0d; /* AF keep also private bit */ buffer[2] = (char) bbyte | abyte; /* 64kbs MPEG1 frame */ - } - else { + } else { /* MPEG2 */ buffer[1] = abyte | (char) 0x02; /* was 0x03; */ abyte = buffer[2] & (char) 0x0d; /* AF keep also private bit */ @@ -363,18 +346,17 @@ CheckVbrTag(unsigned char *buf) #endif int -GetVbrTag(VBRTAGDATA * pTagData, const unsigned char *buf) -{ - int i, head_flags; - int h_bitrate, h_id, h_mode, h_sr_index, h_layer; - int enc_delay, enc_padding; +GetVbrTag(VBRTAGDATA *pTagData, const unsigned char *buf) { + int i, head_flags; + int h_bitrate, h_id, h_mode, h_sr_index, h_layer; + int enc_delay, enc_padding; /* get Vbr header data */ pTagData->flags = 0; /* get selected MPEG header data */ h_layer = (buf[1] >> 1) & 3; - if ( h_layer != 0x01 ) { + if (h_layer != 0x01) { /* the following code assumes Layer-3, so give up here */ return 0; } @@ -401,8 +383,7 @@ GetVbrTag(VBRTAGDATA * pTagData, const unsigned char *buf) buf += (32 + 4); else buf += (17 + 4); - } - else { + } else { /* mpeg2 */ if (h_mode != 3) buf += (17 + 4); @@ -493,11 +474,10 @@ GetVbrTag(VBRTAGDATA * pTagData, const unsigned char *buf) **************************************************************************** */ int -InitVbrTag(lame_global_flags * gfp) -{ +InitVbrTag(lame_global_flags *gfp) { lame_internal_flags *gfc = gfp->internal_flags; SessionConfig_t const *const cfg = &gfc->cfg; - int kbps_header; + int kbps_header; #define MAXFRAMESIZE 2880 /* or 0xB40, the max freeformat 640 32kHz framesize */ @@ -519,8 +499,7 @@ InitVbrTag(lame_global_flags * gfp) if (1 == cfg->version) { kbps_header = XING_BITRATE1; - } - else { + } else { if (cfg->samplerate_out < 16000) kbps_header = XING_BITRATE25; else @@ -533,8 +512,8 @@ InitVbrTag(lame_global_flags * gfp) /** make sure LAME Header fits into Frame */ { - int total_frame_size = ((cfg->version + 1) * 72000 * kbps_header) / cfg->samplerate_out; - int header_size = (cfg->sideinfo_len + LAMEHEADERSIZE); + int total_frame_size = ((cfg->version + 1) * 72000 * kbps_header) / cfg->samplerate_out; + int header_size = (cfg->sideinfo_len + LAMEHEADERSIZE); gfc->VBR_seek_table.TotalFrameSize = total_frame_size; if (total_frame_size < header_size || total_frame_size > MAXFRAMESIZE) { /* disable tag, it wont fit */ @@ -555,8 +534,7 @@ InitVbrTag(lame_global_flags * gfp) gfc->VBR_seek_table.bag = lame_calloc(int, 400); if (gfc->VBR_seek_table.bag != NULL) { gfc->VBR_seek_table.size = 400; - } - else { + } else { gfc->VBR_seek_table.size = 0; ERRORF(gfc, "Error: can't allocate VbrFrames buffer\n"); gfc->cfg.write_lame_tag = 0; @@ -567,7 +545,7 @@ InitVbrTag(lame_global_flags * gfp) /* write dummy VBR tag of all 0's into bitstream */ { uint8_t buffer[MAXFRAMESIZE]; - size_t i, n; + size_t i, n; memset(buffer, 0, sizeof(buffer)); setLameTagFrameHeader(gfc, buffer); @@ -581,11 +559,9 @@ InitVbrTag(lame_global_flags * gfp) } - /* fast CRC-16 computation - uses table crc16_lookup 8*/ static uint16_t -CRC_update_lookup(uint16_t value, uint16_t crc) -{ +CRC_update_lookup(uint16_t value, uint16_t crc) { uint16_t tmp; tmp = crc ^ value; crc = (crc >> 8) ^ crc16_lookup[tmp & 0xff]; @@ -593,17 +569,13 @@ CRC_update_lookup(uint16_t value, uint16_t crc) } void -UpdateMusicCRC(uint16_t * crc, unsigned char const *buffer, int size) -{ - int i; +UpdateMusicCRC(uint16_t *crc, unsigned char const *buffer, int size) { + int i; for (i = 0; i < size; ++i) *crc = CRC_update_lookup(buffer[i], *crc); } - - - /**************************************************************************** * Jonathan Dee 2001/08/31 * @@ -616,21 +588,21 @@ UpdateMusicCRC(uint16_t * crc, unsigned char const *buffer, int size) **************************************************************************** */ static int -PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStreamBuffer, uint16_t crc) -{ +PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t *pbtStreamBuffer, + uint16_t crc) { lame_internal_flags const *gfc = gfp->internal_flags; SessionConfig_t const *const cfg = &gfc->cfg; - int nBytesWritten = 0; - int i; + int nBytesWritten = 0; + int i; - int enc_delay = gfc->ov_enc.encoder_delay; /* encoder delay */ - int enc_padding = gfc->ov_enc.encoder_padding; /* encoder padding */ + int enc_delay = gfc->ov_enc.encoder_delay; /* encoder delay */ + int enc_padding = gfc->ov_enc.encoder_padding; /* encoder padding */ /*recall: cfg->vbr_q is for example set by the switch -V */ /* gfp->quality by -q, -h, -f, etc */ - int nQuality = (100 - 10 * gfp->VBR_q - gfp->quality); + int nQuality = (100 - 10 * gfp->VBR_q - gfp->quality); /* @@ -647,10 +619,11 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea uint8_t nVBR; uint8_t nRevision = 0x00; uint8_t nRevMethod; - uint8_t vbr_type_translator[] = { 1, 5, 3, 2, 4, 0, 3 }; /*numbering different in vbr_mode vs. Lame tag */ + uint8_t vbr_type_translator[] = {1, 5, 3, 2, 4, 0, + 3}; /*numbering different in vbr_mode vs. Lame tag */ uint8_t nLowpass = - (((cfg->lowpassfreq / 100.0) + .5) > 255 ? 255 : (cfg->lowpassfreq / 100.0) + .5); + (((cfg->lowpassfreq / 100.0) + .5) > 255 ? 255 : (cfg->lowpassfreq / 100.0) + .5); uint32_t nPeakSignalAmplitude = 0; @@ -659,7 +632,7 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea uint8_t nNoiseShaping = cfg->noise_shaping; uint8_t nStereoMode = 0; - int bNonOptimal = 0; + int bNonOptimal = 0; uint8_t nSourceFreq = 0; uint8_t nMisc = 0; uint16_t nMusicCRC = 0; @@ -671,8 +644,8 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea unsigned char bNoGapMore = 0; unsigned char bNoGapPrevious = 0; - int nNoGapCount = gfp->nogap_total; - int nNoGapCurr = gfp->nogap_current; + int nNoGapCount = gfp->nogap_total; + int nNoGapCurr = gfp->nogap_current; uint8_t nAthType = cfg->ATHtype; /*4 bits. */ @@ -680,17 +653,17 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea uint8_t nFlags = 0; /* if ABR, {store bitrate <=255} else { store "-b"} */ - int nABRBitrate; + int nABRBitrate; switch (cfg->vbr) { - case vbr_abr:{ + case vbr_abr: { nABRBitrate = cfg->vbr_avg_bitrate_kbps; break; } - case vbr_off:{ + case vbr_off: { nABRBitrate = cfg->avg_bitrate; break; } - default:{ /*vbr modes */ + default: { /*vbr modes */ nABRBitrate = bitrate_table[cfg->version][cfg->vbr_min_bitrate_index];; } } @@ -707,7 +680,7 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea /* ReplayGain */ if (cfg->findReplayGain) { - int RadioGain = gfc->ov_rpg.RadioGain; + int RadioGain = gfc->ov_rpg.RadioGain; if (RadioGain > 0x1FE) RadioGain = 0x1FE; if (RadioGain < -0x1FE) @@ -727,7 +700,7 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea /* peak sample */ if (cfg->findPeakSample) nPeakSignalAmplitude = - abs((int) ((((FLOAT) gfc->ov_rpg.PeakSample) / 32767.0) * pow(2, 23) + .5)); + abs((int) ((((FLOAT) gfc->ov_rpg.PeakSample) / 32767.0) * pow(2, 23) + .5)); /*nogap */ if (nNoGapCount != -1) { @@ -741,9 +714,9 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea /*flags */ nFlags = nAthType + (bExpNPsyTune << 4) - + (bSafeJoint << 5) - + (bNoGapMore << 6) - + (bNoGapPrevious << 7); + + (bSafeJoint << 5) + + (bNoGapMore << 6) + + (bNoGapPrevious << 7); if (nQuality < 0) @@ -752,26 +725,26 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea /*stereo mode field... a bit ugly. */ switch (cfg->mode) { - case MONO: - nStereoMode = 0; - break; - case STEREO: - nStereoMode = 1; - break; - case DUAL_CHANNEL: - nStereoMode = 2; - break; - case JOINT_STEREO: - if (cfg->force_ms) - nStereoMode = 4; - else - nStereoMode = 3; - break; - case NOT_SET: - /* FALLTHROUGH */ - default: - nStereoMode = 7; - break; + case MONO: + nStereoMode = 0; + break; + case STEREO: + nStereoMode = 1; + break; + case DUAL_CHANNEL: + nStereoMode = 2; + break; + case JOINT_STEREO: + if (cfg->force_ms) + nStereoMode = 4; + else + nStereoMode = 3; + break; + case NOT_SET: + /* FALLTHROUGH */ + default: + nStereoMode = 7; + break; } /*Intensity stereo : nStereoMode = 6. IS is not implemented */ @@ -788,14 +761,15 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea /*Check if the user overrided the default LAME behaviour with some nasty options */ - if (cfg->short_blocks == short_block_forced || cfg->short_blocks == short_block_dispensed || ((cfg->lowpassfreq == -1) && (cfg->highpassfreq == -1)) || /* "-k" */ + if (cfg->short_blocks == short_block_forced || cfg->short_blocks == short_block_dispensed || + ((cfg->lowpassfreq == -1) && (cfg->highpassfreq == -1)) || /* "-k" */ (cfg->disable_reservoir && cfg->avg_bitrate < 320) || cfg->noATH || cfg->ATHonly || (nAthType == 0) || cfg->samplerate_in <= 32000) bNonOptimal = 1; nMisc = nNoiseShaping + (nStereoMode << 2) - + (bNonOptimal << 5) - + (nSourceFreq << 6); + + (bNonOptimal << 5) + + (nSourceFreq << 6); nMusicCRC = gfc->nMusicCRC; @@ -866,10 +840,9 @@ PutLameVBR(lame_global_flags const *gfp, size_t nMusicLength, uint8_t * pbtStrea } static long -skipId3v2(FILE * fpStream) -{ - size_t nbytes; - long id3v2TagSize; +skipId3v2(FILE *fpStream) { + size_t nbytes; + long id3v2TagSize; unsigned char id3v2Header[10]; /* seek to the beginning of the stream */ @@ -889,9 +862,8 @@ skipId3v2(FILE * fpStream) | ((id3v2Header[7] & 0x7f) << 14) | ((id3v2Header[8] & 0x7f) << 7) | (id3v2Header[9] & 0x7f)) - + sizeof id3v2Header; - } - else { + + sizeof id3v2Header; + } else { /* no ID3 version 2 tag in this stream */ id3v2TagSize = 0; } @@ -899,14 +871,12 @@ skipId3v2(FILE * fpStream) } - size_t -lame_get_lametag_frame(lame_global_flags const *gfp, unsigned char *buffer, size_t size) -{ +lame_get_lametag_frame(lame_global_flags const *gfp, unsigned char *buffer, size_t size) { lame_internal_flags *gfc; SessionConfig_t const *cfg; unsigned long stream_size; - unsigned int nStreamIndex; + unsigned int nStreamIndex; uint8_t btToc[NUMTOCENTRIES]; if (gfp == 0) { @@ -943,11 +913,10 @@ lame_get_lametag_frame(lame_global_flags const *gfp, unsigned char *buffer, size memset(btToc, 0, sizeof(btToc)); if (cfg->free_format) { - int i; + int i; for (i = 1; i < NUMTOCENTRIES; ++i) btToc[i] = 255 * i / 100; - } - else { + } else { Xing_seek_table(&gfc->VBR_seek_table, btToc); } #ifdef DEBUG_VBR_SEEKING_TABLE @@ -971,8 +940,7 @@ lame_get_lametag_frame(lame_global_flags const *gfp, unsigned char *buffer, size buffer[nStreamIndex++] = VBRTag1[2]; buffer[nStreamIndex++] = VBRTag1[3]; - } - else { + } else { buffer[nStreamIndex++] = VBRTag0[0]; buffer[nStreamIndex++] = VBRTag0[1]; buffer[nStreamIndex++] = VBRTag0[2]; @@ -1031,13 +999,12 @@ lame_get_lametag_frame(lame_global_flags const *gfp, unsigned char *buffer, size */ int -PutVbrTag(lame_global_flags const *gfp, FILE * fpStream) -{ +PutVbrTag(lame_global_flags const *gfp, FILE *fpStream) { lame_internal_flags *gfc = gfp->internal_flags; - long lFileSize; - long id3v2TagSize; - size_t nbytes; + long lFileSize; + long id3v2TagSize; + size_t nbytes; uint8_t buffer[MAXFRAMESIZE]; if (gfc->VBR_seek_table.pos <= 0) diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.h new file mode 100644 index 0000000..b894a2e --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/VbrTag.h @@ -0,0 +1,82 @@ +/* + * Xing VBR tagging for LAME. + * + * Copyright (c) 1999 A.L. Faber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_VRBTAG_H +#define LAME_VRBTAG_H + + +/* ----------------------------------------------------------- + * A Vbr header may be present in the ancillary + * data field of the first frame of an mp3 bitstream + * The Vbr header (optionally) contains + * frames total number of audio frames in the bitstream + * bytes total number of bytes in the bitstream + * toc table of contents + + * toc (table of contents) gives seek points + * for random access + * the ith entry determines the seek point for + * i-percent duration + * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes + * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes + */ + + +#define FRAMES_FLAG 0x0001 +#define BYTES_FLAG 0x0002 +#define TOC_FLAG 0x0004 +#define VBR_SCALE_FLAG 0x0008 + +#define NUMTOCENTRIES 100 + +#ifndef lame_internal_flags_defined +#define lame_internal_flags_defined +struct lame_internal_flags; +typedef struct lame_internal_flags lame_internal_flags; +#endif + + +/*structure to receive extracted header */ +/* toc may be NULL*/ +typedef struct { + int h_id; /* from MPEG header, 0=MPEG2, 1=MPEG1 */ + int samprate; /* determined from MPEG header */ + int flags; /* from Vbr header data */ + int frames; /* total bit stream frames from Vbr header data */ + int bytes; /* total bit stream bytes from Vbr header data */ + int vbr_scale; /* encoded vbr scale from Vbr header data */ + unsigned char toc[NUMTOCENTRIES]; /* may be NULL if toc not desired */ + int headersize; /* size of VBR header, in bytes */ + int enc_delay; /* encoder delay */ + int enc_padding; /* encoder paddign added at end of stream */ +} VBRTAGDATA; + +int GetVbrTag(VBRTAGDATA *pTagData, const unsigned char *buf); + +int InitVbrTag(lame_global_flags *gfp); + +int PutVbrTag(lame_global_flags const *gfp, FILE *fid); + +void AddVbrFrame(lame_internal_flags *gfc); + +void UpdateMusicCRC(uint16_t *crc, const unsigned char *buffer, int size); + +#endif diff --git a/library/src/main/cpp/lamemp3/bitstream.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.c similarity index 88% rename from library/src/main/cpp/lamemp3/bitstream.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.c index 06a9302..475b26a 100644 --- a/library/src/main/cpp/lamemp3/bitstream.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.c @@ -38,11 +38,8 @@ #include "util.h" #include "tables.h" #include "quantize_pvt.h" -#include "lame_global_flags.h" -#include "gain_analysis.h" #include "VbrTag.h" #include "bitstream.h" -#include "tables.h" @@ -52,17 +49,14 @@ #define MAX_LENGTH 32 - #ifdef DEBUG static int hogege; #endif - static int -calcFrameLength(SessionConfig_t const *const cfg, int kbps, int pad) -{ - return 8 * ((cfg->version + 1) * 72000 * kbps / cfg->samplerate_out + pad); +calcFrameLength(SessionConfig_t const *const cfg, int kbps, int pad) { + return 8 * ((cfg->version + 1) * 72000 * kbps / cfg->samplerate_out + pad); } @@ -70,11 +64,10 @@ calcFrameLength(SessionConfig_t const *const cfg, int kbps, int pad) * compute bitsperframe and mean_bits for a layer III frame **********************************************************************/ int -getframebits(const lame_internal_flags * gfc) -{ +getframebits(const lame_internal_flags *gfc) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t const *const eov = &gfc->ov_enc; - int bit_rate; + int bit_rate; /* get bitrate in kbps [?] */ if (eov->bitrate_index) @@ -90,41 +83,36 @@ getframebits(const lame_internal_flags * gfc) } int -get_max_frame_buffer_size_by_constraint(SessionConfig_t const * cfg, int constraint) -{ - int maxmp3buf = 0; +get_max_frame_buffer_size_by_constraint(SessionConfig_t const *cfg, int constraint) { + int maxmp3buf = 0; if (cfg->avg_bitrate > 320) { /* in freeformat the buffer is constant */ if (constraint == MDB_STRICT_ISO) { maxmp3buf = calcFrameLength(cfg, cfg->avg_bitrate, 0); - } - else { + } else { /* maximum allowed bits per granule are 7680 */ maxmp3buf = 7680 * (cfg->version + 1); } - } - else { - int max_kbps; + } else { + int max_kbps; if (cfg->samplerate_out < 16000) { max_kbps = bitrate_table[cfg->version][8]; /* default: allow 64 kbps (MPEG-2.5) */ - } - else { + } else { max_kbps = bitrate_table[cfg->version][14]; } - switch (constraint) - { - default: - case MDB_DEFAULT: - /* Bouvigne suggests this more lax interpretation of the ISO doc instead of using 8*960. */ - /* All mp3 decoders should have enough buffer to handle this value: size of a 320kbps 32kHz frame */ - maxmp3buf = 8 * 1440; - break; - case MDB_STRICT_ISO: - maxmp3buf = calcFrameLength(cfg, max_kbps, 0); - break; - case MDB_MAXIMUM: - maxmp3buf = 7680 * (cfg->version + 1); - break; + switch (constraint) { + default: + case MDB_DEFAULT: + /* Bouvigne suggests this more lax interpretation of the ISO doc instead of using 8*960. */ + /* All mp3 decoders should have enough buffer to handle this value: size of a 320kbps 32kHz frame */ + maxmp3buf = 8 * 1440; + break; + case MDB_STRICT_ISO: + maxmp3buf = calcFrameLength(cfg, max_kbps, 0); + break; + case MDB_MAXIMUM: + maxmp3buf = 7680 * (cfg->version + 1); + break; } } return maxmp3buf; @@ -132,8 +120,7 @@ get_max_frame_buffer_size_by_constraint(SessionConfig_t const * cfg, int constra static void -putheader_bits(lame_internal_flags * gfc) -{ +putheader_bits(lame_internal_flags *gfc) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; Bit_stream_struc *bs = &gfc->bs; @@ -151,8 +138,7 @@ putheader_bits(lame_internal_flags * gfc) /*write j bits into the bit stream */ inline static void -putbits2(lame_internal_flags * gfc, int val, int j) -{ +putbits2(lame_internal_flags *gfc, int val, int j) { EncStateVar_t const *const esv = &gfc->sv_enc; Bit_stream_struc *bs; bs = &gfc->bs; @@ -160,7 +146,7 @@ putbits2(lame_internal_flags * gfc, int val, int j) assert(j < MAX_LENGTH - 2); while (j > 0) { - int k; + int k; if (bs->buf_bit_idx == 0) { bs->buf_bit_idx = 8; bs->buf_byte_idx++; @@ -187,15 +173,14 @@ putbits2(lame_internal_flags * gfc, int val, int j) /*write j bits into the bit stream, ignoring frame headers */ inline static void -putbits_noheaders(lame_internal_flags * gfc, int val, int j) -{ +putbits_noheaders(lame_internal_flags *gfc, int val, int j) { Bit_stream_struc *bs; bs = &gfc->bs; assert(j < MAX_LENGTH - 2); while (j > 0) { - int k; + int k; if (bs->buf_bit_idx == 0) { bs->buf_bit_idx = 8; bs->buf_byte_idx++; @@ -225,11 +210,10 @@ putbits_noheaders(lame_internal_flags * gfc, int val, int j) */ inline static void -drain_into_ancillary(lame_internal_flags * gfc, int remainingBits) -{ +drain_into_ancillary(lame_internal_flags *gfc, int remainingBits) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - int i; + int i; assert(remainingBits >= 0); if (remainingBits >= 8) { @@ -269,17 +253,16 @@ drain_into_ancillary(lame_internal_flags * gfc, int remainingBits) /*write N bits into the header */ inline static void -writeheader(lame_internal_flags * gfc, int val, int j) -{ +writeheader(lame_internal_flags *gfc, int val, int j) { EncStateVar_t *const esv = &gfc->sv_enc; - int ptr = esv->header[esv->h_ptr].ptr; + int ptr = esv->header[esv->h_ptr].ptr; while (j > 0) { int const k = Min(j, 8 - (ptr & 7)); j -= k; assert(j < MAX_LENGTH); /* >> 32 too large for 32 bit machines */ esv->header[esv->h_ptr].buf[ptr >> 3] - |= ((val >> j)) << (8 - (ptr & 7) - k); + |= ((val >> j)) << (8 - (ptr & 7) - k); ptr += k; } esv->header[esv->h_ptr].ptr = ptr; @@ -287,9 +270,8 @@ writeheader(lame_internal_flags * gfc, int val, int j) static int -CRC_update(int value, int crc) -{ - int i; +CRC_update(int value, int crc) { + int i; value <<= 8; for (i = 0; i < 8; i++) { value <<= 1; @@ -303,11 +285,10 @@ CRC_update(int value, int crc) void -CRC_writeheader(lame_internal_flags const *gfc, char *header) -{ +CRC_writeheader(lame_internal_flags const *gfc, char *header) { SessionConfig_t const *const cfg = &gfc->cfg; - int crc = 0xffff; /* (jo) init crc16 for error_protection */ - int i; + int crc = 0xffff; /* (jo) init crc16 for error_protection */ + int i; crc = CRC_update(((unsigned char *) header)[2], crc); crc = CRC_update(((unsigned char *) header)[3], crc); @@ -320,13 +301,12 @@ CRC_writeheader(lame_internal_flags const *gfc, char *header) } inline static void -encodeSideInfo2(lame_internal_flags * gfc, int bitsPerFrame) -{ +encodeSideInfo2(lame_internal_flags *gfc, int bitsPerFrame) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t const *const eov = &gfc->ov_enc; EncStateVar_t *const esv = &gfc->sv_enc; III_side_info_t *l3_side; - int gr, ch; + int gr, ch; l3_side = &gfc->l3_side; esv->header[esv->h_ptr].ptr = 0; @@ -362,7 +342,7 @@ encodeSideInfo2(lame_internal_flags * gfc, int bitsPerFrame) writeheader(gfc, l3_side->private_bits, 5); for (ch = 0; ch < cfg->channels_out; ch++) { - int band; + int band; for (band = 0; band < 4; band++) { writeheader(gfc, l3_side->scfsi[ch][band], 1); } @@ -391,8 +371,7 @@ encodeSideInfo2(lame_internal_flags * gfc, int bitsPerFrame) writeheader(gfc, gi->subblock_gain[0], 3); writeheader(gfc, gi->subblock_gain[1], 3); writeheader(gfc, gi->subblock_gain[2], 3); - } - else { + } else { writeheader(gfc, 0, 1); /* window_switching_flag */ if (gi->table_select[0] == 14) gi->table_select[0] = 16; @@ -414,8 +393,7 @@ encodeSideInfo2(lame_internal_flags * gfc, int bitsPerFrame) writeheader(gfc, gi->count1table_select, 1); } } - } - else { + } else { /* MPEG2 */ assert(l3_side->main_data_begin >= 0); writeheader(gfc, (l3_side->main_data_begin), 8); @@ -444,8 +422,7 @@ encodeSideInfo2(lame_internal_flags * gfc, int bitsPerFrame) writeheader(gfc, gi->subblock_gain[0], 3); writeheader(gfc, gi->subblock_gain[1], 3); writeheader(gfc, gi->subblock_gain[2], 3); - } - else { + } else { writeheader(gfc, 0, 1); /* window_switching_flag */ if (gi->table_select[0] == 14) gi->table_select[0] = 16; @@ -490,11 +467,10 @@ encodeSideInfo2(lame_internal_flags * gfc, int bitsPerFrame) inline static int -huffman_coder_count1(lame_internal_flags * gfc, gr_info const *gi) -{ +huffman_coder_count1(lame_internal_flags *gfc, gr_info const *gi) { /* Write count1 area */ struct huffcodetab const *const h = &ht[gi->count1table_select + 32]; - int i, bits = 0; + int i, bits = 0; #ifdef DEBUG int gegebo = gfc->bs.totbit; #endif @@ -504,8 +480,8 @@ huffman_coder_count1(lame_internal_flags * gfc, gr_info const *gi) assert(gi->count1table_select < 2); for (i = (gi->count1 - gi->big_values) / 4; i > 0; --i) { - int huffbits = 0; - int p = 0, v; + int huffbits = 0; + int p = 0, v; v = ix[0]; if (v) { @@ -560,19 +536,18 @@ huffman_coder_count1(lame_internal_flags * gfc, gr_info const *gi) Implements the pseudocode of page 98 of the IS */ inline static int -Huffmancode(lame_internal_flags * const gfc, const unsigned int tableindex, - int start, int end, gr_info const *gi) -{ +Huffmancode(lame_internal_flags *const gfc, const unsigned int tableindex, + int start, int end, gr_info const *gi) { struct huffcodetab const *const h = &ht[tableindex]; unsigned int const linbits = h->xlen; - int i, bits = 0; + int i, bits = 0; assert(tableindex < 32u); if (!tableindex) return bits; for (i = start; i < end; i += 2) { - int16_t cbits = 0; + int16_t cbits = 0; uint16_t xbits = 0; unsigned int xlen = h->xlen; unsigned int ext = 0; @@ -580,7 +555,7 @@ Huffmancode(lame_internal_flags * const gfc, const unsigned int tableindex, unsigned int x2 = gi->l3_enc[i + 1]; assert(gi->l3_enc[i] >= 0); - assert(gi->l3_enc[i+1] >= 0); + assert(gi->l3_enc[i + 1] >= 0); if (x1 != 0u) { if (gi->xr[i] < 0.0f) @@ -626,7 +601,7 @@ Huffmancode(lame_internal_flags * const gfc, const unsigned int tableindex, assert(xbits <= MAX_LENGTH); putbits2(gfc, h->table[x1], cbits); - putbits2(gfc, (int)ext, xbits); + putbits2(gfc, (int) ext, xbits); bits += cbits + xbits; } return bits; @@ -638,10 +613,9 @@ Huffmancode(lame_internal_flags * const gfc, const unsigned int tableindex, information on pages 26 and 27. */ static int -ShortHuffmancodebits(lame_internal_flags * gfc, gr_info const *gi) -{ - int bits; - int region1Start; +ShortHuffmancodebits(lame_internal_flags *gfc, gr_info const *gi) { + int bits; + int region1Start; region1Start = 3 * gfc->scalefac_band.s[3]; if (region1Start > gi->big_values) @@ -654,11 +628,10 @@ ShortHuffmancodebits(lame_internal_flags * gfc, gr_info const *gi) } static int -LongHuffmancodebits(lame_internal_flags * gfc, gr_info const *gi) -{ +LongHuffmancodebits(lame_internal_flags *gfc, gr_info const *gi) { unsigned int i; - int bigvalues, bits; - int region1Start, region2Start; + int bigvalues, bits; + int region1Start, region2Start; bigvalues = gi->big_values; assert(0 <= bigvalues && bigvalues <= 576); @@ -685,11 +658,10 @@ LongHuffmancodebits(lame_internal_flags * gfc, gr_info const *gi) } inline static int -writeMainData(lame_internal_flags * const gfc) -{ +writeMainData(lame_internal_flags *const gfc) { SessionConfig_t const *const cfg = &gfc->cfg; III_side_info_t const *const l3_side = &gfc->l3_side; - int gr, ch, sfb, data_bits, tot_bits = 0; + int gr, ch, sfb, data_bits, tot_bits = 0; if (cfg->version == 1) { /* MPEG 1 */ @@ -718,8 +690,7 @@ writeMainData(lame_internal_flags * const gfc) if (gi->block_type == SHORT_TYPE) { data_bits += ShortHuffmancodebits(gfc, gi); - } - else { + } else { data_bits += LongHuffmancodebits(gfc, gi); } data_bits += huffman_coder_count1(gfc, gi); @@ -731,13 +702,12 @@ writeMainData(lame_internal_flags * const gfc) tot_bits += data_bits; } /* for ch */ } /* for gr */ - } - else { + } else { /* MPEG 2 */ gr = 0; for (ch = 0; ch < cfg->channels_out; ch++) { gr_info const *const gi = &l3_side->tt[gr][ch]; - int i, sfb_partition, scale_bits = 0; + int i, sfb_partition, scale_bits = 0; assert(gi->sfb_partition_table); data_bits = 0; #ifdef DEBUG @@ -758,8 +728,7 @@ writeMainData(lame_internal_flags * const gfc) } } data_bits += ShortHuffmancodebits(gfc, gi); - } - else { + } else { for (; sfb_partition < 4; sfb_partition++) { int const sfbs = gi->sfb_partition_table[sfb_partition]; int const slen = gi->slen[sfb_partition]; @@ -801,13 +770,12 @@ writeMainData(lame_internal_flags * const gfc) */ int -compute_flushbits(const lame_internal_flags * gfc, int *total_bytes_output) -{ +compute_flushbits(const lame_internal_flags *gfc, int *total_bytes_output) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t const *const esv = &gfc->sv_enc; - int flushbits, remaining_headers; - int bitsPerFrame; - int last_ptr, first_ptr; + int flushbits, remaining_headers; + int bitsPerFrame; + int last_ptr, first_ptr; first_ptr = esv->w_ptr; /* first header to add to bitstream */ last_ptr = esv->h_ptr - 1; /* last header to add to bitstream */ if (last_ptr == -1) @@ -862,13 +830,12 @@ compute_flushbits(const lame_internal_flags * gfc, int *total_bytes_output) void -flush_bitstream(lame_internal_flags * gfc) -{ +flush_bitstream(lame_internal_flags *gfc) { EncStateVar_t *const esv = &gfc->sv_enc; III_side_info_t *l3_side; - int nbytes; - int flushbits; - int last_ptr = esv->h_ptr - 1; /* last header to add to bitstream */ + int nbytes; + int flushbits; + int last_ptr = esv->h_ptr - 1; /* last header to add to bitstream */ if (last_ptr == -1) last_ptr = MAX_HEADER_BUF - 1; l3_side = &gfc->l3_side; @@ -889,13 +856,10 @@ flush_bitstream(lame_internal_flags * gfc) } - - void -add_dummy_byte(lame_internal_flags * gfc, unsigned char val, unsigned int n) -{ +add_dummy_byte(lame_internal_flags *gfc, unsigned char val, unsigned int n) { EncStateVar_t *const esv = &gfc->sv_enc; - int i; + int i; while (n-- > 0u) { putbits_noheaders(gfc, val, 8); @@ -917,13 +881,12 @@ add_dummy_byte(lame_internal_flags * gfc, unsigned char val, unsigned int n) in the IS). */ int -format_bitstream(lame_internal_flags * gfc) -{ +format_bitstream(lame_internal_flags *gfc) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - int bits, nbytes; + int bits, nbytes; III_side_info_t *l3_side; - int bitsPerFrame; + int bitsPerFrame; l3_side = &gfc->l3_side; bitsPerFrame = getframebits(gfc); @@ -948,14 +911,14 @@ format_bitstream(lame_internal_flags * gfc) * think the resvsize is: */ if ((l3_side->main_data_begin * 8) != esv->ResvSize) { ERRORF(gfc, "bit reservoir error: \n" - "l3_side->main_data_begin: %i \n" - "Resvoir size: %i \n" - "resv drain (post) %i \n" - "resv drain (pre) %i \n" - "header and sideinfo: %i \n" - "data bits: %i \n" - "total bits: %i (remainder: %i) \n" - "bitsperframe: %i \n", + "l3_side->main_data_begin: %i \n" + "Resvoir size: %i \n" + "resv drain (post) %i \n" + "resv drain (pre) %i \n" + "header and sideinfo: %i \n" + "data bits: %i \n" + "total bits: %i (remainder: %i) \n" + "bitsperframe: %i \n", 8 * l3_side->main_data_begin, esv->ResvSize, l3_side->resvDrain_post, @@ -975,7 +938,7 @@ format_bitstream(lame_internal_flags * gfc) if (gfc->bs.totbit > 1000000000) { /* to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset bit counter */ - int i; + int i; for (i = 0; i < MAX_HEADER_BUF; ++i) esv->header[i].write_timing -= gfc->bs.totbit; gfc->bs.totbit = 0; @@ -987,8 +950,7 @@ format_bitstream(lame_internal_flags * gfc) static int -do_gain_analysis(lame_internal_flags * gfc, unsigned char* buffer, int minimum) -{ +do_gain_analysis(lame_internal_flags *gfc, unsigned char *buffer, int minimum) { SessionConfig_t const *const cfg = &gfc->cfg; RpgStateVar_t const *const rsv = &gfc->sv_rpg; RpgResult_t *const rov = &gfc->ov_rpg; @@ -1055,8 +1017,7 @@ do_gain_analysis(lame_internal_flags * gfc, unsigned char* buffer, int minimum) } static int -do_copy_buffer(lame_internal_flags * gfc, unsigned char *buffer, int size) -{ +do_copy_buffer(lame_internal_flags *gfc, unsigned char *buffer, int size) { Bit_stream_struc *const bs = &gfc->bs; int const minimum = bs->buf_byte_idx + 1; if (minimum <= 0) @@ -1078,8 +1039,7 @@ do_copy_buffer(lame_internal_flags * gfc, unsigned char *buffer, int size) */ int -copy_buffer(lame_internal_flags * gfc, unsigned char *buffer, int size, int mp3data) -{ +copy_buffer(lame_internal_flags *gfc, unsigned char *buffer, int size, int mp3data) { int const minimum = do_copy_buffer(gfc, buffer, size); if (minimum > 0 && mp3data) { UpdateMusicCRC(&gfc->nMusicCRC, buffer, minimum); @@ -1096,8 +1056,7 @@ copy_buffer(lame_internal_flags * gfc, unsigned char *buffer, int size, int mp3d void -init_bit_stream_w(lame_internal_flags * gfc) -{ +init_bit_stream_w(lame_internal_flags *gfc) { EncStateVar_t *const esv = &gfc->sv_enc; esv->h_ptr = esv->w_ptr = 0; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.h new file mode 100644 index 0000000..9191e38 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/bitstream.h @@ -0,0 +1,44 @@ +/* + * MP3 bitstream Output interface for LAME + * + * Copyright (c) 1999 Takehiro TOMINAGA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_BITSTREAM_H +#define LAME_BITSTREAM_H + +int getframebits(const lame_internal_flags *gfc); + +int format_bitstream(lame_internal_flags *gfc); + +void flush_bitstream(lame_internal_flags *gfc); + +void add_dummy_byte(lame_internal_flags *gfc, unsigned char val, unsigned int n); + +int copy_buffer(lame_internal_flags *gfc, unsigned char *buffer, int buffer_size, + int update_crc); + +void init_bit_stream_w(lame_internal_flags *gfc); + +void CRC_writeheader(lame_internal_flags const *gfc, char *buffer); + +int compute_flushbits(const lame_internal_flags *gfp, int *nbytes); + +int get_max_frame_buffer_size_by_constraint(SessionConfig_t const *cfg, int constraint); + +#endif diff --git a/library/src/main/cpp/lamemp3/encoder.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.c similarity index 87% rename from library/src/main/cpp/lamemp3/encoder.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.c index c0bad21..ba710a4 100644 --- a/library/src/main/cpp/lamemp3/encoder.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.c @@ -36,7 +36,6 @@ #include "machine.h" #include "encoder.h" #include "util.h" -#include "lame_global_flags.h" #include "newmdct.h" #include "psymodel.h" #include "lame-analysis.h" @@ -46,7 +45,6 @@ #include "quantize_pvt.h" - /* * auto-adjust of ATH, useful for low volume * Gabriel Bouvigne 3 feb 2001 @@ -56,10 +54,9 @@ * (gfc->ATH) */ static void -adjust_ATH(lame_internal_flags const *const gfc) -{ +adjust_ATH(lame_internal_flags const *const gfc) { SessionConfig_t const *const cfg = &gfc->cfg; - FLOAT gr2_max, max_pow; + FLOAT gr2_max, max_pow; if (gfc->ATH->use_adjust == 0) { gfc->ATH->adjust_factor = 1.0; /* no adjustment */ @@ -74,8 +71,7 @@ adjust_ATH(lame_internal_flags const *const gfc) if (cfg->channels_out == 2) { max_pow += gfc->ov_psy.loudness_sq[0][1]; gr2_max += gfc->ov_psy.loudness_sq[1][1]; - } - else { + } else { max_pow += max_pow; gr2_max += gr2_max; } @@ -103,8 +99,7 @@ adjust_ATH(lame_internal_flags const *const gfc) if (max_pow > 0.03125) { /* ((1 - 0.000625)/ 31.98) from curve below */ if (gfc->ATH->adjust_factor >= 1.0) { gfc->ATH->adjust_factor = 1.0; - } - else { + } else { /* preceding frame has lower ATH adjust; */ /* ascend only to the preceding adjust_limit */ /* in case there is leading low volume */ @@ -113,8 +108,7 @@ adjust_ATH(lame_internal_flags const *const gfc) } } gfc->ATH->adjust_limit = 1.0; - } - else { /* adjustment curve */ + } else { /* adjustment curve */ /* about 32 dB maximum adjust (0.000625) */ FLOAT const adj_lim_new = 31.98 * max_pow + 0.000625; if (gfc->ATH->adjust_factor >= adj_lim_new) { /* descend gradually */ @@ -122,12 +116,10 @@ adjust_ATH(lame_internal_flags const *const gfc) if (gfc->ATH->adjust_factor < adj_lim_new) { /* stop descent */ gfc->ATH->adjust_factor = adj_lim_new; } - } - else { /* ascend */ + } else { /* ascend */ if (gfc->ATH->adjust_limit >= adj_lim_new) { gfc->ATH->adjust_factor = adj_lim_new; - } - else { /* preceding frame has lower ATH adjust; */ + } else { /* preceding frame has lower ATH adjust; */ /* ascend only to the preceding adjust_limit */ if (gfc->ATH->adjust_factor < gfc->ATH->adjust_limit) { gfc->ATH->adjust_factor = gfc->ATH->adjust_limit; @@ -155,11 +147,10 @@ adjust_ATH(lame_internal_flags const *const gfc) ***********************************************************************/ static void -updateStats(lame_internal_flags * const gfc) -{ +updateStats(lame_internal_flags *const gfc) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *eov = &gfc->ov_enc; - int gr, ch; + int gr, ch; assert(0 <= eov->bitrate_index && eov->bitrate_index < 16); assert(0 <= eov->mode_ext && eov->mode_ext < 4); @@ -174,7 +165,7 @@ updateStats(lame_internal_flags * const gfc) } for (gr = 0; gr < cfg->mode_gr; ++gr) { for (ch = 0; ch < cfg->channels_out; ++ch) { - int bt = gfc->l3_side.tt[gr][ch].block_type; + int bt = gfc->l3_side.tt[gr][ch].block_type; if (gfc->l3_side.tt[gr][ch].mixed_block_flag) bt = 4; eov->bitrate_blocktype_hist[eov->bitrate_index][bt]++; @@ -186,21 +177,18 @@ updateStats(lame_internal_flags * const gfc) } - - static void -lame_encode_frame_init(lame_internal_flags * gfc, const sample_t *const inbuf[2]) -{ +lame_encode_frame_init(lame_internal_flags *gfc, const sample_t *const inbuf[2]) { SessionConfig_t const *const cfg = &gfc->cfg; - int ch, gr; + int ch, gr; if (gfc->lame_encode_frame_init == 0) { sample_t primebuff0[286 + 1152 + 576]; sample_t primebuff1[286 + 1152 + 576]; int const framesize = 576 * cfg->mode_gr; /* prime the MDCT/polyphase filterbank with a short block */ - int i, j; + int i, j; gfc->lame_encode_frame_init = 1; memset(primebuff0, 0, sizeof(primebuff0)); memset(primebuff1, 0, sizeof(primebuff1)); @@ -209,8 +197,7 @@ lame_encode_frame_init(lame_internal_flags * gfc, const sample_t *const inbuf[2] primebuff0[i] = 0; if (cfg->channels_out == 2) primebuff1[i] = 0; - } - else { + } else { primebuff0[i] = inbuf[0][j]; if (cfg->channels_out == 2) primebuff1[i] = inbuf[1][j]; @@ -238,11 +225,6 @@ lame_encode_frame_init(lame_internal_flags * gfc, const sample_t *const inbuf[2] } - - - - - /************************************************************************ * * encodeframe() Layer 3 @@ -306,27 +288,28 @@ typedef FLOAT chgrdata[2][2]; int lame_encode_mp3_frame( /* Output */ - lame_internal_flags * gfc, /* Context */ - sample_t const *inbuf_l, /* Input */ - sample_t const *inbuf_r, /* Input */ - unsigned char *mp3buf, /* Output */ - int mp3buf_size) -{ /* Output */ + lame_internal_flags *gfc, /* Context */ + sample_t const *inbuf_l, /* Input */ + sample_t const *inbuf_r, /* Input */ + unsigned char *mp3buf, /* Output */ + int mp3buf_size) { /* Output */ SessionConfig_t const *const cfg = &gfc->cfg; - int mp3count; + int mp3count; III_psy_ratio masking_LR[2][2]; /*LR masking & energy */ III_psy_ratio masking_MS[2][2]; /*MS masking & energy */ const III_psy_ratio (*masking)[2]; /*pointer to selected maskings */ const sample_t *inbuf[2]; - FLOAT tot_ener[2][4]; - FLOAT ms_ener_ratio[2] = { .5, .5 }; - FLOAT pe[2][2] = { {0., 0.}, {0., 0.} }, pe_MS[2][2] = { { - 0., 0.}, { - 0., 0.}}; + FLOAT tot_ener[2][4]; + FLOAT ms_ener_ratio[2] = {.5, .5}; + FLOAT pe[2][2] = {{0., 0.}, + {0., 0.}}, pe_MS[2][2] = {{ + 0., 0.}, + { + 0., 0.}}; FLOAT (*pe_use)[2]; - int ch, gr; + int ch, gr; inbuf[0] = inbuf_l; inbuf[1] = inbuf_r; @@ -364,9 +347,9 @@ lame_encode_mp3_frame( /* Output */ * psy model has a 1 granule (576) delay that we must compensate for * (mt 6/99). */ - int ret; + int ret; const sample_t *bufp[2] = {0, 0}; /* address of beginning of left & right granule */ - int blocktype[2]; + int blocktype[2]; for (gr = 0; gr < cfg->mode_gr; gr++) { @@ -416,8 +399,7 @@ lame_encode_mp3_frame( /* Output */ if (cfg->force_ms) { gfc->ov_enc.mode_ext = MPG_MD_MS_LR; - } - else if (cfg->mode == JOINT_STEREO) { + } else if (cfg->mode == JOINT_STEREO) { /* ms_ratio = is scaled, for historical reasons, to look like a ratio of side_channel / total. 0 = signal is 100% mono @@ -430,8 +412,8 @@ lame_encode_mp3_frame( /* Output */ * _next is the value of the first granule of the next frame */ - FLOAT sum_pe_MS = 0; - FLOAT sum_pe_LR = 0; + FLOAT sum_pe_MS = 0; + FLOAT sum_pe_LR = 0; for (gr = 0; gr < cfg->mode_gr; gr++) { for (ch = 0; ch < cfg->channels_out; ch++) { sum_pe_MS += pe_MS[gr][ch]; @@ -454,11 +436,10 @@ lame_encode_mp3_frame( /* Output */ /* bit and noise allocation */ if (gfc->ov_enc.mode_ext == MPG_MD_MS_LR) { - masking = (const III_psy_ratio (*)[2])masking_MS; /* use MS masking */ + masking = (const III_psy_ratio (*)[2]) masking_MS; /* use MS masking */ pe_use = pe_MS; - } - else { - masking = (const III_psy_ratio (*)[2])masking_LR; /* use LR masking */ + } else { + masking = (const III_psy_ratio (*)[2]) masking_LR; /* use LR masking */ pe_use = pe; } @@ -490,13 +471,13 @@ lame_encode_mp3_frame( /* Output */ if (cfg->vbr == vbr_off || cfg->vbr == vbr_abr) { static FLOAT const fircoef[9] = { - -0.0207887 * 5, -0.0378413 * 5, -0.0432472 * 5, -0.031183 * 5, - 7.79609e-18 * 5, 0.0467745 * 5, 0.10091 * 5, 0.151365 * 5, - 0.187098 * 5 + -0.0207887 * 5, -0.0378413 * 5, -0.0432472 * 5, -0.031183 * 5, + 7.79609e-18 * 5, 0.0467745 * 5, 0.10091 * 5, 0.151365 * 5, + 0.187098 * 5 }; - int i; - FLOAT f; + int i; + FLOAT f; for (i = 0; i < 18; i++) gfc->sv_enc.pefirbuf[i] = gfc->sv_enc.pefirbuf[i + 1]; @@ -518,22 +499,21 @@ lame_encode_mp3_frame( /* Output */ } } } - switch (cfg->vbr) - { - default: - case vbr_off: - CBR_iteration_loop(gfc, (const FLOAT (*)[2])pe_use, ms_ener_ratio, masking); - break; - case vbr_abr: - ABR_iteration_loop(gfc, (const FLOAT (*)[2])pe_use, ms_ener_ratio, masking); - break; - case vbr_rh: - VBR_old_iteration_loop(gfc, (const FLOAT (*)[2])pe_use, ms_ener_ratio, masking); - break; - case vbr_mt: - case vbr_mtrh: - VBR_new_iteration_loop(gfc, (const FLOAT (*)[2])pe_use, ms_ener_ratio, masking); - break; + switch (cfg->vbr) { + default: + case vbr_off: + CBR_iteration_loop(gfc, (const FLOAT (*)[2]) pe_use, ms_ener_ratio, masking); + break; + case vbr_abr: + ABR_iteration_loop(gfc, (const FLOAT (*)[2]) pe_use, ms_ener_ratio, masking); + break; + case vbr_rh: + VBR_old_iteration_loop(gfc, (const FLOAT (*)[2]) pe_use, ms_ener_ratio, masking); + break; + case vbr_mt: + case vbr_mtrh: + VBR_new_iteration_loop(gfc, (const FLOAT (*)[2]) pe_use, ms_ener_ratio, masking); + break; } @@ -554,9 +534,9 @@ lame_encode_mp3_frame( /* Output */ } if (cfg->analysis && gfc->pinfo != NULL) { - int framesize = 576 * cfg->mode_gr; + int framesize = 576 * cfg->mode_gr; for (ch = 0; ch < cfg->channels_out; ch++) { - int j; + int j; for (j = 0; j < FFTOFFSET; j++) gfc->pinfo->pcmdata[ch][j] = gfc->pinfo->pcmdata[ch][j + framesize]; for (j = FFTOFFSET; j < 1600; j++) { diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.h new file mode 100644 index 0000000..00a60ed --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/encoder.h @@ -0,0 +1,153 @@ +/* + * encoder.h include file + * + * Copyright (c) 2000 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef LAME_ENCODER_H +#define LAME_ENCODER_H + +/*********************************************************************** +* +* encoder and decoder delays +* +***********************************************************************/ + +/* + * layer III enc->dec delay: 1056 (1057?) (observed) + * layer II enc->dec delay: 480 (481?) (observed) + * + * polyphase 256-16 (dec or enc) = 240 + * mdct 256+32 (9*32) (dec or enc) = 288 + * total: 512+16 + * + * My guess is that delay of polyphase filterbank is actualy 240.5 + * (there are technical reasons for this, see postings in mp3encoder). + * So total Encode+Decode delay = ENCDELAY + 528 + 1 + */ + +/* + * ENCDELAY The encoder delay. + * + * Minimum allowed is MDCTDELAY (see below) + * + * The first 96 samples will be attenuated, so using a value less than 96 + * will result in corrupt data for the first 96-ENCDELAY samples. + * + * suggested: 576 + * set to 1160 to sync with FhG. + */ + +#define ENCDELAY 576 + + + +/* + * make sure there is at least one complete frame after the + * last frame containing real data + * + * Using a value of 288 would be sufficient for a + * a very sophisticated decoder that can decode granule-by-granule instead + * of frame by frame. But lets not assume this, and assume the decoder + * will not decode frame N unless it also has data for frame N+1 + * + */ +/*#define POSTDELAY 288*/ +#define POSTDELAY 1152 + + + +/* + * delay of the MDCT used in mdct.c + * original ISO routines had a delay of 528! + * Takehiro's routines: + */ + +#define MDCTDELAY 48 +#define FFTOFFSET (224+MDCTDELAY) + +/* + * Most decoders, including the one we use, have a delay of 528 samples. + */ + +#define DECDELAY 528 + + +/* number of subbands */ +#define SBLIMIT 32 + +/* parition bands bands */ +#define CBANDS 64 + +/* number of critical bands/scale factor bands where masking is computed*/ +#define SBPSY_l 21 +#define SBPSY_s 12 + +/* total number of scalefactor bands encoded */ +#define SBMAX_l 22 +#define SBMAX_s 13 +#define PSFB21 6 +#define PSFB12 6 + + + +/* FFT sizes */ +#define BLKSIZE 1024 +#define HBLKSIZE (BLKSIZE/2 + 1) +#define BLKSIZE_s 256 +#define HBLKSIZE_s (BLKSIZE_s/2 + 1) + + +/* #define switch_pe 1800 */ +#define NORM_TYPE 0 +#define START_TYPE 1 +#define SHORT_TYPE 2 +#define STOP_TYPE 3 + +/* + * Mode Extention: + * When we are in stereo mode, there are 4 possible methods to store these + * two channels. The stereo modes -m? are using a subset of them. + * + * -ms: MPG_MD_LR_LR + * -mj: MPG_MD_LR_LR and MPG_MD_MS_LR + * -mf: MPG_MD_MS_LR + * -mi: all + */ +#if 0 +#define MPG_MD_LR_LR 0 +#define MPG_MD_LR_I 1 +#define MPG_MD_MS_LR 2 +#define MPG_MD_MS_I 3 +#endif +enum MPEGChannelMode { + MPG_MD_LR_LR = 0, MPG_MD_LR_I = 1, MPG_MD_MS_LR = 2, MPG_MD_MS_I = 3 +}; + +#ifndef lame_internal_flags_defined +#define lame_internal_flags_defined +struct lame_internal_flags; +typedef struct lame_internal_flags lame_internal_flags; +#endif + +int lame_encode_mp3_frame(lame_internal_flags *gfc, + sample_t const *inbuf_l, + sample_t const *inbuf_r, unsigned char *mp3buf, int mp3buf_size); + +#endif /* LAME_ENCODER_H */ diff --git a/library/src/main/cpp/lamemp3/fft.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.c similarity index 83% rename from library/src/main/cpp/lamemp3/fft.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.c index 4eea1ad..5fcb147 100644 --- a/library/src/main/cpp/lamemp3/fft.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.c @@ -38,41 +38,36 @@ # include #endif -#include "lame.h" #include "machine.h" #include "encoder.h" #include "util.h" #include "fft.h" -#include "vector/lame_intrin.h" - - #define TRI_SIZE (5-1) /* 1024 = 4**5 */ /* fft.c */ static const FLOAT costab[TRI_SIZE * 2] = { - 9.238795325112867e-01, 3.826834323650898e-01, - 9.951847266721969e-01, 9.801714032956060e-02, - 9.996988186962042e-01, 2.454122852291229e-02, - 9.999811752826011e-01, 6.135884649154475e-03 + 9.238795325112867e-01, 3.826834323650898e-01, + 9.951847266721969e-01, 9.801714032956060e-02, + 9.996988186962042e-01, 2.454122852291229e-02, + 9.999811752826011e-01, 6.135884649154475e-03 }; static void -fht(FLOAT * fz, int n) -{ +fht(FLOAT *fz, int n) { const FLOAT *tri = costab; - int k4; - FLOAT *fi, *gi; + int k4; + FLOAT *fi, *gi; FLOAT const *fn; n <<= 1; /* to get BLKSIZE, because of 3DNow! ASM routine */ fn = fz + n; k4 = 4; do { - FLOAT s1, c1; - int i, k1, k2, k3, kx; + FLOAT s1, c1; + int i, k1, k2, k3, kx; kx = k4 >> 1; k1 = k4; k2 = k4 << 1; @@ -81,7 +76,7 @@ fht(FLOAT * fz, int n) fi = fz; gi = fi + kx; do { - FLOAT f0, f1, f2, f3; + FLOAT f0, f1, f2, f3; f1 = fi[0] - fi[k1]; f0 = fi[0] + fi[k1]; f3 = fi[k2] - fi[k3]; @@ -104,13 +99,13 @@ fht(FLOAT * fz, int n) c1 = tri[0]; s1 = tri[1]; for (i = 1; i < kx; i++) { - FLOAT c2, s2; + FLOAT c2, s2; c2 = 1 - (2 * s1) * s1; s2 = (2 * s1) * c1; fi = fz + i; gi = fz + k1 - i; do { - FLOAT a, b, g0, f0, f1, g1, f2, g2, f3, g3; + FLOAT a, b, g0, f0, f1, g1, f2, g2, f3, g3; b = s2 * fi[k1] - c2 * gi[k1]; a = c2 * fi[k1] + s2 * gi[k1]; f1 = fi[0] - a; @@ -148,22 +143,22 @@ fht(FLOAT * fz, int n) static const unsigned char rv_tbl[] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, - 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, - 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, - 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, - 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, + 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, + 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, + 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, + 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, + 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, + 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, + 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, + 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe }; #define ch01(index) (buffer[chn][index]) @@ -190,21 +185,20 @@ static const unsigned char rv_tbl[] = { void fft_short(lame_internal_flags const *const gfc, - FLOAT x_real[3][BLKSIZE_s], int chn, const sample_t *const buffer[2]) -{ - int i; - int j; - int b; + FLOAT x_real[3][BLKSIZE_s], int chn, const sample_t *const buffer[2]) { + int i; + int j; + int b; #define window_s gfc->cd_psy->window_s #define window gfc->cd_psy->window for (b = 0; b < 3; b++) { - FLOAT *x = &x_real[b][BLKSIZE_s / 2]; + FLOAT *x = &x_real[b][BLKSIZE_s / 2]; short const k = (576 / 3) * (b + 1); j = BLKSIZE_s / 8 - 1; do { - FLOAT f0, f1, f2, f3, w; + FLOAT f0, f1, f2, f3, w; i = rv_tbl[j << 2]; @@ -248,17 +242,16 @@ fft_short(lame_internal_flags const *const gfc, void fft_long(lame_internal_flags const *const gfc, - FLOAT x[BLKSIZE], int chn, const sample_t *const buffer[2]) -{ - int i; - int jj = BLKSIZE / 8 - 1; + FLOAT x[BLKSIZE], int chn, const sample_t *const buffer[2]) { + int i; + int jj = BLKSIZE / 8 - 1; x += BLKSIZE / 2; #define window_s gfc->cd_psy->window_s #define window gfc->cd_psy->window do { - FLOAT f0, f1, f2, f3, w; + FLOAT f0, f1, f2, f3, w; i = rv_tbl[jj]; f0 = ml00(ch01); @@ -304,16 +297,15 @@ extern void fht_SSE(FLOAT * fz, int n); #endif void -init_fft(lame_internal_flags * const gfc) -{ - int i; +init_fft(lame_internal_flags *const gfc) { + int i; /* The type of window used here will make no real difference, but */ /* in the interest of merging nspsytune stuff - switch to blackman window */ for (i = 0; i < BLKSIZE; i++) /* blackman window */ gfc->cd_psy->window[i] = 0.42 - 0.5 * cos(2 * PI * (i + .5) / BLKSIZE) + - 0.08 * cos(4 * PI * (i + .5) / BLKSIZE); + 0.08 * cos(4 * PI * (i + .5) / BLKSIZE); for (i = 0; i < BLKSIZE_s / 2; i++) gfc->cd_psy->window_s[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE_s)); diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.h new file mode 100644 index 0000000..db8543c --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/fft.h @@ -0,0 +1,35 @@ +/* + * Fast Fourier Transform include file + * + * Copyright (c) 2000 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_FFT_H +#define LAME_FFT_H + +void fft_long(lame_internal_flags const *const gfc, FLOAT x_real[BLKSIZE], + int chn, const sample_t *const data[2]); + +void fft_short(lame_internal_flags const *const gfc, FLOAT x_real[3][BLKSIZE_s], + int chn, const sample_t *const data[2]); + +void init_fft(lame_internal_flags *const gfc); + +#endif + +/* End of fft.h */ diff --git a/library/src/main/cpp/lamemp3/gain_analysis.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.c similarity index 56% rename from library/src/main/cpp/lamemp3/gain_analysis.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.c index 614bac0..71495f2 100644 --- a/library/src/main/cpp/lamemp3/gain_analysis.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.c @@ -111,29 +111,29 @@ /*lint -save -e736 loss of precision */ static const Float_t ABYule[9][multiple_of(4, 2 * YULE_ORDER + 1)] = { - /* 20 18 16 14 12 10 8 6 4 2 0 19 17 15 13 11 9 7 5 3 1 */ - { 0.00288463683916, 0.00012025322027, 0.00306428023191, 0.00594298065125, -0.02074045215285, 0.02161526843274, -0.01655260341619, -0.00009291677959, -0.00123395316851, -0.02160367184185, 0.03857599435200, 0.13919314567432, -0.86984376593551, 2.75465861874613, -5.87257861775999, 9.48293806319790,-12.28759895145294, 13.05504219327545,-11.34170355132042, 7.81501653005538, -3.84664617118067}, - {-0.00187763777362, 0.00674613682247, -0.00240879051584, 0.01624864962975, -0.02596338512915, 0.02245293253339, -0.00834990904936, -0.00851165645469, -0.00848709379851, -0.02911007808948, 0.05418656406430, 0.13149317958808, -0.75104302451432, 2.19611684890774, -4.39470996079559, 6.85401540936998, -8.81498681370155, 9.47693607801280, -8.54751527471874, 6.36317777566148, -3.47845948550071}, - {-0.00881362733839, 0.00651420667831, -0.01390589421898, 0.03174092540049, 0.00222312597743, 0.04781476674921, -0.05588393329856, 0.02163541888798, -0.06247880153653, -0.09331049056315, 0.15457299681924, 0.02347897407020, -0.05032077717131, 0.16378164858596, -0.45953458054983, 1.00595954808547, -1.67148153367602, 2.23697657451713, -2.64577170229825, 2.84868151156327, -2.37898834973084}, - {-0.02950134983287, 0.00205861885564, -0.00000828086748, 0.06276101321749, -0.00584456039913, -0.02364141202522, -0.00915702933434, 0.03282930172664, -0.08587323730772, -0.22613988682123, 0.30296907319327, 0.00302439095741, 0.02005851806501, 0.04500235387352, -0.22138138954925, 0.39120800788284, -0.22638893773906, -0.16276719120440, -0.25656257754070, 1.07977492259970, -1.61273165137247}, - {-0.01760176568150, -0.01635381384540, 0.00832043980773, 0.05724228140351, -0.00589500224440, -0.00469977914380, -0.07834489609479, 0.11921148675203, -0.11828570177555, -0.25572241425570, 0.33642304856132, 0.02977207319925, -0.04237348025746, 0.08333755284107, -0.04067510197014, -0.12453458140019, 0.47854794562326, -0.80774944671438, 0.12205022308084, 0.87350271418188, -1.49858979367799}, - { 0.00541907748707, -0.03193428438915, -0.01863887810927, 0.10478503600251, 0.04097565135648, -0.12398163381748, 0.04078262797139, -0.01419140100551, -0.22784394429749, -0.14351757464547, 0.44915256608450, 0.03222754072173, 0.05784820375801, 0.06747620744683, 0.00613424350682, 0.22199650564824, -0.42029820170918, 0.00213767857124, -0.37256372942400, 0.29661783706366, -0.62820619233671}, - {-0.00588215443421, -0.03788984554840, 0.08647503780351, 0.00647310677246, -0.27562961986224, 0.30931782841830, -0.18901604199609, 0.16744243493672, 0.16242137742230, -0.75464456939302, 0.56619470757641, 0.01807364323573, 0.01639907836189, -0.04784254229033, 0.06739368333110, -0.33032403314006, 0.45054734505008, 0.00819999645858, -0.26806001042947, 0.29156311971249, -1.04800335126349}, - {-0.00749618797172, -0.03721611395801, 0.06920467763959, 0.01628462406333, -0.25344790059353, 0.15558449135573, 0.02377945217615, 0.17520704835522, -0.14289799034253, -0.53174909058578, 0.58100494960553, 0.01818801111503, 0.02442357316099, -0.02505961724053, -0.05246019024463, -0.23313271880868, 0.38952639978999, 0.14728154134330, -0.20256413484477, -0.31863563325245, -0.51035327095184}, - {-0.02217936801134, 0.04788665548180, -0.04060034127000, -0.11202315195388, -0.02459864859345, 0.14590772289388, -0.10214864179676, 0.04267842219415, -0.00275953611929, -0.42163034350696, 0.53648789255105, 0.04704409688120, 0.05477720428674, -0.18823009262115, -0.17556493366449, 0.15113130533216, 0.26408300200955, -0.04678328784242, -0.03424681017675, -0.43193942311114, -0.25049871956020} + /* 20 18 16 14 12 10 8 6 4 2 0 19 17 15 13 11 9 7 5 3 1 */ + {0.00288463683916, 0.00012025322027, 0.00306428023191, 0.00594298065125, -0.02074045215285, 0.02161526843274, -0.01655260341619, -0.00009291677959, -0.00123395316851, -0.02160367184185, 0.03857599435200, 0.13919314567432, -0.86984376593551, 2.75465861874613, -5.87257861775999, 9.48293806319790, -12.28759895145294, 13.05504219327545, -11.34170355132042, 7.81501653005538, -3.84664617118067}, + {-0.00187763777362, 0.00674613682247, -0.00240879051584, 0.01624864962975, -0.02596338512915, 0.02245293253339, -0.00834990904936, -0.00851165645469, -0.00848709379851, -0.02911007808948, 0.05418656406430, 0.13149317958808, -0.75104302451432, 2.19611684890774, -4.39470996079559, 6.85401540936998, -8.81498681370155, 9.47693607801280, -8.54751527471874, 6.36317777566148, -3.47845948550071}, + {-0.00881362733839, 0.00651420667831, -0.01390589421898, 0.03174092540049, 0.00222312597743, 0.04781476674921, -0.05588393329856, 0.02163541888798, -0.06247880153653, -0.09331049056315, 0.15457299681924, 0.02347897407020, -0.05032077717131, 0.16378164858596, -0.45953458054983, 1.00595954808547, -1.67148153367602, 2.23697657451713, -2.64577170229825, 2.84868151156327, -2.37898834973084}, + {-0.02950134983287, 0.00205861885564, -0.00000828086748, 0.06276101321749, -0.00584456039913, -0.02364141202522, -0.00915702933434, 0.03282930172664, -0.08587323730772, -0.22613988682123, 0.30296907319327, 0.00302439095741, 0.02005851806501, 0.04500235387352, -0.22138138954925, 0.39120800788284, -0.22638893773906, -0.16276719120440, -0.25656257754070, 1.07977492259970, -1.61273165137247}, + {-0.01760176568150, -0.01635381384540, 0.00832043980773, 0.05724228140351, -0.00589500224440, -0.00469977914380, -0.07834489609479, 0.11921148675203, -0.11828570177555, -0.25572241425570, 0.33642304856132, 0.02977207319925, -0.04237348025746, 0.08333755284107, -0.04067510197014, -0.12453458140019, 0.47854794562326, -0.80774944671438, 0.12205022308084, 0.87350271418188, -1.49858979367799}, + {0.00541907748707, -0.03193428438915, -0.01863887810927, 0.10478503600251, 0.04097565135648, -0.12398163381748, 0.04078262797139, -0.01419140100551, -0.22784394429749, -0.14351757464547, 0.44915256608450, 0.03222754072173, 0.05784820375801, 0.06747620744683, 0.00613424350682, 0.22199650564824, -0.42029820170918, 0.00213767857124, -0.37256372942400, 0.29661783706366, -0.62820619233671}, + {-0.00588215443421, -0.03788984554840, 0.08647503780351, 0.00647310677246, -0.27562961986224, 0.30931782841830, -0.18901604199609, 0.16744243493672, 0.16242137742230, -0.75464456939302, 0.56619470757641, 0.01807364323573, 0.01639907836189, -0.04784254229033, 0.06739368333110, -0.33032403314006, 0.45054734505008, 0.00819999645858, -0.26806001042947, 0.29156311971249, -1.04800335126349}, + {-0.00749618797172, -0.03721611395801, 0.06920467763959, 0.01628462406333, -0.25344790059353, 0.15558449135573, 0.02377945217615, 0.17520704835522, -0.14289799034253, -0.53174909058578, 0.58100494960553, 0.01818801111503, 0.02442357316099, -0.02505961724053, -0.05246019024463, -0.23313271880868, 0.38952639978999, 0.14728154134330, -0.20256413484477, -0.31863563325245, -0.51035327095184}, + {-0.02217936801134, 0.04788665548180, -0.04060034127000, -0.11202315195388, -0.02459864859345, 0.14590772289388, -0.10214864179676, 0.04267842219415, -0.00275953611929, -0.42163034350696, 0.53648789255105, 0.04704409688120, 0.05477720428674, -0.18823009262115, -0.17556493366449, 0.15113130533216, 0.26408300200955, -0.04678328784242, -0.03424681017675, -0.43193942311114, -0.25049871956020} }; static const Float_t ABButter[9][multiple_of(4, 2 * BUTTER_ORDER + 1)] = { - /* 5 4 3 2 1 */ - {0.98621192462708, 0.97261396931306, -1.97242384925416, -1.97223372919527, 0.98621192462708}, - {0.98500175787242, 0.97022847566350, -1.97000351574484, -1.96977855582618, 0.98500175787242}, - {0.97938932735214, 0.95920349965459, -1.95877865470428, -1.95835380975398, 0.97938932735214}, - {0.97531843204928, 0.95124613669835, -1.95063686409857, -1.95002759149878, 0.97531843204928}, - {0.97316523498161, 0.94705070426118, -1.94633046996323, -1.94561023566527, 0.97316523498161}, - {0.96454515552826, 0.93034775234268, -1.92909031105652, -1.92783286977036, 0.96454515552826}, - {0.96009142950541, 0.92177618768381, -1.92018285901082, -1.91858953033784, 0.96009142950541}, - {0.95856916599601, 0.91885558323625, -1.91713833199203, -1.91542108074780, 0.95856916599601}, - {0.94597685600279, 0.89487434461664, -1.89195371200558, -1.88903307939452, 0.94597685600279} + /* 5 4 3 2 1 */ + {0.98621192462708, 0.97261396931306, -1.97242384925416, -1.97223372919527, 0.98621192462708}, + {0.98500175787242, 0.97022847566350, -1.97000351574484, -1.96977855582618, 0.98500175787242}, + {0.97938932735214, 0.95920349965459, -1.95877865470428, -1.95835380975398, 0.97938932735214}, + {0.97531843204928, 0.95124613669835, -1.95063686409857, -1.95002759149878, 0.97531843204928}, + {0.97316523498161, 0.94705070426118, -1.94633046996323, -1.94561023566527, 0.97316523498161}, + {0.96454515552826, 0.93034775234268, -1.92909031105652, -1.92783286977036, 0.96454515552826}, + {0.96009142950541, 0.92177618768381, -1.92018285901082, -1.91858953033784, 0.96009142950541}, + {0.95856916599601, 0.91885558323625, -1.91713833199203, -1.91542108074780, 0.95856916599601}, + {0.94597685600279, 0.89487434461664, -1.89195371200558, -1.88903307939452, 0.94597685600279} }; /*lint -restore */ @@ -145,33 +145,32 @@ static const Float_t ABButter[9][multiple_of(4, 2 * BUTTER_ORDER + 1)] = { /* When calling this procedure, make sure that ip[-order] and op[-order] point to real data! */ static void -filterYule(const Float_t * input, Float_t * output, size_t nSamples, const Float_t * const kernel) -{ +filterYule(const Float_t *input, Float_t *output, size_t nSamples, const Float_t *const kernel) { while (nSamples--) { - Float_t y0 = input[-10] * kernel[ 0]; - Float_t y2 = input[ -9] * kernel[ 1]; - Float_t y4 = input[ -8] * kernel[ 2]; - Float_t y6 = input[ -7] * kernel[ 3]; + Float_t y0 = input[-10] * kernel[0]; + Float_t y2 = input[-9] * kernel[1]; + Float_t y4 = input[-8] * kernel[2]; + Float_t y6 = input[-7] * kernel[3]; Float_t s00 = y0 + y2 + y4 + y6; - Float_t y8 = input[ -6] * kernel[ 4]; - Float_t yA = input[ -5] * kernel[ 5]; - Float_t yC = input[ -4] * kernel[ 6]; - Float_t yE = input[ -3] * kernel[ 7]; + Float_t y8 = input[-6] * kernel[4]; + Float_t yA = input[-5] * kernel[5]; + Float_t yC = input[-4] * kernel[6]; + Float_t yE = input[-3] * kernel[7]; Float_t s01 = y8 + yA + yC + yE; - Float_t yG = input[ -2] * kernel[ 8] + input[ -1] * kernel[ 9]; - Float_t yK = input[ 0] * kernel[10]; + Float_t yG = input[-2] * kernel[8] + input[-1] * kernel[9]; + Float_t yK = input[0] * kernel[10]; Float_t s1 = s00 + s01 + yG + yK; - Float_t x1 = output[-10] * kernel[11] + output[ -9] * kernel[12]; - Float_t x5 = output[ -8] * kernel[13] + output[ -7] * kernel[14]; - Float_t x9 = output[ -6] * kernel[15] + output[ -5] * kernel[16]; - Float_t xD = output[ -4] * kernel[17] + output[ -3] * kernel[18]; - Float_t xH = output[ -2] * kernel[19] + output[ -1] * kernel[20]; + Float_t x1 = output[-10] * kernel[11] + output[-9] * kernel[12]; + Float_t x5 = output[-8] * kernel[13] + output[-7] * kernel[14]; + Float_t x9 = output[-6] * kernel[15] + output[-5] * kernel[16]; + Float_t xD = output[-4] * kernel[17] + output[-3] * kernel[18]; + Float_t xH = output[-2] * kernel[19] + output[-1] * kernel[20]; Float_t s2 = x1 + x5 + x9 + xD + xH; - output[0] = (Float_t)(s1 - s2); + output[0] = (Float_t) (s1 - s2); ++output; ++input; @@ -179,69 +178,66 @@ filterYule(const Float_t * input, Float_t * output, size_t nSamples, const Float } static void -filterButter(const Float_t * input, Float_t * output, size_t nSamples, const Float_t * const kernel) -{ +filterButter(const Float_t *input, Float_t *output, size_t nSamples, const Float_t *const kernel) { while (nSamples--) { - Float_t s1 = input[-2] * kernel[0] + input[-1] * kernel[2] + input[ 0] * kernel[4]; + Float_t s1 = input[-2] * kernel[0] + input[-1] * kernel[2] + input[0] * kernel[4]; Float_t s2 = output[-2] * kernel[1] + output[-1] * kernel[3]; - output[0] = (Float_t)(s1 - s2); + output[0] = (Float_t) (s1 - s2); ++output; ++input; } } - -static int ResetSampleFrequency(replaygain_t * rgData, long samplefreq); +static int ResetSampleFrequency(replaygain_t *rgData, long samplefreq); /* returns a INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if not */ int -ResetSampleFrequency(replaygain_t * rgData, long samplefreq) -{ +ResetSampleFrequency(replaygain_t *rgData, long samplefreq) { /* zero out initial values, only first MAX_ORDER values */ memset(rgData->linprebuf, 0, MAX_ORDER * sizeof(*rgData->linprebuf)); memset(rgData->rinprebuf, 0, MAX_ORDER * sizeof(*rgData->rinprebuf)); - memset(rgData->lstepbuf, 0, MAX_ORDER * sizeof(*rgData->lstepbuf)); - memset(rgData->rstepbuf, 0, MAX_ORDER * sizeof(*rgData->rstepbuf)); - memset(rgData->loutbuf, 0, MAX_ORDER * sizeof(*rgData->loutbuf)); - memset(rgData->routbuf, 0, MAX_ORDER * sizeof(*rgData->routbuf)); + memset(rgData->lstepbuf, 0, MAX_ORDER * sizeof(*rgData->lstepbuf)); + memset(rgData->rstepbuf, 0, MAX_ORDER * sizeof(*rgData->rstepbuf)); + memset(rgData->loutbuf, 0, MAX_ORDER * sizeof(*rgData->loutbuf)); + memset(rgData->routbuf, 0, MAX_ORDER * sizeof(*rgData->routbuf)); switch ((int) (samplefreq)) { - case 48000: - rgData->freqindex = 0; - break; - case 44100: - rgData->freqindex = 1; - break; - case 32000: - rgData->freqindex = 2; - break; - case 24000: - rgData->freqindex = 3; - break; - case 22050: - rgData->freqindex = 4; - break; - case 16000: - rgData->freqindex = 5; - break; - case 12000: - rgData->freqindex = 6; - break; - case 11025: - rgData->freqindex = 7; - break; - case 8000: - rgData->freqindex = 8; - break; - default: - return INIT_GAIN_ANALYSIS_ERROR; + case 48000: + rgData->freqindex = 0; + break; + case 44100: + rgData->freqindex = 1; + break; + case 32000: + rgData->freqindex = 2; + break; + case 24000: + rgData->freqindex = 3; + break; + case 22050: + rgData->freqindex = 4; + break; + case 16000: + rgData->freqindex = 5; + break; + case 12000: + rgData->freqindex = 6; + break; + case 11025: + rgData->freqindex = 7; + break; + case 8000: + rgData->freqindex = 8; + break; + default: + return INIT_GAIN_ANALYSIS_ERROR; } rgData->sampleWindow = - (samplefreq * RMS_WINDOW_TIME_NUMERATOR + RMS_WINDOW_TIME_DENOMINATOR - - 1) / RMS_WINDOW_TIME_DENOMINATOR; + (samplefreq * RMS_WINDOW_TIME_NUMERATOR + RMS_WINDOW_TIME_DENOMINATOR - + 1) / RMS_WINDOW_TIME_DENOMINATOR; rgData->lsum = 0.; rgData->rsum = 0.; @@ -253,8 +249,7 @@ ResetSampleFrequency(replaygain_t * rgData, long samplefreq) } int -InitGainAnalysis(replaygain_t * rgData, long samplefreq) -{ +InitGainAnalysis(replaygain_t *rgData, long samplefreq) { if (ResetSampleFrequency(rgData, samplefreq) != INIT_GAIN_ANALYSIS_OK) { return INIT_GAIN_ANALYSIS_ERROR; } @@ -274,15 +269,14 @@ InitGainAnalysis(replaygain_t * rgData, long samplefreq) /* returns GAIN_ANALYSIS_OK if successful, GAIN_ANALYSIS_ERROR if not */ int -AnalyzeSamples(replaygain_t * rgData, const Float_t * left_samples, const Float_t * right_samples, - size_t num_samples, int num_channels) -{ +AnalyzeSamples(replaygain_t *rgData, const Float_t *left_samples, const Float_t *right_samples, + size_t num_samples, int num_channels) { const Float_t *curleft; const Float_t *curright; - long batchsamples; - long cursamples; - long cursamplepos; - int i; + long batchsamples; + long cursamples; + long cursamplepos; + int i; Float_t sum_l, sum_r; if (num_samples == 0) @@ -292,34 +286,32 @@ AnalyzeSamples(replaygain_t * rgData, const Float_t * left_samples, const Float_ batchsamples = (long) num_samples; switch (num_channels) { - case 1: - right_samples = left_samples; - break; - case 2: - break; - default: - return GAIN_ANALYSIS_ERROR; + case 1: + right_samples = left_samples; + break; + case 2: + break; + default: + return GAIN_ANALYSIS_ERROR; } if (num_samples < MAX_ORDER) { memcpy(rgData->linprebuf + MAX_ORDER, left_samples, num_samples * sizeof(Float_t)); memcpy(rgData->rinprebuf + MAX_ORDER, right_samples, num_samples * sizeof(Float_t)); - } - else { + } else { memcpy(rgData->linprebuf + MAX_ORDER, left_samples, MAX_ORDER * sizeof(Float_t)); memcpy(rgData->rinprebuf + MAX_ORDER, right_samples, MAX_ORDER * sizeof(Float_t)); } while (batchsamples > 0) { cursamples = batchsamples > rgData->sampleWindow - rgData->totsamp ? - rgData->sampleWindow - rgData->totsamp : batchsamples; + rgData->sampleWindow - rgData->totsamp : batchsamples; if (cursamplepos < MAX_ORDER) { curleft = rgData->linpre + cursamplepos; curright = rgData->rinpre + cursamplepos; if (cursamples > MAX_ORDER - cursamplepos) cursamples = MAX_ORDER - cursamplepos; - } - else { + } else { curleft = left_samples + cursamplepos; curright = right_samples + cursamplepos; } @@ -369,11 +361,13 @@ AnalyzeSamples(replaygain_t * rgData, const Float_t * left_samples, const Float_ batchsamples -= cursamples; cursamplepos += cursamples; rgData->totsamp += cursamples; - if (rgData->totsamp == rgData->sampleWindow) { /* Get the Root Mean Square (RMS) for this set of samples */ + if (rgData->totsamp == + rgData->sampleWindow) { /* Get the Root Mean Square (RMS) for this set of samples */ double const val = - STEPS_per_dB * 10. * log10((rgData->lsum + rgData->rsum) / rgData->totsamp * 0.5 + - 1.e-37); - size_t ival = (val <= 0) ? 0 : (size_t) val; + STEPS_per_dB * 10. * + log10((rgData->lsum + rgData->rsum) / rgData->totsamp * 0.5 + + 1.e-37); + size_t ival = (val <= 0) ? 0 : (size_t) val; if (ival >= sizeof(rgData->A) / sizeof(*(rgData->A))) ival = sizeof(rgData->A) / sizeof(*(rgData->A)) - 1; rgData->A[ival]++; @@ -388,7 +382,8 @@ AnalyzeSamples(replaygain_t * rgData, const Float_t * left_samples, const Float_ MAX_ORDER * sizeof(Float_t)); rgData->totsamp = 0; } - if (rgData->totsamp > rgData->sampleWindow) /* somehow I really screwed up: Error in programming! Contact author about totsamp > sampleWindow */ + if (rgData->totsamp > + rgData->sampleWindow) /* somehow I really screwed up: Error in programming! Contact author about totsamp > sampleWindow */ return GAIN_ANALYSIS_ERROR; } if (num_samples < MAX_ORDER) { @@ -400,8 +395,7 @@ AnalyzeSamples(replaygain_t * rgData, const Float_t * left_samples, const Float_ num_samples * sizeof(Float_t)); memcpy(rgData->rinprebuf + MAX_ORDER - num_samples, right_samples, num_samples * sizeof(Float_t)); - } - else { + } else { memcpy(rgData->linprebuf, left_samples + num_samples - MAX_ORDER, MAX_ORDER * sizeof(Float_t)); memcpy(rgData->rinprebuf, right_samples + num_samples - MAX_ORDER, @@ -412,13 +406,12 @@ AnalyzeSamples(replaygain_t * rgData, const Float_t * left_samples, const Float_ } -static Float_t -analyzeResult(uint32_t const *Array, size_t len) -{ +static Float_t +analyzeResult(uint32_t const *Array, size_t len) { uint32_t elems; uint32_t upper; uint32_t sum; - size_t i; + size_t i; elems = 0; for (i = 0; i < len; i++) @@ -440,8 +433,7 @@ analyzeResult(uint32_t const *Array, size_t len) Float_t -GetTitleGain(replaygain_t * rgData) -{ +GetTitleGain(replaygain_t *rgData) { Float_t retval; unsigned int i; @@ -454,10 +446,10 @@ GetTitleGain(replaygain_t * rgData) for (i = 0; i < MAX_ORDER; i++) rgData->linprebuf[i] = rgData->lstepbuf[i] - = rgData->loutbuf[i] - = rgData->rinprebuf[i] - = rgData->rstepbuf[i] - = rgData->routbuf[i] = 0.f; + = rgData->loutbuf[i] + = rgData->rinprebuf[i] + = rgData->rstepbuf[i] + = rgData->routbuf[i] = 0.f; rgData->totsamp = 0; rgData->lsum = rgData->rsum = 0.; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.h new file mode 100644 index 0000000..a9c09f2 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/gain_analysis.h @@ -0,0 +1,113 @@ +/* + * ReplayGainAnalysis - analyzes input samples and give the recommended dB change + * Copyright (C) 2001 David Robinson and Glen Sawyer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * concept and filter values by David Robinson (David@Robinson.org) + * -- blame him if you think the idea is flawed + * coding by Glen Sawyer (mp3gain@hotmail.com) 735 W 255 N, Orem, UT 84057-4505 USA + * -- blame him if you think this runs too slowly, or the coding is otherwise flawed + * + * For an explanation of the concepts and the basic algorithms involved, go to: + * http://www.replaygain.org/ + */ + +#ifndef GAIN_ANALYSIS_H +#define GAIN_ANALYSIS_H + +#ifdef HAVE_INTTYPES_H +# include +#else +# ifdef HAVE_STDINT_H +# include +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef sample_t Float_t; /* Type used for filtering */ + + +#define PINK_REF 64.82 /* 298640883795 */ /* calibration value for 89dB */ + + +#define YULE_ORDER 10 +#define BUTTER_ORDER 2 +#define YULE_FILTER filterYule +#define BUTTER_FILTER filterButter +#define RMS_PERCENTILE 0.95 /* percentile which is louder than the proposed level */ +#define MAX_SAMP_FREQ 48000L /* maximum allowed sample frequency [Hz] */ +#define RMS_WINDOW_TIME_NUMERATOR 1L +#define RMS_WINDOW_TIME_DENOMINATOR 20L /* numerator / denominator = time slice size [s] */ +#define STEPS_per_dB 100 /* Table entries per dB */ +#define MAX_dB 120 /* Table entries for 0...MAX_dB (normal max. values are 70...80 dB) */ + +enum { + GAIN_NOT_ENOUGH_SAMPLES = -24601, GAIN_ANALYSIS_ERROR = 0, GAIN_ANALYSIS_OK = + 1, INIT_GAIN_ANALYSIS_ERROR = 0, INIT_GAIN_ANALYSIS_OK = 1 +}; + +enum { + MAX_ORDER = (BUTTER_ORDER > YULE_ORDER ? BUTTER_ORDER : YULE_ORDER), + MAX_SAMPLES_PER_WINDOW = ( + (MAX_SAMP_FREQ * RMS_WINDOW_TIME_NUMERATOR) / RMS_WINDOW_TIME_DENOMINATOR + + 1) /* max. Samples per Time slice */ +}; + +struct replaygain_data { + Float_t linprebuf[MAX_ORDER * 2]; + Float_t *linpre; /* left input samples, with pre-buffer */ + Float_t lstepbuf[MAX_SAMPLES_PER_WINDOW + MAX_ORDER]; + Float_t *lstep; /* left "first step" (i.e. post first filter) samples */ + Float_t loutbuf[MAX_SAMPLES_PER_WINDOW + MAX_ORDER]; + Float_t *lout; /* left "out" (i.e. post second filter) samples */ + Float_t rinprebuf[MAX_ORDER * 2]; + Float_t *rinpre; /* right input samples ... */ + Float_t rstepbuf[MAX_SAMPLES_PER_WINDOW + MAX_ORDER]; + Float_t *rstep; + Float_t routbuf[MAX_SAMPLES_PER_WINDOW + MAX_ORDER]; + Float_t *rout; + long sampleWindow; /* number of samples required to reach number of milliseconds required for RMS window */ + long totsamp; + double lsum; + double rsum; + int freqindex; + int first; + uint32_t A[STEPS_per_dB * MAX_dB]; + uint32_t B[STEPS_per_dB * MAX_dB]; + +}; +#ifndef replaygain_data_defined +#define replaygain_data_defined +typedef struct replaygain_data replaygain_t; +#endif + + +int InitGainAnalysis(replaygain_t *rgData, long samplefreq); + +int AnalyzeSamples(replaygain_t *rgData, const Float_t *left_samples, + const Float_t *right_samples, size_t num_samples, int num_channels); + +Float_t GetTitleGain(replaygain_t *rgData); + + +#ifdef __cplusplus +} +#endif +#endif /* GAIN_ANALYSIS_H */ diff --git a/library/src/main/cpp/lamemp3/id3tag.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.c similarity index 75% rename from library/src/main/cpp/lamemp3/id3tag.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.c index c68c3bf..2d466f6 100644 --- a/library/src/main/cpp/lamemp3/id3tag.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.c @@ -41,11 +41,12 @@ # include # include #else + //# ifndef HAVE_STRCHR //# define strchr index //# define strrchr rindex //# endif -char *strchr(), *strrchr(); +char *strchr(), *strrchr(); //# ifndef HAVE_MEMCPY //# define memcpy(d, s, n) bcopy ((s), (d), (n)) //# endif @@ -66,51 +67,51 @@ char *strchr(), *strrchr(); static const char *const genre_names[] = { - /* - * NOTE: The spelling of these genre names is identical to those found in - * Winamp and mp3info. - */ - "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", - "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", - "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", - "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", - "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", - "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "Alternative Rock", - "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", - "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", - "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", - "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", - "Native US", "Cabaret", "New Wave", "Psychedelic", "Rave", - "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", - "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", - "Folk-Rock", "National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", - "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", - "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", - "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", - "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", - "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", - "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", - "Punk Rock", "Drum Solo", "A Cappella", "Euro-House", "Dance Hall", - "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie", - "BritPop", "Negerpunk", "Polsk Punk", "Beat", "Christian Gangsta", - "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian", - "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop", - "SynthPop" + /* + * NOTE: The spelling of these genre names is identical to those found in + * Winamp and mp3info. + */ + "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", + "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", + "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", + "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", + "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", + "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "Alternative Rock", + "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", + "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", + "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", + "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", + "Native US", "Cabaret", "New Wave", "Psychedelic", "Rave", + "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", + "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", + "Folk-Rock", "National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", + "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", + "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", + "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", + "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", + "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", + "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", + "Punk Rock", "Drum Solo", "A Cappella", "Euro-House", "Dance Hall", + "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie", + "BritPop", "Negerpunk", "Polsk Punk", "Beat", "Christian Gangsta", + "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian", + "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop", + "SynthPop" }; #define GENRE_NAME_COUNT \ ((int)(sizeof genre_names / sizeof (const char *const))) static const int genre_alpha_map[] = { - 123, 34, 74, 73, 99, 20, 40, 26, 145, 90, 116, 41, 135, 85, 96, 138, 89, 0, - 107, 132, 65, 88, 104, 102, 97, 136, 61, 141, 32, 1, 112, 128, 57, 140, 2, - 139, 58, 3, 125, 50, 22, 4, 55, 127, 122, 120, 98, 52, 48, 54, 124, 25, 84, - 80, 115, 81, 119, 5, 30, 36, 59, 126, 38, 49, 91, 6, 129, 79, 137, 7, 35, - 100, 131, 19, 33, 46, 47, 8, 29, 146, 63, 86, 71, 45, 142, 9, 77, 82, 64, - 133, 10, 66, 39, 11, 103, 12, 75, 134, 13, 53, 62, 109, 117, 23, 108, 92, - 67, 93, 43, 121, 15, 68, 14, 16, 76, 87, 118, 17, 78, 143, 114, 110, 69, 21, - 111, 95, 105, 42, 37, 24, 56, 44, 101, 83, 94, 106, 147, 113, 18, 51, 130, - 144, 60, 70, 31, 72, 27, 28 + 123, 34, 74, 73, 99, 20, 40, 26, 145, 90, 116, 41, 135, 85, 96, 138, 89, 0, + 107, 132, 65, 88, 104, 102, 97, 136, 61, 141, 32, 1, 112, 128, 57, 140, 2, + 139, 58, 3, 125, 50, 22, 4, 55, 127, 122, 120, 98, 52, 48, 54, 124, 25, 84, + 80, 115, 81, 119, 5, 30, 36, 59, 126, 38, 49, 91, 6, 129, 79, 137, 7, 35, + 100, 131, 19, 33, 46, 47, 8, 29, 146, 63, 86, 71, 45, 142, 9, 77, 82, 64, + 133, 10, 66, 39, 11, 103, 12, 75, 134, 13, 53, 62, 109, 117, 23, 108, 92, + 67, 93, 43, 121, 15, 68, 14, 16, 76, 87, 118, 17, 78, 143, 114, 110, 69, 21, + 111, 95, 105, 42, 37, 24, 56, 44, 101, 83, 94, 106, 147, 113, 18, 51, 130, + 144, 60, 70, 31, 72, 27, 28 }; #define GENRE_ALPHA_COUNT ((int)(sizeof genre_alpha_map / sizeof (int))) @@ -124,44 +125,50 @@ static const int genre_alpha_map[] = { | ((unsigned long)(c) << 8) \ | ((unsigned long)(d) << 0) ) -typedef enum UsualStringIDs { ID_TITLE = FRAME_ID('T', 'I', 'T', '2') - , ID_ARTIST = FRAME_ID('T', 'P', 'E', '1') - , ID_ALBUM = FRAME_ID('T', 'A', 'L', 'B') - , ID_GENRE = FRAME_ID('T', 'C', 'O', 'N') - , ID_ENCODER = FRAME_ID('T', 'S', 'S', 'E') - , ID_PLAYLENGTH = FRAME_ID('T', 'L', 'E', 'N') - , ID_COMMENT = FRAME_ID('C', 'O', 'M', 'M') /* full text string */ +typedef enum UsualStringIDs { + ID_TITLE = FRAME_ID('T', 'I', 'T', '2'), + ID_ARTIST = FRAME_ID('T', 'P', 'E', '1'), + ID_ALBUM = FRAME_ID('T', 'A', 'L', 'B'), + ID_GENRE = FRAME_ID('T', 'C', 'O', 'N'), + ID_ENCODER = FRAME_ID('T', 'S', 'S', 'E'), + ID_PLAYLENGTH = FRAME_ID('T', 'L', 'E', 'N'), + ID_COMMENT = FRAME_ID('C', 'O', 'M', 'M') /* full text string */ } UsualStringIDs; -typedef enum NumericStringIDs { ID_DATE = FRAME_ID('T', 'D', 'A', 'T') /* "ddMM" */ - , ID_TIME = FRAME_ID('T', 'I', 'M', 'E') /* "hhmm" */ - , ID_TPOS = FRAME_ID('T', 'P', 'O', 'S') /* '0'-'9' and '/' allowed */ - , ID_TRACK = FRAME_ID('T', 'R', 'C', 'K') /* '0'-'9' and '/' allowed */ - , ID_YEAR = FRAME_ID('T', 'Y', 'E', 'R') /* "yyyy" */ +typedef enum NumericStringIDs { + ID_DATE = FRAME_ID('T', 'D', 'A', 'T') /* "ddMM" */ + , ID_TIME = FRAME_ID('T', 'I', 'M', 'E') /* "hhmm" */ + , ID_TPOS = FRAME_ID('T', 'P', 'O', 'S') /* '0'-'9' and '/' allowed */ + , ID_TRACK = FRAME_ID('T', 'R', 'C', 'K') /* '0'-'9' and '/' allowed */ + , ID_YEAR = FRAME_ID('T', 'Y', 'E', 'R') /* "yyyy" */ } NumericStringIDs; -typedef enum MiscIDs { ID_TXXX = FRAME_ID('T', 'X', 'X', 'X') - , ID_WXXX = FRAME_ID('W', 'X', 'X', 'X') - , ID_SYLT = FRAME_ID('S', 'Y', 'L', 'T') - , ID_APIC = FRAME_ID('A', 'P', 'I', 'C') - , ID_GEOB = FRAME_ID('G', 'E', 'O', 'B') - , ID_PCNT = FRAME_ID('P', 'C', 'N', 'T') - , ID_AENC = FRAME_ID('A', 'E', 'N', 'C') - , ID_LINK = FRAME_ID('L', 'I', 'N', 'K') - , ID_ENCR = FRAME_ID('E', 'N', 'C', 'R') - , ID_GRID = FRAME_ID('G', 'R', 'I', 'D') - , ID_PRIV = FRAME_ID('P', 'R', 'I', 'V') - , ID_USLT = FRAME_ID('U', 'S', 'L', 'T') /* full text string */ - , ID_USER = FRAME_ID('U', 'S', 'E', 'R') /* full text string */ - , ID_PCST = FRAME_ID('P', 'C', 'S', 'T') /* iTunes Podcast indicator, only presence important */ - , ID_WFED = FRAME_ID('W', 'F', 'E', 'D') /* iTunes Podcast URL as TEXT FRAME !!! violates standard */ +typedef enum MiscIDs { + ID_TXXX = FRAME_ID('T', 'X', 'X', 'X'), + ID_WXXX = FRAME_ID('W', 'X', 'X', 'X'), + ID_SYLT = FRAME_ID('S', 'Y', 'L', 'T'), + ID_APIC = FRAME_ID('A', 'P', 'I', 'C'), + ID_GEOB = FRAME_ID('G', 'E', 'O', 'B'), + ID_PCNT = FRAME_ID('P', 'C', 'N', 'T'), + ID_AENC = FRAME_ID('A', 'E', 'N', 'C'), + ID_LINK = FRAME_ID('L', 'I', 'N', 'K'), + ID_ENCR = FRAME_ID('E', 'N', 'C', 'R'), + ID_GRID = FRAME_ID('G', 'R', 'I', 'D'), + ID_PRIV = FRAME_ID('P', 'R', 'I', 'V'), + ID_USLT = FRAME_ID('U', 'S', 'L', 'T') /* full text string */ + , + ID_USER = FRAME_ID('U', 'S', 'E', 'R') /* full text string */ + , + ID_PCST = FRAME_ID('P', 'C', 'S', 'T') /* iTunes Podcast indicator, only presence important */ + , + ID_WFED = FRAME_ID('W', 'F', 'E', + 'D') /* iTunes Podcast URL as TEXT FRAME !!! violates standard */ } MiscIDs; static int -frame_id_matches(int id, int mask) -{ - int result = 0, i, window = 0xff; +frame_id_matches(int id, int mask) { + int result = 0, i, window = 0xff; for (i = 0; i < 4; ++i, window <<= 8) { int const mw = (mask & window); int const iw = (id & window); @@ -173,14 +180,12 @@ frame_id_matches(int id, int mask) } static int -isFrameIdMatching(int id, int mask) -{ +isFrameIdMatching(int id, int mask) { return frame_id_matches(id, mask) == 0 ? 1 : 0; } static int -test_tag_spec_flags(lame_internal_flags const *gfc, unsigned int tst) -{ +test_tag_spec_flags(lame_internal_flags const *gfc, unsigned int tst) { return (gfc->tag_spec.flags & tst) != 0u ? 1 : 0; } @@ -199,20 +204,20 @@ debug_tag_spec_flags(lame_internal_flags * gfc, const char* info) #endif static int -is_lame_internal_flags_null(lame_t gfp) -{ +is_lame_internal_flags_null(lame_t gfp) { return (gfp && gfp->internal_flags) ? 0 : 1; } static int -id3v2_add_ucs2_lng(lame_t gfp, uint32_t frame_id, unsigned short const *desc, unsigned short const *text); +id3v2_add_ucs2_lng(lame_t gfp, uint32_t frame_id, unsigned short const *desc, + unsigned short const *text); + static int id3v2_add_latin1_lng(lame_t gfp, uint32_t frame_id, char const *desc, char const *text); static void -copyV1ToV2(lame_t gfp, int frame_id, char const *s) -{ +copyV1ToV2(lame_t gfp, int frame_id, char const *s) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc != 0) { unsigned int flags = gfc->tag_spec.flags; @@ -226,9 +231,8 @@ copyV1ToV2(lame_t gfp, int frame_id, char const *s) static void -id3v2AddLameVersion(lame_t gfp) -{ - char buffer[1024]; +id3v2AddLameVersion(lame_t gfp) { + char buffer[1024]; const char *b = get_lame_os_bitness(); const char *v = get_lame_version(); const char *u = get_lame_url(); @@ -236,18 +240,16 @@ id3v2AddLameVersion(lame_t gfp) if (lenb > 0) { sprintf(buffer, "LAME %s version %s (%s)", b, v, u); - } - else { + } else { sprintf(buffer, "LAME version %s (%s)", v, u); } copyV1ToV2(gfp, ID_ENCODER, buffer); } static void -id3v2AddAudioDuration(lame_t gfp, double ms) -{ +id3v2AddAudioDuration(lame_t gfp, double ms) { SessionConfig_t const *const cfg = &gfp->internal_flags->cfg; /* caller checked pointers */ - char buffer[1024]; + char buffer[1024]; double const max_ulong = MAX_U_32_NUM; unsigned long playlength_ms; @@ -255,11 +257,9 @@ id3v2AddAudioDuration(lame_t gfp, double ms) ms /= cfg->samplerate_in; if (ms > max_ulong) { playlength_ms = max_ulong; - } - else if (ms < 0) { + } else if (ms < 0) { playlength_ms = 0; - } - else { + } else { playlength_ms = ms; } sprintf(buffer, "%lu", playlength_ms); @@ -267,13 +267,12 @@ id3v2AddAudioDuration(lame_t gfp, double ms) } void -id3tag_genre_list(void (*handler) (int, const char *, void *), void *cookie) -{ +id3tag_genre_list(void (*handler)(int, const char *, void *), void *cookie) { if (handler) { - int i; + int i; for (i = 0; i < GENRE_NAME_COUNT; ++i) { if (i < GENRE_ALPHA_COUNT) { - int j = genre_alpha_map[i]; + int j = genre_alpha_map[i]; handler(j, genre_names[j], cookie); } } @@ -283,10 +282,8 @@ id3tag_genre_list(void (*handler) (int, const char *, void *), void *cookie) #define GENRE_NUM_UNKNOWN 255 - void -id3tag_init(lame_t gfp) -{ +id3tag_init(lame_t gfp) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -301,10 +298,8 @@ id3tag_init(lame_t gfp) } - void -id3tag_add_v2(lame_t gfp) -{ +id3tag_add_v2(lame_t gfp) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -316,8 +311,7 @@ id3tag_add_v2(lame_t gfp) } void -id3tag_v1_only(lame_t gfp) -{ +id3tag_v1_only(lame_t gfp) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -329,8 +323,7 @@ id3tag_v1_only(lame_t gfp) } void -id3tag_v2_only(lame_t gfp) -{ +id3tag_v2_only(lame_t gfp) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -342,8 +335,7 @@ id3tag_v2_only(lame_t gfp) } void -id3tag_space_v1(lame_t gfp) -{ +id3tag_space_v1(lame_t gfp) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -355,14 +347,12 @@ id3tag_space_v1(lame_t gfp) } void -id3tag_pad_v2(lame_t gfp) -{ +id3tag_pad_v2(lame_t gfp) { id3tag_set_pad(gfp, 128); } void -id3tag_set_pad(lame_t gfp, size_t n) -{ +id3tag_set_pad(lame_t gfp, size_t n) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -372,12 +362,11 @@ id3tag_set_pad(lame_t gfp, size_t n) gfc->tag_spec.flags &= ~V1_ONLY_FLAG; gfc->tag_spec.flags |= PAD_V2_FLAG; gfc->tag_spec.flags |= ADD_V2_FLAG; - gfc->tag_spec.padding_size = (unsigned int)n; + gfc->tag_spec.padding_size = (unsigned int) n; } static int -hasUcs2ByteOrderMarker(unsigned short bom) -{ +hasUcs2ByteOrderMarker(unsigned short bom) { if (bom == 0xFFFEu || bom == 0xFEFFu) { return 1; } @@ -386,15 +375,13 @@ hasUcs2ByteOrderMarker(unsigned short bom) static unsigned short -swap_bytes(unsigned short w) -{ +swap_bytes(unsigned short w) { return (0xff00u & (w << 8)) | (0x00ffu & (w >> 8)); } static unsigned short -toLittleEndian(unsigned short bom, unsigned short c) -{ +toLittleEndian(unsigned short bom, unsigned short c) { if (bom == 0xFFFEu) { return swap_bytes(c); } @@ -402,8 +389,7 @@ toLittleEndian(unsigned short bom, unsigned short c) } static unsigned short -fromLatin1Char(const unsigned short* s, unsigned short c) -{ +fromLatin1Char(const unsigned short *s, unsigned short c) { if (s[0] == 0xFFFEu) { return swap_bytes(c); } @@ -411,16 +397,15 @@ fromLatin1Char(const unsigned short* s, unsigned short c) } -static size_t -local_strdup(char **dst, const char *src) -{ +static size_t +local_strdup(char **dst, const char *src) { if (dst == 0) { return 0; } free(*dst); *dst = 0; if (src != 0) { - size_t n; + size_t n; for (n = 0; src[n] != 0; ++n) { /* calc src string length */ } if (n > 0) { /* string length without zero termination */ @@ -436,16 +421,15 @@ local_strdup(char **dst, const char *src) return 0; } -static size_t -local_ucs2_strdup(unsigned short **dst, unsigned short const *src) -{ +static size_t +local_ucs2_strdup(unsigned short **dst, unsigned short const *src) { if (dst == 0) { return 0; } free(*dst); /* free old string pointer */ *dst = 0; if (src != 0) { - size_t n; + size_t n; for (n = 0; src[n] != 0; ++n) { /* calc src string length */ } if (n > 0) { /* string length without zero termination */ @@ -463,10 +447,9 @@ local_ucs2_strdup(unsigned short **dst, unsigned short const *src) } -static size_t -local_ucs2_strlen(unsigned short const *s) -{ - size_t n = 0; +static size_t +local_ucs2_strlen(unsigned short const *s) { + size_t n = 0; if (s != 0) { while (*s++) { ++n; @@ -477,8 +460,7 @@ local_ucs2_strlen(unsigned short const *s) static size_t -local_ucs2_substr(unsigned short** dst, unsigned short const* src, size_t start, size_t end) -{ +local_ucs2_substr(unsigned short **dst, unsigned short const *src, size_t start, size_t end) { size_t const len = 1 + 1 + ((start < end) ? (end - start) : 0); size_t n = 0; unsigned short *ptr = lame_calloc(unsigned short, len); @@ -500,9 +482,8 @@ local_ucs2_substr(unsigned short** dst, unsigned short const* src, size_t start, } static int -local_ucs2_pos(unsigned short const* str, unsigned short c) -{ - int i; +local_ucs2_pos(unsigned short const *str, unsigned short c) { + int i; for (i = 0; str != 0 && str[i] != 0; ++i) { if (str[i] == c) { return i; @@ -512,9 +493,8 @@ local_ucs2_pos(unsigned short const* str, unsigned short c) } static int -local_char_pos(char const* str, char c) -{ - int i; +local_char_pos(char const *str, char c) { + int i; for (i = 0; str != 0 && str[i] != 0; ++i) { if (str[i] == c) { return i; @@ -524,8 +504,7 @@ local_char_pos(char const* str, char c) } static int -maybeLatin1(unsigned short const* text) -{ +maybeLatin1(unsigned short const *text) { if (text) { unsigned short bom = *text++; while (*text) { @@ -536,14 +515,14 @@ maybeLatin1(unsigned short const* text) return 1; } -static int searchGenre(char const* genre); -static int sloppySearchGenre(char const* genre); +static int searchGenre(char const *genre); + +static int sloppySearchGenre(char const *genre); static int -lookupGenre(char const* genre) -{ - char *str; - int num = strtol(genre, &str, 10); +lookupGenre(char const *genre) { + char *str; + int num = strtol(genre, &str, 10); /* is the input a string or a valid number? */ if (*str) { num = searchGenre(genre); @@ -553,8 +532,7 @@ lookupGenre(char const* genre) if (num == GENRE_NAME_COUNT) { return -2; /* no common genre text found */ } - } - else { + } else { if ((num < 0) || (num >= GENRE_NAME_COUNT)) { return -1; /* number unknown */ } @@ -565,21 +543,19 @@ lookupGenre(char const* genre) static unsigned char * writeLoBytes(unsigned char *frame, unsigned short const *str, size_t n); -static char* -local_strdup_utf16_to_latin1(unsigned short const* utf16) -{ - size_t len = local_ucs2_strlen(utf16); - unsigned char* latin1 = lame_calloc(unsigned char, len+1); +static char * +local_strdup_utf16_to_latin1(unsigned short const *utf16) { + size_t len = local_ucs2_strlen(utf16); + unsigned char *latin1 = lame_calloc(unsigned char, len + 1); writeLoBytes(latin1, utf16, len); - return (char*)latin1; + return (char *) latin1; } static int -id3tag_set_genre_utf16(lame_t gfp, unsigned short const* text) -{ - lame_internal_flags* gfc = gfp->internal_flags; - int ret; +id3tag_set_genre_utf16(lame_t gfp, unsigned short const *text) { + lame_internal_flags *gfc = gfp->internal_flags; + int ret; if (text == 0) { return -3; } @@ -587,8 +563,8 @@ id3tag_set_genre_utf16(lame_t gfp, unsigned short const* text) return -3; } if (maybeLatin1(text)) { - char* latin1 = local_strdup_utf16_to_latin1(text); - int num = lookupGenre(latin1); + char *latin1 = local_strdup_utf16_to_latin1(text); + int num = lookupGenre(latin1); free(latin1); if (num == -1) return -1; /* number out of range */ if (num >= 0) { /* common genre found */ @@ -618,9 +594,8 @@ as follows. (although some are not exactly same)*/ int -id3tag_set_albumart(lame_t gfp, const char *image, size_t size) -{ - int mimetype = MIMETYPE_NONE; +id3tag_set_albumart(lame_t gfp, const char *image, size_t size) { + int mimetype = MIMETYPE_NONE; lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -633,14 +608,11 @@ id3tag_set_albumart(lame_t gfp, const char *image, size_t size) /* determine MIME type from the actual image data */ if (2 < size && data[0] == 0xFF && data[1] == 0xD8) { mimetype = MIMETYPE_JPEG; - } - else if (4 < size && data[0] == 0x89 && strncmp((const char *) &data[1], "PNG", 3) == 0) { + } else if (4 < size && data[0] == 0x89 && strncmp((const char *) &data[1], "PNG", 3) == 0) { mimetype = MIMETYPE_PNG; - } - else if (4 < size && strncmp((const char *) data, "GIF8", 4) == 0) { + } else if (4 < size && strncmp((const char *) data, "GIF8", 4) == 0) { mimetype = MIMETYPE_GIF; - } - else { + } else { return -1; } } @@ -656,7 +628,7 @@ id3tag_set_albumart(lame_t gfp, const char *image, size_t size) gfc->tag_spec.albumart = lame_calloc(unsigned char, size); if (gfc->tag_spec.albumart != 0) { memcpy(gfc->tag_spec.albumart, image, size); - gfc->tag_spec.albumart_size = (unsigned int)size; + gfc->tag_spec.albumart_size = (unsigned int) size; gfc->tag_spec.albumart_mimetype = mimetype; gfc->tag_spec.flags |= CHANGED_FLAG; id3tag_add_v2(gfp); @@ -665,9 +637,8 @@ id3tag_set_albumart(lame_t gfp, const char *image, size_t size) } static unsigned char * -set_4_byte_value(unsigned char *bytes, uint32_t value) -{ - int i; +set_4_byte_value(unsigned char *bytes, uint32_t value) { + int i; for (i = 3; i >= 0; --i) { bytes[i] = value & 0xffUL; value >>= 8; @@ -676,8 +647,7 @@ set_4_byte_value(unsigned char *bytes, uint32_t value) } static uint32_t -toID3v2TagId(char const *s) -{ +toID3v2TagId(char const *s) { unsigned int i, x = 0; if (s == 0) { return 0; @@ -697,8 +667,7 @@ toID3v2TagId(char const *s) } static uint32_t -toID3v2TagId_ucs2(unsigned short const *s) -{ +toID3v2TagId_ucs2(unsigned short const *s) { unsigned int i, x = 0; unsigned short bom = 0; if (s == 0) { @@ -738,22 +707,21 @@ isNumericString(uint32_t frame_id) #endif static int -isMultiFrame(uint32_t frame_id) -{ +isMultiFrame(uint32_t frame_id) { switch (frame_id) { - case ID_TXXX: - case ID_WXXX: - case ID_COMMENT: - case ID_SYLT: - case ID_APIC: - case ID_GEOB: - case ID_PCNT: - case ID_AENC: - case ID_LINK: - case ID_ENCR: - case ID_GRID: - case ID_PRIV: - return 1; + case ID_TXXX: + case ID_WXXX: + case ID_COMMENT: + case ID_SYLT: + case ID_APIC: + case ID_GEOB: + case ID_PCNT: + case ID_AENC: + case ID_LINK: + case ID_ENCR: + case ID_GRID: + case ID_PRIV: + return 1; } return 0; } @@ -772,8 +740,7 @@ isFullTextString(int frame_id) #endif static FrameDataNode * -findNode(id3tag_spec const *tag, uint32_t frame_id, FrameDataNode const *last) -{ +findNode(id3tag_spec const *tag, uint32_t frame_id, FrameDataNode const *last) { FrameDataNode *node = last ? last->nxt : tag->v2_head; while (node != 0) { if (node->fid == frame_id) { @@ -785,28 +752,24 @@ findNode(id3tag_spec const *tag, uint32_t frame_id, FrameDataNode const *last) } static void -appendNode(id3tag_spec * tag, FrameDataNode * node) -{ +appendNode(id3tag_spec *tag, FrameDataNode *node) { if (tag->v2_tail == 0 || tag->v2_head == 0) { tag->v2_head = node; tag->v2_tail = node; - } - else { + } else { tag->v2_tail->nxt = node; tag->v2_tail = node; } } static void -setLang(char *dst, char const *src) -{ - int i; +setLang(char *dst, char const *src) { + int i; if (src == 0 || src[0] == 0) { dst[0] = 'e'; dst[1] = 'n'; dst[2] = 'g'; - } - else { + } else { for (i = 0; i < 3 && src && *src; ++i) { dst[i] = src[i]; } @@ -817,14 +780,13 @@ setLang(char *dst, char const *src) } static int -isSameLang(char const *l1, char const *l2) -{ - char d[3]; - int i; +isSameLang(char const *l1, char const *l2) { + char d[3]; + int i; setLang(d, l2); for (i = 0; i < 3; ++i) { - char a = tolower(l1[i]); - char b = tolower(d[i]); + char a = tolower(l1[i]); + char b = tolower(d[i]); if (a < ' ') a = ' '; if (b < ' ') @@ -837,9 +799,8 @@ isSameLang(char const *l1, char const *l2) } static int -isSameDescriptor(FrameDataNode const *node, char const *dsc) -{ - size_t i; +isSameDescriptor(FrameDataNode const *node, char const *dsc) { + size_t i; if (node->dsc.enc == 1 && node->dsc.dim > 0) { return 0; } @@ -852,9 +813,8 @@ isSameDescriptor(FrameDataNode const *node, char const *dsc) } static int -isSameDescriptorUcs2(FrameDataNode const *node, unsigned short const *dsc) -{ - size_t i; +isSameDescriptorUcs2(FrameDataNode const *node, unsigned short const *dsc) { + size_t i; if (node->dsc.enc != 1 && node->dsc.dim > 0) { return 0; } @@ -867,8 +827,8 @@ isSameDescriptorUcs2(FrameDataNode const *node, unsigned short const *dsc) } static int -id3v2_add_ucs2(lame_t gfp, uint32_t frame_id, char const *lng, unsigned short const *desc, unsigned short const *text) -{ +id3v2_add_ucs2(lame_t gfp, uint32_t frame_id, char const *lng, unsigned short const *desc, + unsigned short const *text) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc != 0) { FrameDataNode *node = findNode(&gfc->tag_spec, frame_id, 0); @@ -904,8 +864,8 @@ id3v2_add_ucs2(lame_t gfp, uint32_t frame_id, char const *lng, unsigned short co } static int -id3v2_add_latin1(lame_t gfp, uint32_t frame_id, char const *lng, char const *desc, char const *text) -{ +id3v2_add_latin1(lame_t gfp, uint32_t frame_id, char const *lng, char const *desc, + char const *text) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc != 0) { FrameDataNode *node = findNode(&gfc->tag_spec, frame_id, 0); @@ -940,55 +900,51 @@ id3v2_add_latin1(lame_t gfp, uint32_t frame_id, char const *lng, char const *des return -255; } -static char const* -id3v2_get_language(lame_t gfp) -{ - lame_internal_flags const* gfc = gfp ? gfp->internal_flags : 0; +static char const * +id3v2_get_language(lame_t gfp) { + lame_internal_flags const *gfc = gfp ? gfp->internal_flags : 0; if (gfc) return gfc->tag_spec.language; return 0; } static int -id3v2_add_ucs2_lng(lame_t gfp, uint32_t frame_id, unsigned short const *desc, unsigned short const *text) -{ - char const* lang = id3v2_get_language(gfp); +id3v2_add_ucs2_lng(lame_t gfp, uint32_t frame_id, unsigned short const *desc, + unsigned short const *text) { + char const *lang = id3v2_get_language(gfp); return id3v2_add_ucs2(gfp, frame_id, lang, desc, text); } static int -id3v2_add_latin1_lng(lame_t gfp, uint32_t frame_id, char const *desc, char const *text) -{ - char const* lang = id3v2_get_language(gfp); +id3v2_add_latin1_lng(lame_t gfp, uint32_t frame_id, char const *desc, char const *text) { + char const *lang = id3v2_get_language(gfp); return id3v2_add_latin1(gfp, frame_id, lang, desc, text); } static int -id3tag_set_userinfo_latin1(lame_t gfp, uint32_t id, char const *fieldvalue) -{ +id3tag_set_userinfo_latin1(lame_t gfp, uint32_t id, char const *fieldvalue) { char const separator = '='; - int rc = -7; - int a = local_char_pos(fieldvalue, separator); + int rc = -7; + int a = local_char_pos(fieldvalue, separator); if (a >= 0) { - char* dup = 0; + char *dup = 0; local_strdup(&dup, fieldvalue); dup[a] = 0; - rc = id3v2_add_latin1_lng(gfp, id, dup, dup+a+1); + rc = id3v2_add_latin1_lng(gfp, id, dup, dup + a + 1); free(dup); } return rc; } static int -id3tag_set_userinfo_ucs2(lame_t gfp, uint32_t id, unsigned short const *fieldvalue) -{ - unsigned short const separator = fromLatin1Char(fieldvalue,'='); - int rc = -7; - size_t b = local_ucs2_strlen(fieldvalue); - int a = local_ucs2_pos(fieldvalue, separator); +id3tag_set_userinfo_ucs2(lame_t gfp, uint32_t id, unsigned short const *fieldvalue) { + unsigned short const separator = fromLatin1Char(fieldvalue, '='); + int rc = -7; + size_t b = local_ucs2_strlen(fieldvalue); + int a = local_ucs2_pos(fieldvalue, separator); if (a >= 0) { - unsigned short* dsc = 0, *val = 0; + unsigned short *dsc = 0, *val = 0; local_ucs2_substr(&dsc, fieldvalue, 0, a); - local_ucs2_substr(&val, fieldvalue, a+1, b); + local_ucs2_substr(&val, fieldvalue, a + 1, b); rc = id3v2_add_ucs2_lng(gfp, id, dsc, val); free(dsc); free(val); @@ -997,8 +953,7 @@ id3tag_set_userinfo_ucs2(lame_t gfp, uint32_t id, unsigned short const *fieldval } int -id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text) -{ +id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text) { uint32_t const frame_id = toID3v2TagId(id); if (frame_id == 0) { return -1; @@ -1025,10 +980,11 @@ id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text return id3v2_add_ucs2_lng(gfp, frame_id, text, 0); } if (frame_id == ID_WFED) { - return id3v2_add_ucs2_lng(gfp, frame_id, text, 0); /* iTunes expects WFED to be a text frame */ + return id3v2_add_ucs2_lng(gfp, frame_id, text, + 0); /* iTunes expects WFED to be a text frame */ } if (isFrameIdMatching(frame_id, FRAME_ID('T', 0, 0, 0)) - ||isFrameIdMatching(frame_id, FRAME_ID('W', 0, 0, 0))) { + || isFrameIdMatching(frame_id, FRAME_ID('W', 0, 0, 0))) { #if 0 if (isNumericString(frame_id)) { return -2; /* must be Latin-1 encoded */ @@ -1043,14 +999,12 @@ extern int id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text); int -id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text) -{ +id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text) { return id3tag_set_textinfo_utf16(gfp, id, text); } int -id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text) -{ +id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text) { uint32_t const frame_id = toID3v2TagId(id); if (frame_id == 0) { return -1; @@ -1074,10 +1028,11 @@ id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text) return id3v2_add_latin1_lng(gfp, frame_id, text, 0); } if (frame_id == ID_WFED) { - return id3v2_add_latin1_lng(gfp, frame_id, text, 0); /* iTunes expects WFED to be a text frame */ + return id3v2_add_latin1_lng(gfp, frame_id, text, + 0); /* iTunes expects WFED to be a text frame */ } if (isFrameIdMatching(frame_id, FRAME_ID('T', 0, 0, 0)) - ||isFrameIdMatching(frame_id, FRAME_ID('W', 0, 0, 0))) { + || isFrameIdMatching(frame_id, FRAME_ID('W', 0, 0, 0))) { return id3v2_add_latin1_lng(gfp, frame_id, 0, text); } return -255; /* not supported by now */ @@ -1085,8 +1040,7 @@ id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text) int -id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text) -{ +id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text) { if (is_lame_internal_flags_null(gfp)) { return 0; } @@ -1095,8 +1049,8 @@ id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char c int -id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text) -{ +id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, + unsigned short const *text) { if (is_lame_internal_flags_null(gfp)) { return 0; } @@ -1104,12 +1058,13 @@ id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *des } extern int -id3tag_set_comment_ucs2(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text); +id3tag_set_comment_ucs2(lame_t gfp, char const *lang, unsigned short const *desc, + unsigned short const *text); int -id3tag_set_comment_ucs2(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text) -{ +id3tag_set_comment_ucs2(lame_t gfp, char const *lang, unsigned short const *desc, + unsigned short const *text) { if (is_lame_internal_flags_null(gfp)) { return 0; } @@ -1118,8 +1073,7 @@ id3tag_set_comment_ucs2(lame_t gfp, char const *lang, unsigned short const *desc void -id3tag_set_title(lame_t gfp, const char *title) -{ +id3tag_set_title(lame_t gfp, const char *title) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc && title && *title) { local_strdup(&gfc->tag_spec.title, title); @@ -1129,8 +1083,7 @@ id3tag_set_title(lame_t gfp, const char *title) } void -id3tag_set_artist(lame_t gfp, const char *artist) -{ +id3tag_set_artist(lame_t gfp, const char *artist) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc && artist && *artist) { local_strdup(&gfc->tag_spec.artist, artist); @@ -1140,8 +1093,7 @@ id3tag_set_artist(lame_t gfp, const char *artist) } void -id3tag_set_album(lame_t gfp, const char *album) -{ +id3tag_set_album(lame_t gfp, const char *album) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc && album && *album) { local_strdup(&gfc->tag_spec.album, album); @@ -1151,11 +1103,10 @@ id3tag_set_album(lame_t gfp, const char *album) } void -id3tag_set_year(lame_t gfp, const char *year) -{ +id3tag_set_year(lame_t gfp, const char *year) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc && year && *year) { - int num = atoi(year); + int num = atoi(year); if (num < 0) { num = 0; } @@ -1172,8 +1123,7 @@ id3tag_set_year(lame_t gfp, const char *year) } void -id3tag_set_comment(lame_t gfp, const char *comment) -{ +id3tag_set_comment(lame_t gfp, const char *comment) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; if (gfc && comment && *comment) { local_strdup(&gfc->tag_spec.comment, comment); @@ -1187,14 +1137,13 @@ id3tag_set_comment(lame_t gfp, const char *comment) } int -id3tag_set_track(lame_t gfp, const char *track) -{ +id3tag_set_track(lame_t gfp, const char *track) { char const *trackcount; lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; - int ret = 0; + int ret = 0; if (gfc && track && *track) { - int num = atoi(track); + int num = atoi(track); /* check for valid ID3v1 track number range */ if (num < 1 || num > 255) { num = 0; @@ -1217,8 +1166,7 @@ id3tag_set_track(lame_t gfp, const char *track) /* would use real "strcasecmp" but it isn't portable */ static int -local_strcasecmp(const char *s1, const char *s2) -{ +local_strcasecmp(const char *s1, const char *s2) { unsigned char c1; unsigned char c2; do { @@ -1234,11 +1182,10 @@ local_strcasecmp(const char *s1, const char *s2) } -static -const char* nextUpperAlpha(const char* p, char x) -{ +static +const char *nextUpperAlpha(const char *p, char x) { char c; - for(c = toupper(*p); *p != 0; c = toupper(*++p)) { + for (c = toupper(*p); *p != 0; c = toupper(*++p)) { if ('A' <= c && c <= 'Z') { if (c != x) { return p; @@ -1250,8 +1197,7 @@ const char* nextUpperAlpha(const char* p, char x) static int -sloppyCompared(const char* p, const char* q) -{ +sloppyCompared(const char *p, const char *q) { char cp, cq; p = nextUpperAlpha(p, 0); q = nextUpperAlpha(q, 0); @@ -1274,9 +1220,8 @@ sloppyCompared(const char* p, const char* q) } -static int -sloppySearchGenre(const char *genre) -{ +static int +sloppySearchGenre(const char *genre) { int i; for (i = 0; i < GENRE_NAME_COUNT; ++i) { if (sloppyCompared(genre, genre_names[i])) { @@ -1288,8 +1233,7 @@ sloppySearchGenre(const char *genre) static int -searchGenre(const char* genre) -{ +searchGenre(const char *genre) { int i; for (i = 0; i < GENRE_NAME_COUNT; ++i) { if (!local_strcasecmp(genre, genre_names[i])) { @@ -1301,10 +1245,9 @@ searchGenre(const char* genre) int -id3tag_set_genre(lame_t gfp, const char *genre) -{ +id3tag_set_genre(lame_t gfp, const char *genre) { lame_internal_flags *gfc = gfp != 0 ? gfp->internal_flags : 0; - int ret = 0; + int ret = 0; if (gfc && genre && *genre) { int const num = lookupGenre(genre); if (num == -1) return num; @@ -1312,8 +1255,7 @@ id3tag_set_genre(lame_t gfp, const char *genre) if (num >= 0) { gfc->tag_spec.genre_id3v1 = num; genre = genre_names[num]; - } - else { + } else { gfc->tag_spec.genre_id3v1 = GENRE_INDEX_OTHER; gfc->tag_spec.flags |= ADD_V2_FLAG; } @@ -1323,89 +1265,86 @@ id3tag_set_genre(lame_t gfp, const char *genre) } -static size_t -sizeOfNode(FrameDataNode const *node) -{ - size_t n = 0; +static size_t +sizeOfNode(FrameDataNode const *node) { + size_t n = 0; if (node) { n = 10; /* header size */ n += 1; /* text encoding flag */ switch (node->txt.enc) { - default: - case 0: - if (node->dsc.dim > 0) { - n += node->dsc.dim + 1; - } - n += node->txt.dim; - break; - case 1: - if (node->dsc.dim > 0) { - n += (node->dsc.dim+1) * 2; - } - n += node->txt.dim * 2; - break; + default: + case 0: + if (node->dsc.dim > 0) { + n += node->dsc.dim + 1; + } + n += node->txt.dim; + break; + case 1: + if (node->dsc.dim > 0) { + n += (node->dsc.dim + 1) * 2; + } + n += node->txt.dim * 2; + break; } } return n; } -static size_t -sizeOfCommentNode(FrameDataNode const *node) -{ - size_t n = 0; +static size_t +sizeOfCommentNode(FrameDataNode const *node) { + size_t n = 0; if (node) { n = 10; /* header size */ n += 1; /* text encoding flag */ n += 3; /* language */ switch (node->dsc.enc) { - default: - case 0: - n += 1 + node->dsc.dim; - break; - case 1: - n += 2 + node->dsc.dim * 2; - break; + default: + case 0: + n += 1 + node->dsc.dim; + break; + case 1: + n += 2 + node->dsc.dim * 2; + break; } switch (node->txt.enc) { - default: - case 0: - n += node->txt.dim; - break; - case 1: - n += node->txt.dim * 2; - break; + default: + case 0: + n += node->txt.dim; + break; + case 1: + n += node->txt.dim * 2; + break; } } return n; } static size_t -sizeOfWxxxNode(FrameDataNode const *node) -{ - size_t n = 0; +sizeOfWxxxNode(FrameDataNode const *node) { + size_t n = 0; if (node) { n = 10; /* header size */ if (node->dsc.dim > 0) { n += 1; /* text encoding flag */ switch (node->dsc.enc) { - default: - case 0: - n += 1 + node->dsc.dim; - break; - case 1: - n += 2 + node->dsc.dim * 2; - break; + default: + case 0: + n += 1 + node->dsc.dim; + break; + case 1: + n += 2 + node->dsc.dim * 2; + break; } } if (node->txt.dim > 0) { switch (node->txt.enc) { - default: - case 0: - n += node->txt.dim; - break; - case 1: - n += node->txt.dim - 1; /* UCS2 -> Latin1, skip BOM */ - break; + default: + case 0: + n += node->txt.dim; + break; + case 1: + n += node->txt.dim - 1; /* UCS2 -> Latin1, skip BOM */ + break; } } } @@ -1413,8 +1352,7 @@ sizeOfWxxxNode(FrameDataNode const *node) } static unsigned char * -writeChars(unsigned char *frame, char const *str, size_t n) -{ +writeChars(unsigned char *frame, char const *str, size_t n) { while (n--) { *frame++ = *str++; } @@ -1422,8 +1360,7 @@ writeChars(unsigned char *frame, char const *str, size_t n) } static unsigned char * -writeUcs2s(unsigned char *frame, unsigned short const *str, size_t n) -{ +writeUcs2s(unsigned char *frame, unsigned short const *str, size_t n) { if (n > 0) { unsigned short const bom = *str; while (n--) { @@ -1436,19 +1373,18 @@ writeUcs2s(unsigned char *frame, unsigned short const *str, size_t n) } static unsigned char * -writeLoBytes(unsigned char *frame, unsigned short const *str, size_t n) -{ +writeLoBytes(unsigned char *frame, unsigned short const *str, size_t n) { if (n > 0) { unsigned short const bom = *str; if (hasUcs2ByteOrderMarker(bom)) { - str++; n--; /* skip BOM */ + str++; + n--; /* skip BOM */ } while (n--) { unsigned short const c = toLittleEndian(bom, *str++); if (c < 0x0020u || 0x00ffu < c) { *frame++ = 0x0020; /* blank */ - } - else { + } else { *frame++ = c; } } @@ -1457,8 +1393,7 @@ writeLoBytes(unsigned char *frame, unsigned short const *str, size_t n) } static unsigned char * -set_frame_comment(unsigned char *frame, FrameDataNode const *node) -{ +set_frame_comment(unsigned char *frame, FrameDataNode const *node) { size_t const n = sizeOfCommentNode(node); if (n > 10) { frame = set_4_byte_value(frame, node->fid); @@ -1476,8 +1411,7 @@ set_frame_comment(unsigned char *frame, FrameDataNode const *node) if (node->dsc.enc != 1) { frame = writeChars(frame, node->dsc.ptr.l, node->dsc.dim); *frame++ = 0; - } - else { + } else { frame = writeUcs2s(frame, node->dsc.ptr.u, node->dsc.dim); *frame++ = 0; *frame++ = 0; @@ -1485,8 +1419,7 @@ set_frame_comment(unsigned char *frame, FrameDataNode const *node) /* comment full text */ if (node->txt.enc != 1) { frame = writeChars(frame, node->txt.ptr.l, node->txt.dim); - } - else { + } else { frame = writeUcs2s(frame, node->txt.ptr.u, node->txt.dim); } } @@ -1494,8 +1427,7 @@ set_frame_comment(unsigned char *frame, FrameDataNode const *node) } static unsigned char * -set_frame_custom2(unsigned char *frame, FrameDataNode const *node) -{ +set_frame_custom2(unsigned char *frame, FrameDataNode const *node) { size_t const n = sizeOfNode(node); if (n > 10) { frame = set_4_byte_value(frame, node->fid); @@ -1509,8 +1441,7 @@ set_frame_custom2(unsigned char *frame, FrameDataNode const *node) if (node->dsc.enc != 1) { frame = writeChars(frame, node->dsc.ptr.l, node->dsc.dim); *frame++ = 0; - } - else { + } else { frame = writeUcs2s(frame, node->dsc.ptr.u, node->dsc.dim); *frame++ = 0; *frame++ = 0; @@ -1518,8 +1449,7 @@ set_frame_custom2(unsigned char *frame, FrameDataNode const *node) } if (node->txt.enc != 1) { frame = writeChars(frame, node->txt.ptr.l, node->txt.dim); - } - else { + } else { frame = writeUcs2s(frame, node->txt.ptr.u, node->txt.dim); } } @@ -1527,8 +1457,7 @@ set_frame_custom2(unsigned char *frame, FrameDataNode const *node) } static unsigned char * -set_frame_wxxx(unsigned char *frame, FrameDataNode const *node) -{ +set_frame_wxxx(unsigned char *frame, FrameDataNode const *node) { size_t const n = sizeOfWxxxNode(node); if (n > 10) { frame = set_4_byte_value(frame, node->fid); @@ -1542,8 +1471,7 @@ set_frame_wxxx(unsigned char *frame, FrameDataNode const *node) if (node->dsc.enc != 1) { frame = writeChars(frame, node->dsc.ptr.l, node->dsc.dim); *frame++ = 0; - } - else { + } else { frame = writeUcs2s(frame, node->dsc.ptr.u, node->dsc.dim); *frame++ = 0; *frame++ = 0; @@ -1551,8 +1479,7 @@ set_frame_wxxx(unsigned char *frame, FrameDataNode const *node) } if (node->txt.enc != 1) { frame = writeChars(frame, node->txt.ptr.l, node->txt.dim); - } - else { + } else { frame = writeLoBytes(frame, node->txt.ptr.u, node->txt.dim); } } @@ -1560,8 +1487,7 @@ set_frame_wxxx(unsigned char *frame, FrameDataNode const *node) } static unsigned char * -set_frame_apic(unsigned char *frame, const char *mimetype, const unsigned char *data, size_t size) -{ +set_frame_apic(unsigned char *frame, const char *mimetype, const unsigned char *data, size_t size) { /* ID3v2.3 standard APIC frame: *

* Text encoding $xx @@ -1596,8 +1522,7 @@ set_frame_apic(unsigned char *frame, const char *mimetype, const unsigned char * } int -id3tag_set_fieldvalue(lame_t gfp, const char *fieldvalue) -{ +id3tag_set_fieldvalue(lame_t gfp, const char *fieldvalue) { if (is_lame_internal_flags_null(gfp)) { return 0; } @@ -1611,17 +1536,16 @@ id3tag_set_fieldvalue(lame_t gfp, const char *fieldvalue) } int -id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue) -{ +id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue) { if (is_lame_internal_flags_null(gfp)) { return 0; } if (fieldvalue && *fieldvalue) { size_t dx = hasUcs2ByteOrderMarker(fieldvalue[0]); unsigned short const separator = fromLatin1Char(fieldvalue, '='); - char fid[5] = {0,0,0,0,0}; + char fid[5] = {0, 0, 0, 0, 0}; uint32_t const frame_id = toID3v2TagId_ucs2(fieldvalue); - if (local_ucs2_strlen(fieldvalue) < (5+dx) || fieldvalue[4+dx] != separator) { + if (local_ucs2_strlen(fieldvalue) < (5 + dx) || fieldvalue[4 + dx] != separator) { return -1; } fid[0] = (frame_id >> 24) & 0x0ff; @@ -1629,9 +1553,9 @@ id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue) fid[2] = (frame_id >> 8) & 0x0ff; fid[3] = frame_id & 0x0ff; if (frame_id != 0) { - unsigned short* txt = 0; - int rc; - local_ucs2_substr(&txt, fieldvalue, dx+5, local_ucs2_strlen(fieldvalue)); + unsigned short *txt = 0; + int rc; + local_ucs2_substr(&txt, fieldvalue, dx + 5, local_ucs2_strlen(fieldvalue)); rc = id3tag_set_textinfo_utf16(gfp, fid, txt); free(txt); return rc; @@ -1644,8 +1568,7 @@ extern int id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue); int -id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue) -{ +id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue) { if (is_lame_internal_flags_null(gfp)) { return 0; } @@ -1653,8 +1576,7 @@ id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue) } size_t -lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) -{ +lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -1670,10 +1592,10 @@ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) { int usev2 = test_tag_spec_flags(gfc, ADD_V2_FLAG | V2_ONLY_FLAG); /* calculate length of four fields which may not fit in verion 1 tag */ - size_t title_length = gfc->tag_spec.title ? strlen(gfc->tag_spec.title) : 0; - size_t artist_length = gfc->tag_spec.artist ? strlen(gfc->tag_spec.artist) : 0; - size_t album_length = gfc->tag_spec.album ? strlen(gfc->tag_spec.album) : 0; - size_t comment_length = gfc->tag_spec.comment ? strlen(gfc->tag_spec.comment) : 0; + size_t title_length = gfc->tag_spec.title ? strlen(gfc->tag_spec.title) : 0; + size_t artist_length = gfc->tag_spec.artist ? strlen(gfc->tag_spec.artist) : 0; + size_t album_length = gfc->tag_spec.album ? strlen(gfc->tag_spec.album) : 0; + size_t comment_length = gfc->tag_spec.comment ? strlen(gfc->tag_spec.comment) : 0; /* write tag if explicitly requested or if fields overflow */ if ((title_length > 30) || (artist_length > 30) @@ -1683,9 +1605,9 @@ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) usev2 = 1; } if (usev2) { - size_t tag_size; + size_t tag_size; unsigned char *p; - size_t adjusted_tag_size; + size_t adjusted_tag_size; const char *albumart_mime = NULL; static const char *mime_jpeg = "image/jpeg"; static const char *mime_png = "image/png"; @@ -1699,15 +1621,15 @@ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) tag_size = 10; if (gfc->tag_spec.albumart && gfc->tag_spec.albumart_size) { switch (gfc->tag_spec.albumart_mimetype) { - case MIMETYPE_JPEG: - albumart_mime = mime_jpeg; - break; - case MIMETYPE_PNG: - albumart_mime = mime_png; - break; - case MIMETYPE_GIF: - albumart_mime = mime_gif; - break; + case MIMETYPE_JPEG: + albumart_mime = mime_jpeg; + break; + case MIMETYPE_PNG: + albumart_mime = mime_png; + break; + case MIMETYPE_GIF: + albumart_mime = mime_gif; + break; } if (albumart_mime) { tag_size += 10 + 4 + strlen(albumart_mime) + gfc->tag_spec.albumart_size; @@ -1720,11 +1642,9 @@ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) for (node = tag->v2_head; node != 0; node = node->nxt) { if (node->fid == ID_COMMENT || node->fid == ID_USER) { tag_size += sizeOfCommentNode(node); - } - else if (isFrameIdMatching(node->fid, FRAME_ID('W',0,0,0))) { + } else if (isFrameIdMatching(node->fid, FRAME_ID('W', 0, 0, 0))) { tag_size += sizeOfWxxxNode(node); - } - else { + } else { tag_size += sizeOfNode(node); } } @@ -1777,11 +1697,9 @@ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) for (node = tag->v2_head; node != 0; node = node->nxt) { if (node->fid == ID_COMMENT || node->fid == ID_USER) { p = set_frame_comment(p, node); - } - else if (isFrameIdMatching(node->fid,FRAME_ID('W',0,0,0))) { + } else if (isFrameIdMatching(node->fid, FRAME_ID('W', 0, 0, 0))) { p = set_frame_wxxx(p, node); - } - else { + } else { p = set_frame_custom2(p, node); } } @@ -1800,8 +1718,7 @@ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size) } int -id3tag_write_v2(lame_t gfp) -{ +id3tag_write_v2(lame_t gfp) { lame_internal_flags *gfc = 0; if (is_lame_internal_flags_null(gfp)) { @@ -1816,7 +1733,7 @@ id3tag_write_v2(lame_t gfp) } if (test_tag_spec_flags(gfc, CHANGED_FLAG)) { unsigned char *tag = 0; - size_t tag_size, n; + size_t tag_size, n; n = lame_get_id3v2_tag(gfp, 0, 0); tag = lame_calloc(unsigned char, n); @@ -1827,9 +1744,8 @@ id3tag_write_v2(lame_t gfp) if (tag_size > n) { free(tag); return -1; - } - else { - size_t i; + } else { + size_t i; /* write tag directly into bitstream at current position */ for (i = 0; i < tag_size; ++i) { add_dummy_byte(gfc, tag[i], 1); @@ -1842,13 +1758,11 @@ id3tag_write_v2(lame_t gfp) } static unsigned char * -set_text_field(unsigned char *field, const char *text, size_t size, int pad) -{ +set_text_field(unsigned char *field, const char *text, size_t size, int pad) { while (size--) { if (text && *text) { *field++ = *text++; - } - else { + } else { *field++ = pad; } } @@ -1856,8 +1770,7 @@ set_text_field(unsigned char *field, const char *text, size_t size, int pad) } size_t -lame_get_id3v1_tag(lame_t gfp, unsigned char *buffer, size_t size) -{ +lame_get_id3v1_tag(lame_t gfp, unsigned char *buffer, size_t size) { size_t const tag_size = 128; lame_internal_flags *gfc; @@ -1879,8 +1792,8 @@ lame_get_id3v1_tag(lame_t gfp, unsigned char *buffer, size_t size) } if (test_tag_spec_flags(gfc, CHANGED_FLAG)) { unsigned char *p = buffer; - int pad = test_tag_spec_flags(gfc, SPACE_V1_FLAG) ? ' ' : 0; - char year[5]; + int pad = test_tag_spec_flags(gfc, SPACE_V1_FLAG) ? ' ' : 0; + char year[5]; /* set tag identifier */ *p++ = 'T'; @@ -1906,10 +1819,9 @@ lame_get_id3v1_tag(lame_t gfp, unsigned char *buffer, size_t size) } int -id3tag_write_v1(lame_t gfp) -{ - lame_internal_flags* gfc = 0; - size_t i, n, m; +id3tag_write_v1(lame_t gfp) { + lame_internal_flags *gfc = 0; + size_t i, n, m; unsigned char tag[128]; if (is_lame_internal_flags_null(gfp)) { diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.h new file mode 100644 index 0000000..b532f98 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/id3tag.h @@ -0,0 +1,65 @@ + +#ifndef LAME_ID3_H +#define LAME_ID3_H + + +#define CHANGED_FLAG (1U << 0) +#define ADD_V2_FLAG (1U << 1) +#define V1_ONLY_FLAG (1U << 2) +#define V2_ONLY_FLAG (1U << 3) +#define SPACE_V1_FLAG (1U << 4) +#define PAD_V2_FLAG (1U << 5) + +enum { + MIMETYPE_NONE = 0, + MIMETYPE_JPEG, + MIMETYPE_PNG, + MIMETYPE_GIF +}; + +typedef struct FrameDataNode { + struct FrameDataNode *nxt; + uint32_t fid; /* Frame Identifier */ + char lng[4]; /* 3-character language descriptor */ + struct { + union { + char *l; /* ptr to Latin-1 chars */ + unsigned short *u; /* ptr to UCS-2 text */ + unsigned char *b; /* ptr to raw bytes */ + } ptr; + size_t dim; + int enc; /* 0:Latin-1, 1:UCS-2, 2:RAW */ + } dsc, txt; +} FrameDataNode; + + +typedef struct id3tag_spec { + /* private data members */ + unsigned int flags; + int year; + char *title; + char *artist; + char *album; + char *comment; + int track_id3v1; + int genre_id3v1; + unsigned char *albumart; + unsigned int albumart_size; + unsigned int padding_size; + int albumart_mimetype; + char language[4]; /* the language of the frame's content, according to ISO-639-2 */ + FrameDataNode *v2_head, *v2_tail; +} id3tag_spec; + + +/* write tag into stream at current position */ +extern int id3tag_write_v2(lame_global_flags *gfp); + +extern int id3tag_write_v1(lame_global_flags *gfp); +/* + * NOTE: A version 2 tag will NOT be added unless one of the text fields won't + * fit in a version 1 tag (e.g. the title string is longer than 30 characters), + * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used. + */ + +#endif diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/l3side.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/l3side.h new file mode 100644 index 0000000..2cbe4a8 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/l3side.h @@ -0,0 +1,95 @@ +/* + * Layer 3 side include file + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_L3SIDE_H +#define LAME_L3SIDE_H + +/* max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8) */ +#define SFBMAX (SBMAX_s*3) + +/* Layer III side information. */ +typedef struct { + int l[1 + SBMAX_l]; + int s[1 + SBMAX_s]; + int psfb21[1 + PSFB21]; + int psfb12[1 + PSFB12]; +} scalefac_struct; + + +typedef struct { + FLOAT l[SBMAX_l]; + FLOAT s[SBMAX_s][3]; +} III_psy_xmin; + +typedef struct { + III_psy_xmin thm; + III_psy_xmin en; +} III_psy_ratio; + +typedef struct { + FLOAT xr[576]; + int l3_enc[576]; + int scalefac[SFBMAX]; + FLOAT xrpow_max; + + int part2_3_length; + int big_values; + int count1; + int global_gain; + int scalefac_compress; + int block_type; + int mixed_block_flag; + int table_select[3]; + int subblock_gain[3 + 1]; + int region0_count; + int region1_count; + int preflag; + int scalefac_scale; + int count1table_select; + + int part2_length; + int sfb_lmax; + int sfb_smin; + int psy_lmax; + int sfbmax; + int psymax; + int sfbdivide; + int width[SFBMAX]; + int window[SFBMAX]; + int count1bits; + /* added for LSF */ + const int *sfb_partition_table; + int slen[4]; + + int max_nonzero_coeff; + char energy_above_cutoff[SFBMAX]; +} gr_info; + +typedef struct { + gr_info tt[2][2]; + int main_data_begin; + int private_bits; + int resvDrain_pre; + int resvDrain_post; + int scfsi[2][4]; +} III_side_info_t; + +#endif diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame-analysis.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame-analysis.h new file mode 100644 index 0000000..eb0bb01 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame-analysis.h @@ -0,0 +1,95 @@ +/* + * GTK plotting routines source file + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_GTKANAL_H +#define LAME_GTKANAL_H + + +#define READ_AHEAD 40 /* number of frames to read ahead */ +#define MAXMPGLAG READ_AHEAD /* if the mpg123 lag becomes bigger than this + we have to stop */ +#define NUMBACK 6 /* number of frames we can back up */ +#define NUMPINFO (NUMBACK+READ_AHEAD+1) + + +struct plotting_data { + int frameNum; /* current frame number */ + int frameNum123; + int num_samples; /* number of pcm samples read for this frame */ + double frametime; /* starting time of frame, in seconds */ + double pcmdata[2][1600]; + double pcmdata2[2][1152 + 1152 - DECDELAY]; + double xr[2][2][576]; + double mpg123xr[2][2][576]; + double ms_ratio[2]; + double ms_ener_ratio[2]; + + /* L,R, M and S values */ + double energy_save[4][BLKSIZE]; /* psymodel is one ahead */ + double energy[2][4][BLKSIZE]; + double pe[2][4]; + double thr[2][4][SBMAX_l]; + double en[2][4][SBMAX_l]; + double thr_s[2][4][3 * SBMAX_s]; + double en_s[2][4][3 * SBMAX_s]; + double ers_save[4]; /* psymodel is one ahead */ + double ers[2][4]; + + double sfb[2][2][SBMAX_l]; + double sfb_s[2][2][3 * SBMAX_s]; + double LAMEsfb[2][2][SBMAX_l]; + double LAMEsfb_s[2][2][3 * SBMAX_s]; + + int LAMEqss[2][2]; + int qss[2][2]; + int big_values[2][2]; + int sub_gain[2][2][3]; + + double xfsf[2][2][SBMAX_l]; + double xfsf_s[2][2][3 * SBMAX_s]; + + int over[2][2]; + double tot_noise[2][2]; + double max_noise[2][2]; + double over_noise[2][2]; + int over_SSD[2][2]; + int blocktype[2][2]; + int scalefac_scale[2][2]; + int preflag[2][2]; + int mpg123blocktype[2][2]; + int mixed[2][2]; + int mainbits[2][2]; + int sfbits[2][2]; + int LAMEmainbits[2][2]; + int LAMEsfbits[2][2]; + int framesize, stereo, js, ms_stereo, i_stereo, emph, bitrate, sampfreq, maindata; + int crc, padding; + int scfsi[2], mean_bits, resvsize; + int totbits; +}; +#ifndef plotting_data_defined +#define plotting_data_defined +typedef struct plotting_data plotting_data; +#endif +#if 0 +extern plotting_data *pinfo; +#endif +#endif diff --git a/library/src/main/cpp/lamemp3/lame.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.c similarity index 89% rename from library/src/main/cpp/lamemp3/lame.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.c index 65bb199..28541f6 100644 --- a/library/src/main/cpp/lamemp3/lame.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.c @@ -44,11 +44,9 @@ #include "bitstream.h" #include "quantize_pvt.h" #include "set_get.h" -#include "quantize.h" #include "psymodel.h" #include "version.h" #include "VbrTag.h" -#include "tables.h" #if defined(__FreeBSD__) && !defined(__alpha__) @@ -67,10 +65,8 @@ #define LAME_DEFAULT_QUALITY 3 - int -is_lame_global_flags_valid(const lame_global_flags * gfp) -{ +is_lame_global_flags_valid(const lame_global_flags *gfp) { if (gfp == NULL) return 0; if (gfp->class_id != LAME_ID) @@ -80,22 +76,19 @@ is_lame_global_flags_valid(const lame_global_flags * gfp) int -is_lame_internal_flags_valid(const lame_internal_flags * gfc) -{ +is_lame_internal_flags_valid(const lame_internal_flags *gfc) { if (gfc == NULL) return 0; if (gfc->class_id != LAME_ID) return 0; - if (gfc->lame_init_params_successful <=0) + if (gfc->lame_init_params_successful <= 0) return 0; return 1; } - -static FLOAT -filter_coef(FLOAT x) -{ +static FLOAT +filter_coef(FLOAT x) { if (x > 1.0) return 0.0; if (x <= 0.0) @@ -105,18 +98,17 @@ filter_coef(FLOAT x) } static void -lame_init_params_ppflt(lame_internal_flags * gfc) -{ +lame_init_params_ppflt(lame_internal_flags *gfc) { SessionConfig_t *const cfg = &gfc->cfg; /***************************************************************/ /* compute info needed for polyphase filter (filter type==0, default) */ /***************************************************************/ - int band, maxband, minband; - FLOAT freq; - int lowpass_band = 32; - int highpass_band = -1; + int band, maxband, minband; + FLOAT freq; + int lowpass_band = 32; + int highpass_band = -1; if (cfg->lowpass1 > 0) { minband = 999; @@ -135,8 +127,7 @@ lame_init_params_ppflt(lame_internal_flags * gfc) * the polyphase filter */ if (minband == 999) { cfg->lowpass1 = (lowpass_band - .75) / 31.0; - } - else { + } else { cfg->lowpass1 = (minband - .75) / 31.0; } cfg->lowpass2 = lowpass_band / 31.0; @@ -169,8 +160,7 @@ lame_init_params_ppflt(lame_internal_flags * gfc) cfg->highpass1 = highpass_band / 31.0; if (maxband == -1) { cfg->highpass2 = (highpass_band + .75) / 31.0; - } - else { + } else { cfg->highpass2 = (maxband + .75) / 31.0; } } @@ -180,14 +170,12 @@ lame_init_params_ppflt(lame_internal_flags * gfc) freq = band / 31.0f; if (cfg->highpass2 > cfg->highpass1) { fc1 = filter_coef((cfg->highpass2 - freq) / (cfg->highpass2 - cfg->highpass1 + 1e-20)); - } - else { + } else { fc1 = 1.0f; } if (cfg->lowpass2 > cfg->lowpass1) { - fc2 = filter_coef((freq - cfg->lowpass1) / (cfg->lowpass2 - cfg->lowpass1 + 1e-20)); - } - else { + fc2 = filter_coef((freq - cfg->lowpass1) / (cfg->lowpass2 - cfg->lowpass1 + 1e-20)); + } else { fc2 = 1.0f; } gfc->sv_enc.amp_filter[band] = fc1 * fc2; @@ -196,8 +184,7 @@ lame_init_params_ppflt(lame_internal_flags * gfc) static void -optimum_bandwidth(double *const lowerlimit, double *const upperlimit, const unsigned bitrate) -{ +optimum_bandwidth(double *const lowerlimit, double *const upperlimit, const unsigned bitrate) { /* * Input: * bitrate total bitrate in kbps @@ -206,24 +193,24 @@ optimum_bandwidth(double *const lowerlimit, double *const upperlimit, const unsi * lowerlimit: best lowpass frequency limit for input filter in Hz * upperlimit: best highpass frequency limit for input filter in Hz */ - int table_index; + int table_index; typedef struct { - int bitrate; /* only indicative value */ - int lowpass; + int bitrate; /* only indicative value */ + int lowpass; } band_pass_t; const band_pass_t freq_map[] = { - {8, 2000}, - {16, 3700}, - {24, 3900}, - {32, 5500}, - {40, 7000}, - {48, 7500}, - {56, 10000}, - {64, 11000}, - {80, 13500}, - {96, 15100}, + {8, 2000}, + {16, 3700}, + {24, 3900}, + {32, 5500}, + {40, 7000}, + {48, 7500}, + {56, 10000}, + {64, 11000}, + {80, 13500}, + {96, 15100}, {112, 15600}, {128, 17000}, {160, 17500}, @@ -276,14 +263,13 @@ optimum_bandwidth(double *const lowerlimit, double *const upperlimit, const unsi static int -optimum_samplefreq(int lowpassfreq, int input_samplefreq) -{ +optimum_samplefreq(int lowpassfreq, int input_samplefreq) { /* * Rules: * - if possible, sfb21 should NOT be used * */ - int suggested_samplefreq = 44100; + int suggested_samplefreq = 44100; if (input_samplefreq >= 48000) suggested_samplefreq = 48000; @@ -359,14 +345,10 @@ optimum_samplefreq(int lowpassfreq, int input_samplefreq) } - - - /* set internal feature flags. USER should not access these since * some combinations will produce strange results */ static void -lame_init_qval(lame_global_flags * gfp) -{ +lame_init_qval(lame_global_flags *gfp) { lame_internal_flags *const gfc = gfp->internal_flags; SessionConfig_t *const cfg = &gfc->cfg; @@ -390,7 +372,7 @@ lame_init_qval(lame_global_flags * gfp) cfg->use_best_huffman = 0; cfg->full_outer_loop = 0; if (cfg->vbr == vbr_mt || cfg->vbr == vbr_mtrh) { - cfg->full_outer_loop = -1; + cfg->full_outer_loop = -1; } break; @@ -482,15 +464,12 @@ lame_init_qval(lame_global_flags * gfp) } - static double -linear_int(double a, double b, double m) -{ +linear_int(double a, double b, double m) { return a + m * (b - a); } - /******************************************************************** * initialize internal params based on data in gf * (globalflags struct filled in by calling program) @@ -540,11 +519,10 @@ linear_int(double a, double b, double m) * ********************************************************************/ int -lame_init_params(lame_global_flags * gfp) -{ +lame_init_params(lame_global_flags *gfp) { - int i; - int j; + int i; + int j; lame_internal_flags *gfc; SessionConfig_t *cfg; @@ -567,7 +545,7 @@ lame_init_params(lame_global_flags * gfp) if (gfp->num_channels < 1 || 2 < gfp->num_channels) return -1; /* number of input channels makes no sense */ if (gfp->samplerate_out != 0) { - int v=0; + int v = 0; if (SmpFrqIndex(gfp->samplerate_out, &v) < 0) return -1; /* output sample rate makes no sense */ } @@ -601,8 +579,7 @@ lame_init_params(lame_global_flags * gfp) if (gfp->asm_optimizations.sse) { gfc->CPU_features.SSE = has_SSE(); gfc->CPU_features.SSE2 = has_SSE2(); - } - else { + } else { gfc->CPU_features.SSE = 0; gfc->CPU_features.SSE2 = 0; } @@ -649,7 +626,8 @@ lame_init_params(lame_global_flags * gfp) if (cfg->vbr == vbr_off && gfp->compression_ratio > 0) { if (gfp->samplerate_out == 0) - gfp->samplerate_out = map2MP3Frequency((int) (0.97 * gfp->samplerate_in)); /* round up with a margin of 3% */ + gfp->samplerate_out = map2MP3Frequency( + (int) (0.97 * gfp->samplerate_in)); /* round up with a margin of 3% */ /* choose a bitrate for the output samplerate which achieves * specified compression ratio @@ -658,7 +636,7 @@ lame_init_params(lame_global_flags * gfp) /* we need the version for the bitrate table look up */ cfg->samplerate_index = SmpFrqIndex(gfp->samplerate_out, &cfg->version); - assert(cfg->samplerate_index >=0); + assert(cfg->samplerate_index >= 0); if (!cfg->free_format) /* for non Free Format find the nearest allowed bitrate */ gfp->brate = FindNearestBitrate(gfp->brate, cfg->version, gfp->samplerate_out); @@ -667,12 +645,10 @@ lame_init_params(lame_global_flags * gfp) if (gfp->samplerate_out < 16000) { gfp->VBR_mean_bitrate_kbps = Max(gfp->VBR_mean_bitrate_kbps, 8); gfp->VBR_mean_bitrate_kbps = Min(gfp->VBR_mean_bitrate_kbps, 64); - } - else if (gfp->samplerate_out < 32000) { + } else if (gfp->samplerate_out < 32000) { gfp->VBR_mean_bitrate_kbps = Max(gfp->VBR_mean_bitrate_kbps, 8); gfp->VBR_mean_bitrate_kbps = Min(gfp->VBR_mean_bitrate_kbps, 160); - } - else { + } else { gfp->VBR_mean_bitrate_kbps = Max(gfp->VBR_mean_bitrate_kbps, 32); gfp->VBR_mean_bitrate_kbps = Min(gfp->VBR_mean_bitrate_kbps, 320); } @@ -681,33 +657,37 @@ lame_init_params(lame_global_flags * gfp) /* mapping VBR scale to internal VBR quality settings */ if (gfp->samplerate_out == 0 && (cfg->vbr == vbr_mt || cfg->vbr == vbr_mtrh)) { float const qval = gfp->VBR_q + gfp->VBR_q_frac; - struct q_map { int sr_a; float qa, qb, ta, tb; int lp; }; + struct q_map { + int sr_a; + float qa, qb, ta, tb; + int lp; + }; struct q_map const m[9] - = { {48000, 0.0,6.5, 0.0,6.5, 23700} - , {44100, 0.0,6.5, 0.0,6.5, 21780} - , {32000, 6.5,8.0, 5.2,6.5, 15800} - , {24000, 8.0,8.5, 5.2,6.0, 11850} - , {22050, 8.5,9.01, 5.2,6.5, 10892} - , {16000, 9.01,9.4, 4.9,6.5, 7903} - , {12000, 9.4,9.6, 4.5,6.0, 5928} - , {11025, 9.6,9.9, 5.1,6.5, 5446} - , { 8000, 9.9,10., 4.9,6.5, 3952} + = {{48000, 0.0, 6.5, 0.0, 6.5, 23700}, + {44100, 0.0, 6.5, 0.0, 6.5, 21780}, + {32000, 6.5, 8.0, 5.2, 6.5, 15800}, + {24000, 8.0, 8.5, 5.2, 6.0, 11850}, + {22050, 8.5, 9.01, 5.2, 6.5, 10892}, + {16000, 9.01, 9.4, 4.9, 6.5, 7903}, + {12000, 9.4, 9.6, 4.5, 6.0, 5928}, + {11025, 9.6, 9.9, 5.1, 6.5, 5446}, + {8000, 9.9, 10., 4.9, 6.5, 3952} }; for (i = 2; i < 9; ++i) { if (gfp->samplerate_in == m[i].sr_a) { if (qval < m[i].qa) { double d = qval / m[i].qa; d = d * m[i].ta; - gfp->VBR_q = (int)d; + gfp->VBR_q = (int) d; gfp->VBR_q_frac = d - gfp->VBR_q; } } if (gfp->samplerate_in >= m[i].sr_a) { if (m[i].qa <= qval && qval < m[i].qb) { - float const q_ = m[i].qb-m[i].qa; - float const t_ = m[i].tb-m[i].ta; - double d = m[i].ta + t_ * (qval-m[i].qa) / q_; - gfp->VBR_q = (int)d; + float const q_ = m[i].qb - m[i].qa; + float const t_ = m[i].tb - m[i].ta; + double d = m[i].ta + t_ * (qval - m[i].qa) / q_; + gfp->VBR_q = (int) d; gfp->VBR_q_frac = d - gfp->VBR_q; gfp->samplerate_out = m[i].sr_a; if (gfp->lowpassfreq == 0) { @@ -723,54 +703,51 @@ lame_init_params(lame_global_flags * gfp) /* if a filter has not been enabled, see if we should add one: */ /****************************************************************/ if (gfp->lowpassfreq == 0) { - double lowpass = 16000; - double highpass; + double lowpass = 16000; + double highpass; switch (cfg->vbr) { - case vbr_off:{ + case vbr_off: { optimum_bandwidth(&lowpass, &highpass, gfp->brate); break; } - case vbr_abr:{ + case vbr_abr: { optimum_bandwidth(&lowpass, &highpass, gfp->VBR_mean_bitrate_kbps); break; } - case vbr_rh:{ + case vbr_rh: { int const x[11] = { 19500, 19000, 18600, 18000, 17500, 16000, 15600, 14900, 12500, 10000, 3950 }; if (0 <= gfp->VBR_q && gfp->VBR_q <= 9) { - double a = x[gfp->VBR_q], b = x[gfp->VBR_q + 1], m = gfp->VBR_q_frac; + double a = x[gfp->VBR_q], b = x[gfp->VBR_q + 1], m = gfp->VBR_q_frac; lowpass = linear_int(a, b, m); - } - else { + } else { lowpass = 19500; } break; } case vbr_mtrh: - case vbr_mt:{ + case vbr_mt: { int const x[11] = { 24000, 19500, 18500, 18000, 17500, 17000, 16500, 15600, 15200, 7230, 3950 }; if (0 <= gfp->VBR_q && gfp->VBR_q <= 9) { - double a = x[gfp->VBR_q], b = x[gfp->VBR_q + 1], m = gfp->VBR_q_frac; + double a = x[gfp->VBR_q], b = x[gfp->VBR_q + 1], m = gfp->VBR_q_frac; lowpass = linear_int(a, b, m); - } - else { + } else { lowpass = 21500; } break; } - default:{ + default: { int const x[11] = { 19500, 19000, 18500, 18000, 17500, 16500, 15500, 14500, 12500, 9500, 3950 }; if (0 <= gfp->VBR_q && gfp->VBR_q <= 9) { - double a = x[gfp->VBR_q], b = x[gfp->VBR_q + 1], m = gfp->VBR_q_frac; + double a = x[gfp->VBR_q], b = x[gfp->VBR_q + 1], m = gfp->VBR_q_frac; lowpass = linear_int(a, b, m); - } - else { + } else { lowpass = 19500; } } @@ -790,8 +767,7 @@ lame_init_params(lame_global_flags * gfp) } if (cfg->vbr == vbr_mt || cfg->vbr == vbr_mtrh) { gfp->lowpassfreq = Min(24000, gfp->lowpassfreq); - } - else { + } else { gfp->lowpassfreq = Min(20500, gfp->lowpassfreq); } gfp->lowpassfreq = Min(gfp->samplerate_out / 2, gfp->lowpassfreq); @@ -843,19 +819,20 @@ lame_init_params(lame_global_flags * gfp) switch (cfg->vbr) { case vbr_mt: case vbr_rh: - case vbr_mtrh: - { + case vbr_mtrh: { /*numbers are a bit strange, but they determine the lowpass value */ - FLOAT const cmp[] = { 5.7, 6.5, 7.3, 8.2, 10, 11.9, 13, 14, 15, 16.5 }; + FLOAT const cmp[] = {5.7, 6.5, 7.3, 8.2, 10, 11.9, 13, 14, 15, 16.5}; gfp->compression_ratio = cmp[gfp->VBR_q]; } break; case vbr_abr: gfp->compression_ratio = - cfg->samplerate_out * 16 * cfg->channels_out / (1.e3 * gfp->VBR_mean_bitrate_kbps); + cfg->samplerate_out * 16 * cfg->channels_out / + (1.e3 * gfp->VBR_mean_bitrate_kbps); break; default: - gfp->compression_ratio = cfg->samplerate_out * 16 * cfg->channels_out / (1.e3 * gfp->brate); + gfp->compression_ratio = + cfg->samplerate_out * 16 * cfg->channels_out / (1.e3 * gfp->brate); break; } @@ -882,22 +859,20 @@ lame_init_params(lame_global_flags * gfp) cfg->highpass1 /= cfg->samplerate_out; cfg->highpass2 /= cfg->samplerate_out; - } - else { + } else { cfg->highpass1 = 0; cfg->highpass2 = 0; } /* apply user driven low pass filter */ cfg->lowpass1 = 0; cfg->lowpass2 = 0; - if (cfg->lowpassfreq > 0 && cfg->lowpassfreq < (cfg->samplerate_out / 2) ) { + if (cfg->lowpassfreq > 0 && cfg->lowpassfreq < (cfg->samplerate_out / 2)) { cfg->lowpass2 = 2. * cfg->lowpassfreq; if (gfp->lowpasswidth >= 0) { cfg->lowpass1 = 2. * (cfg->lowpassfreq - gfp->lowpasswidth); if (cfg->lowpass1 < 0) /* has to be >= 0 */ cfg->lowpass1 = 0; - } - else { /* 0% below on default */ + } else { /* 0% below on default */ cfg->lowpass1 = (1 - 0.00) * 2. * cfg->lowpassfreq; } cfg->lowpass1 /= cfg->samplerate_out; @@ -922,8 +897,7 @@ lame_init_params(lame_global_flags * gfp) if (cfg->vbr == vbr_off) { if (cfg->free_format) { gfc->ov_enc.bitrate_index = 0; - } - else { + } else { gfp->brate = FindNearestBitrate(gfp->brate, cfg->version, cfg->samplerate_out); gfc->ov_enc.bitrate_index = BitrateIndex(gfp->brate, cfg->version, cfg->samplerate_out); if (gfc->ov_enc.bitrate_index <= 0) { @@ -934,8 +908,7 @@ lame_init_params(lame_global_flags * gfp) gfc->ov_enc.bitrate_index = 8; } } - } - else { + } else { gfc->ov_enc.bitrate_index = 1; } @@ -972,7 +945,7 @@ lame_init_params(lame_global_flags * gfp) cfg->sideinfo_len += 2; { - int k; + int k; for (k = 0; k < 19; k++) gfc->sv_enc.pefirbuf[k] = 700 * cfg->mode_gr * cfg->channels_out; @@ -987,7 +960,7 @@ lame_init_params(lame_global_flags * gfp) switch (cfg->vbr) { case vbr_mt: - case vbr_mtrh:{ + case vbr_mtrh: { if (gfp->strict_ISO < 0) { gfp->strict_ISO = MDB_MAXIMUM; } @@ -1018,7 +991,7 @@ lame_init_params(lame_global_flags * gfp) break; } - case vbr_rh:{ + case vbr_rh: { (void) apply_preset(gfp, 500 - (gfp->VBR_q * 10), 0); @@ -1084,7 +1057,8 @@ lame_init_params(lame_global_flags * gfp) cfg->vbr_max_bitrate_index = 8; /* default: allow 64 kbps (MPEG-2.5) */ if (gfp->VBR_min_bitrate_kbps) { gfp->VBR_min_bitrate_kbps = - FindNearestBitrate(gfp->VBR_min_bitrate_kbps, cfg->version, cfg->samplerate_out); + FindNearestBitrate(gfp->VBR_min_bitrate_kbps, cfg->version, + cfg->samplerate_out); cfg->vbr_min_bitrate_index = BitrateIndex(gfp->VBR_min_bitrate_kbps, cfg->version, cfg->samplerate_out); if (cfg->vbr_min_bitrate_index < 0) { @@ -1097,7 +1071,8 @@ lame_init_params(lame_global_flags * gfp) } if (gfp->VBR_max_bitrate_kbps) { gfp->VBR_max_bitrate_kbps = - FindNearestBitrate(gfp->VBR_max_bitrate_kbps, cfg->version, cfg->samplerate_out); + FindNearestBitrate(gfp->VBR_max_bitrate_kbps, cfg->version, + cfg->samplerate_out); cfg->vbr_max_bitrate_index = BitrateIndex(gfp->VBR_max_bitrate_kbps, cfg->version, cfg->samplerate_out); if (cfg->vbr_max_bitrate_index < 0) { @@ -1190,7 +1165,7 @@ lame_init_params(lame_global_flags * gfp) cfg->interChRatio = gfp->interChRatio; cfg->msfix = gfp->msfix; - cfg->ATH_offset_db = 0-gfp->ATH_lower_db; + cfg->ATH_offset_db = 0 - gfp->ATH_lower_db; cfg->ATH_offset_factor = powf(10.f, cfg->ATH_offset_db * 0.1f); cfg->ATHcurve = gfp->ATHcurve; cfg->ATHtype = gfp->ATHtype; @@ -1204,8 +1179,7 @@ lame_init_params(lame_global_flags * gfp) cfg->use_temporal_masking_effect = gfp->useTemporal; if (cfg->mode == JOINT_STEREO) { cfg->use_safe_joint_stereo = gfp->exp_nspsytune & 2; - } - else { + } else { cfg->use_safe_joint_stereo = 0; } { @@ -1237,7 +1211,8 @@ lame_init_params(lame_global_flags * gfp) * user defined re-scaling, and or two-to-one channel downmix. */ { - FLOAT m[2][2] = { {1.0f, 0.0f}, {0.0f, 1.0f} }; + FLOAT m[2][2] = {{1.0f, 0.0f}, + {0.0f, 1.0f}}; /* user selected scaling of the samples */ m[0][0] *= gfp->scale; @@ -1318,8 +1293,7 @@ lame_init_params(lame_global_flags * gfp) } static void -concatSep(char* dest, char const* sep, char const* str) -{ +concatSep(char *dest, char const *sep, char const *str) { if (*dest != 0) strcat(dest, sep); strcat(dest, str); } @@ -1334,8 +1308,7 @@ concatSep(char* dest, char const* sep, char const* str) */ void -lame_print_config(const lame_global_flags * gfp) -{ +lame_print_config(const lame_global_flags *gfp) { lame_internal_flags const *const gfc = gfp->internal_flags; SessionConfig_t const *const cfg = &gfc->cfg; double const out_samplerate = cfg->samplerate_out; @@ -1348,8 +1321,8 @@ lame_print_config(const lame_global_flags * gfp) #endif if (gfc->CPU_features.MMX || gfc->CPU_features.AMD_3DNow || gfc->CPU_features.SSE || gfc->CPU_features.SSE2) { - char text[256] = { 0 }; - int fft_asm_used = 0; + char text[256] = {0}; + int fft_asm_used = 0; #ifdef HAVE_NASM if (gfc->CPU_features.AMD_3DNow) { fft_asm_used = 1; @@ -1404,8 +1377,7 @@ lame_print_config(const lame_global_flags * gfp) MSGF(gfc, "Using polyphase lowpass filter, transition band: %5.0f Hz - %5.0f Hz\n", 0.5 * cfg->lowpass1 * out_samplerate, 0.5 * cfg->lowpass2 * out_samplerate); - } - else { + } else { MSGF(gfc, "polyphase lowpass filter disabled\n"); } @@ -1425,8 +1397,7 @@ lame_print_config(const lame_global_flags * gfp) * add more, if you see more... */ void -lame_print_internals(const lame_global_flags * gfp) -{ +lame_print_internals(const lame_global_flags *gfp) { lame_internal_flags const *const gfc = gfp->internal_flags; SessionConfig_t const *const cfg = &gfc->cfg; const char *pc = ""; @@ -1598,8 +1569,7 @@ lame_print_internals(const lame_global_flags * gfp) static void -save_gain_values(lame_internal_flags * gfc) -{ +save_gain_values(lame_internal_flags *gfc) { SessionConfig_t const *const cfg = &gfc->cfg; RpgStateVar_t const *const rsv = &gfc->sv_rpg; RpgResult_t *const rov = &gfc->ov_rpg; @@ -1608,29 +1578,27 @@ save_gain_values(lame_internal_flags * gfc) FLOAT const RadioGain = (FLOAT) GetTitleGain(rsv->rgdata); if (NEQ(RadioGain, GAIN_NOT_ENOUGH_SAMPLES)) { rov->RadioGain = (int) floor(RadioGain * 10.0 + 0.5); /* round to nearest */ - } - else { + } else { rov->RadioGain = 0; } } /* find the gain and scale change required for no clipping */ if (cfg->findPeakSample) { - rov->noclipGainChange = (int) ceil(log10(rov->PeakSample / 32767.0) * 20.0 * 10.0); /* round up */ + rov->noclipGainChange = (int) ceil( + log10(rov->PeakSample / 32767.0) * 20.0 * 10.0); /* round up */ if (rov->noclipGainChange > 0) { /* clipping occurs */ - rov->noclipScale = floor((32767.0f / rov->PeakSample) * 100.0f) / 100.0f; /* round down */ - } - else /* no clipping */ + rov->noclipScale = + floor((32767.0f / rov->PeakSample) * 100.0f) / 100.0f; /* round down */ + } else /* no clipping */ rov->noclipScale = -1.0f; } } - static int -update_inbuffer_size(lame_internal_flags * gfc, const int nsamples) -{ +update_inbuffer_size(lame_internal_flags *gfc, const int nsamples) { EncStateVar_t *const esv = &gfc->sv_enc; if (esv->in_buffer_0 == 0 || esv->in_buffer_nsamples < nsamples) { if (esv->in_buffer_0) { @@ -1661,10 +1629,9 @@ update_inbuffer_size(lame_internal_flags * gfc, const int nsamples) static int -calcNeeded(SessionConfig_t const * cfg) -{ - int mf_needed; - int pcm_samples_per_frame = 576 * cfg->mode_gr; +calcNeeded(SessionConfig_t const *cfg) { + int mf_needed; + int pcm_samples_per_frame = 576 * cfg->mode_gr; /* some sanity checks */ #if ENCDELAY < MDCTDELAY @@ -1705,14 +1672,13 @@ calcNeeded(SessionConfig_t const * cfg) * etc... depending on what type of data they are working with. */ static int -lame_encode_buffer_sample_t(lame_internal_flags * gfc, - int nsamples, unsigned char *mp3buf, const int mp3buf_size) -{ +lame_encode_buffer_sample_t(lame_internal_flags *gfc, + int nsamples, unsigned char *mp3buf, const int mp3buf_size) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - int pcm_samples_per_frame = 576 * cfg->mode_gr; - int mp3size = 0, ret, i, ch, mf_needed; - int mp3out; + int pcm_samples_per_frame = 576 * cfg->mode_gr; + int mp3size = 0, ret, i, ch, mf_needed; + int mp3out; sample_t *mfbuf[2]; sample_t *in_buffer[2]; @@ -1742,8 +1708,8 @@ lame_encode_buffer_sample_t(lame_internal_flags * gfc, while (nsamples > 0) { sample_t const *in_buffer_ptr[2]; - int n_in = 0; /* number of input samples processed with fill_buffer */ - int n_out = 0; /* number of samples output with fill_buffer */ + int n_in = 0; /* number of input samples processed with fill_buffer */ + int n_out = 0; /* number of samples output with fill_buffer */ /* n_in <> n_out if we are resampling */ in_buffer_ptr[0] = in_buffer[0]; @@ -1754,7 +1720,8 @@ lame_encode_buffer_sample_t(lame_internal_flags * gfc, /* compute ReplayGain of resampled input if requested */ if (cfg->findReplayGain && !cfg->decode_on_the_fly) if (AnalyzeSamples - (gfc->sv_rpg.rgdata, &mfbuf[0][esv->mf_size], &mfbuf[1][esv->mf_size], n_out, + (gfc->sv_rpg.rgdata, &mfbuf[0][esv->mf_size], &mfbuf[1][esv->mf_size], + n_out, cfg->channels_out) == GAIN_ANALYSIS_ERROR) return -6; @@ -1789,7 +1756,7 @@ lame_encode_buffer_sample_t(lame_internal_flags * gfc, /* mp3size = size of data written to buffer so far */ /* mp3buf_size-mp3size = amount of space avalable */ - int buf_size = mp3buf_size - mp3size; + int buf_size = mp3buf_size - mp3size; if (mp3buf_size == 0) buf_size = INT_MAX; @@ -1813,24 +1780,19 @@ lame_encode_buffer_sample_t(lame_internal_flags * gfc, return mp3size; } -enum PCMSampleType -{ pcm_short_type - , pcm_int_type - , pcm_long_type - , pcm_float_type - , pcm_double_type +enum PCMSampleType { + pcm_short_type, pcm_int_type, pcm_long_type, pcm_float_type, pcm_double_type }; static void -lame_copy_inbuffer(lame_internal_flags* gfc, - void const* l, void const* r, int nsamples, - enum PCMSampleType pcm_type, int jump, FLOAT s) -{ +lame_copy_inbuffer(lame_internal_flags *gfc, + void const *l, void const *r, int nsamples, + enum PCMSampleType pcm_type, int jump, FLOAT s) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - sample_t* ib0 = esv->in_buffer_0; - sample_t* ib1 = esv->in_buffer_1; - FLOAT m[2][2]; + sample_t *ib0 = esv->in_buffer_0; + sample_t *ib1 = esv->in_buffer_1; + FLOAT m[2][2]; /* Apply user defined re-scaling */ m[0][0] = s * cfg->pcm_transform[0][0]; @@ -1854,31 +1816,26 @@ lame_copy_inbuffer(lame_internal_flags* gfc, br += jump; \ } \ } - switch ( pcm_type ) { - case pcm_short_type: - COPY_AND_TRANSFORM(short int); + switch (pcm_type) { + case pcm_short_type: COPY_AND_TRANSFORM(short int); break; - case pcm_int_type: - COPY_AND_TRANSFORM(int); + case pcm_int_type: COPY_AND_TRANSFORM(int); break; - case pcm_long_type: - COPY_AND_TRANSFORM(long int); + case pcm_long_type: COPY_AND_TRANSFORM(long int); break; - case pcm_float_type: - COPY_AND_TRANSFORM(float); + case pcm_float_type: COPY_AND_TRANSFORM(float); break; - case pcm_double_type: - COPY_AND_TRANSFORM(double); + case pcm_double_type: COPY_AND_TRANSFORM(double); break; } } static int -lame_encode_buffer_template(lame_global_flags * gfp, - void const* buffer_l, void const* buffer_r, const int nsamples, - unsigned char *mp3buf, const int mp3buf_size, enum PCMSampleType pcm_type, int aa, FLOAT norm) -{ +lame_encode_buffer_template(lame_global_flags *gfp, + void const *buffer_l, void const *buffer_r, const int nsamples, + unsigned char *mp3buf, const int mp3buf_size, + enum PCMSampleType pcm_type, int aa, FLOAT norm) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -1896,8 +1853,7 @@ lame_encode_buffer_template(lame_global_flags * gfp, return 0; } lame_copy_inbuffer(gfc, buffer_l, buffer_r, nsamples, pcm_type, aa, norm); - } - else { + } else { if (buffer_l == 0) { return 0; } @@ -1911,120 +1867,117 @@ lame_encode_buffer_template(lame_global_flags * gfp, } int -lame_encode_buffer(lame_global_flags * gfp, +lame_encode_buffer(lame_global_flags *gfp, const short int pcm_l[], const short int pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_short_type, 1, 1.0); + unsigned char *mp3buf, const int mp3buf_size) { + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_short_type, 1, 1.0); } int -lame_encode_buffer_float(lame_global_flags * gfp, +lame_encode_buffer_float(lame_global_flags *gfp, const float pcm_l[], const float pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- 32768 for full scale */ - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_float_type, 1, 1.0); + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_float_type, 1, 1.0); } int lame_encode_buffer_ieee_float(lame_t gfp, const float pcm_l[], const float pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- 1.0 for full scale */ - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_float_type, 1, 32767.0); + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_float_type, 1, 32767.0); } int lame_encode_buffer_interleaved_ieee_float(lame_t gfp, const float pcm[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- 1.0 for full scale */ - return lame_encode_buffer_template(gfp, pcm, pcm+1, nsamples, mp3buf, mp3buf_size, pcm_float_type, 2, 32767.0); + return lame_encode_buffer_template(gfp, pcm, pcm + 1, nsamples, mp3buf, mp3buf_size, + pcm_float_type, 2, 32767.0); } int lame_encode_buffer_ieee_double(lame_t gfp, const double pcm_l[], const double pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- 1.0 for full scale */ - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_double_type, 1, 32767.0); + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_double_type, 1, 32767.0); } int lame_encode_buffer_interleaved_ieee_double(lame_t gfp, const double pcm[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- 1.0 for full scale */ - return lame_encode_buffer_template(gfp, pcm, pcm+1, nsamples, mp3buf, mp3buf_size, pcm_double_type, 2, 32767.0); + return lame_encode_buffer_template(gfp, pcm, pcm + 1, nsamples, mp3buf, mp3buf_size, + pcm_double_type, 2, 32767.0); } int -lame_encode_buffer_int(lame_global_flags * gfp, +lame_encode_buffer_int(lame_global_flags *gfp, const int pcm_l[], const int pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- MAX_INT for full scale */ FLOAT const norm = (1.0 / (1L << (8 * sizeof(int) - 16))); - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_int_type, 1, norm); + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_int_type, 1, norm); } int -lame_encode_buffer_long2(lame_global_flags * gfp, - const long pcm_l[], const long pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ +lame_encode_buffer_long2(lame_global_flags *gfp, + const long pcm_l[], const long pcm_r[], const int nsamples, + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- MAX_LONG for full scale */ FLOAT const norm = (1.0 / (1L << (8 * sizeof(long) - 16))); - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_long_type, 1, norm); + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_long_type, 1, norm); } int -lame_encode_buffer_long(lame_global_flags * gfp, +lame_encode_buffer_long(lame_global_flags *gfp, const long pcm_l[], const long pcm_r[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- 32768 for full scale */ - return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_long_type, 1, 1.0); + return lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, + pcm_long_type, 1, 1.0); } - int -lame_encode_buffer_interleaved(lame_global_flags * gfp, +lame_encode_buffer_interleaved(lame_global_flags *gfp, short int pcm[], int nsamples, - unsigned char *mp3buf, int mp3buf_size) -{ + unsigned char *mp3buf, int mp3buf_size) { /* input is assumed to be normalized to +/- MAX_SHORT for full scale */ - return lame_encode_buffer_template(gfp, pcm, pcm+1, nsamples, mp3buf, mp3buf_size, pcm_short_type, 2, 1.0); + return lame_encode_buffer_template(gfp, pcm, pcm + 1, nsamples, mp3buf, mp3buf_size, + pcm_short_type, 2, 1.0); } int lame_encode_buffer_interleaved_int(lame_t gfp, const int pcm[], const int nsamples, - unsigned char *mp3buf, const int mp3buf_size) -{ + unsigned char *mp3buf, const int mp3buf_size) { /* input is assumed to be normalized to +/- MAX(int) for full scale */ - FLOAT const norm = (1.0 / (1L << (8 * sizeof(int)-16))); - return lame_encode_buffer_template(gfp, pcm, pcm + 1, nsamples, mp3buf, mp3buf_size, pcm_int_type, 2, norm); + FLOAT const norm = (1.0 / (1L << (8 * sizeof(int) - 16))); + return lame_encode_buffer_template(gfp, pcm, pcm + 1, nsamples, mp3buf, mp3buf_size, + pcm_int_type, 2, norm); } - - /***************************************************************** Flush mp3 buffer, pad with ancillary data so last frame is complete. Reset reservoir size to 0 @@ -2035,9 +1988,8 @@ lame_encode_buffer_interleaved_int(lame_t gfp, with no errors. *********************************************************************/ int -lame_encode_flush_nogap(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buffer_size) -{ - int rc = -3; +lame_encode_flush_nogap(lame_global_flags *gfp, unsigned char *mp3buffer, int mp3buffer_size) { + int rc = -3; if (is_lame_global_flags_valid(gfp)) { lame_internal_flags *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2056,8 +2008,7 @@ lame_encode_flush_nogap(lame_global_flags * gfp, unsigned char *mp3buffer, int m /* called by lame_init_params. You can also call this after flush_nogap if you want to write new id3v2 and Xing VBR tags into the bitstream */ int -lame_init_bitstream(lame_global_flags * gfp) -{ +lame_init_bitstream(lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags *const gfc = gfp->internal_flags; if (gfc != 0) { @@ -2092,23 +2043,22 @@ lame_init_bitstream(lame_global_flags * gfp) /*****************************************************************/ int -lame_encode_flush(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buffer_size) -{ +lame_encode_flush(lame_global_flags *gfp, unsigned char *mp3buffer, int mp3buffer_size) { lame_internal_flags *gfc; SessionConfig_t const *cfg; EncStateVar_t *esv; short int buffer[2][1152]; - int imp3 = 0, mp3count, mp3buffer_size_remaining; + int imp3 = 0, mp3count, mp3buffer_size_remaining; /* we always add POSTDELAY=288 padding to make sure granule with real * data can be complety decoded (because of 50% overlap with next granule */ - int end_padding; - int frames_left; - int samples_to_encode; - int pcm_samples_per_frame; - int mf_needed; - int is_resampling_necessary; - double resample_ratio = 1; + int end_padding; + int frames_left; + int samples_to_encode; + int pcm_samples_per_frame; + int mf_needed; + int is_resampling_necessary; + double resample_ratio = 1; if (!is_lame_global_flags_valid(gfp)) { return -3; @@ -2134,7 +2084,7 @@ lame_encode_flush(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buff is_resampling_necessary = isResamplingNecessary(cfg); if (is_resampling_necessary) { - resample_ratio = (double)cfg->samplerate_in / (double)cfg->samplerate_out; + resample_ratio = (double) cfg->samplerate_in / (double) cfg->samplerate_out; /* delay due to resampling; needs to be fixed, if resampling code gets changed */ samples_to_encode += 16. / resample_ratio; } @@ -2146,7 +2096,7 @@ lame_encode_flush(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buff frames_left = (samples_to_encode + end_padding) / pcm_samples_per_frame; while (frames_left > 0 && imp3 >= 0) { int const frame_num = gfc->ov_enc.frame_number; - int bunch = mf_needed - esv->mf_size; + int bunch = mf_needed - esv->mf_size; bunch *= resample_ratio; if (bunch > 1152) bunch = 1152; @@ -2171,7 +2121,7 @@ lame_encode_flush(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buff */ int const new_frames = gfc->ov_enc.frame_number - frame_num; if (new_frames > 0) - frames_left -= new_frames; + frames_left -= new_frames; } } /* Set esv->mf_samples_to_encode to 0, so we may detect @@ -2242,9 +2192,8 @@ lame_encode_flush(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buff ***********************************************************************/ int -lame_close(lame_global_flags * gfp) -{ - int ret = 0; +lame_close(lame_global_flags *gfp) { + int ret = 0; if (gfp && gfp->class_id == LAME_ID) { lame_internal_flags *const gfc = gfp->internal_flags; gfp->class_id = 0; @@ -2270,14 +2219,15 @@ lame_close(lame_global_flags * gfp) /* flush internal mp3 buffers, and free internal buffers */ /*****************************************************************/ #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED + int CDECL -lame_encode_finish(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buffer_size); +lame_encode_finish(lame_global_flags *gfp, unsigned char *mp3buffer, int mp3buffer_size); + #else #endif int -lame_encode_finish(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buffer_size) -{ +lame_encode_finish(lame_global_flags *gfp, unsigned char *mp3buffer, int mp3buffer_size) { int const ret = lame_encode_flush(gfp, mp3buffer, mp3buffer_size); (void) lame_close(gfp); @@ -2288,11 +2238,10 @@ lame_encode_finish(lame_global_flags * gfp, unsigned char *mp3buffer, int mp3buf /*****************************************************************/ /* write VBR Xing header, and ID3 version 1 tag, if asked for */ /*****************************************************************/ -void lame_mp3_tags_fid(lame_global_flags * gfp, FILE * fpStream); +void lame_mp3_tags_fid(lame_global_flags *gfp, FILE *fpStream); void -lame_mp3_tags_fid(lame_global_flags * gfp, FILE * fpStream) -{ +lame_mp3_tags_fid(lame_global_flags *gfp, FILE *fpStream) { lame_internal_flags *gfc; SessionConfig_t const *cfg; if (!is_lame_global_flags_valid(gfp)) { @@ -2308,7 +2257,7 @@ lame_mp3_tags_fid(lame_global_flags * gfp, FILE * fpStream) } /* Write Xing header again */ if (fpStream && !fseek(fpStream, 0, SEEK_SET)) { - int rc = PutVbrTag(gfp, fpStream); + int rc = PutVbrTag(gfp, fpStream); switch (rc) { default: /* OK */ @@ -2331,8 +2280,7 @@ lame_mp3_tags_fid(lame_global_flags * gfp, FILE * fpStream) static int -lame_init_internal_flags(lame_internal_flags* gfc) -{ +lame_init_internal_flags(lame_internal_flags *gfc) { if (NULL == gfc) return -1; @@ -2380,12 +2328,12 @@ lame_init_internal_flags(lame_internal_flags* gfc) /* initialize mp3 encoder */ #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED + static #else #endif int -lame_init_old(lame_global_flags * gfp) -{ +lame_init_old(lame_global_flags *gfp) { disable_FPE(); /* disable floating point exceptions */ memset(gfp, 0, sizeof(lame_global_flags)); @@ -2470,10 +2418,9 @@ lame_init_old(lame_global_flags * gfp) lame_global_flags * -lame_init(void) -{ +lame_init(void) { lame_global_flags *gfp; - int ret; + int ret; init_log_table(); @@ -2519,19 +2466,17 @@ lame_init(void) */ void -lame_bitrate_kbps(const lame_global_flags * gfp, int bitrate_kbps[14]) -{ +lame_bitrate_kbps(const lame_global_flags *gfp, int bitrate_kbps[14]) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { SessionConfig_t const *const cfg = &gfc->cfg; - int i; + int i; if (cfg->free_format) { for (i = 0; i < 14; i++) bitrate_kbps[i] = -1; bitrate_kbps[0] = cfg->avg_bitrate; - } - else { + } else { for (i = 0; i < 14; i++) bitrate_kbps[i] = bitrate_table[cfg->version][i + 1]; } @@ -2541,22 +2486,20 @@ lame_bitrate_kbps(const lame_global_flags * gfp, int bitrate_kbps[14]) void -lame_bitrate_hist(const lame_global_flags * gfp, int bitrate_count[14]) -{ +lame_bitrate_hist(const lame_global_flags *gfp, int bitrate_count[14]) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t const *const eov = &gfc->ov_enc; - int i; + int i; if (cfg->free_format) { for (i = 0; i < 14; i++) { bitrate_count[i] = 0; } bitrate_count[0] = eov->bitrate_channelmode_hist[0][4]; - } - else { + } else { for (i = 0; i < 14; i++) { bitrate_count[i] = eov->bitrate_channelmode_hist[i + 1][4]; } @@ -2567,13 +2510,12 @@ lame_bitrate_hist(const lame_global_flags * gfp, int bitrate_count[14]) void -lame_stereo_mode_hist(const lame_global_flags * gfp, int stmode_count[4]) -{ +lame_stereo_mode_hist(const lame_global_flags *gfp, int stmode_count[4]) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { EncResult_t const *const eov = &gfc->ov_enc; - int i; + int i; for (i = 0; i < 4; i++) { stmode_count[i] = eov->bitrate_channelmode_hist[15][i]; @@ -2583,17 +2525,15 @@ lame_stereo_mode_hist(const lame_global_flags * gfp, int stmode_count[4]) } - void -lame_bitrate_stereo_mode_hist(const lame_global_flags * gfp, int bitrate_stmode_count[14][4]) -{ +lame_bitrate_stereo_mode_hist(const lame_global_flags *gfp, int bitrate_stmode_count[14][4]) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t const *const eov = &gfc->ov_enc; - int i; - int j; + int i; + int j; if (cfg->free_format) { for (j = 0; j < 14; j++) @@ -2603,8 +2543,7 @@ lame_bitrate_stereo_mode_hist(const lame_global_flags * gfp, int bitrate_stmode_ for (i = 0; i < 4; i++) { bitrate_stmode_count[0][i] = eov->bitrate_channelmode_hist[0][i]; } - } - else { + } else { for (j = 0; j < 14; j++) { for (i = 0; i < 4; i++) { bitrate_stmode_count[j][i] = eov->bitrate_channelmode_hist[j + 1][i]; @@ -2617,13 +2556,12 @@ lame_bitrate_stereo_mode_hist(const lame_global_flags * gfp, int bitrate_stmode_ void -lame_block_type_hist(const lame_global_flags * gfp, int btype_count[6]) -{ +lame_block_type_hist(const lame_global_flags *gfp, int btype_count[6]) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { EncResult_t const *const eov = &gfc->ov_enc; - int i; + int i; for (i = 0; i < 6; ++i) { btype_count[i] = eov->bitrate_blocktype_hist[15][i]; @@ -2633,16 +2571,14 @@ lame_block_type_hist(const lame_global_flags * gfp, int btype_count[6]) } - void -lame_bitrate_block_type_hist(const lame_global_flags * gfp, int bitrate_btype_count[14][6]) -{ +lame_bitrate_block_type_hist(const lame_global_flags *gfp, int bitrate_btype_count[14][6]) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t const *const eov = &gfc->ov_enc; - int i, j; + int i, j; if (cfg->free_format) { for (j = 0; j < 14; ++j) { @@ -2653,8 +2589,7 @@ lame_bitrate_block_type_hist(const lame_global_flags * gfp, int bitrate_btype_co for (i = 0; i < 6; ++i) { bitrate_btype_count[0][i] = eov->bitrate_blocktype_hist[0][i]; } - } - else { + } else { for (j = 0; j < 14; ++j) { for (i = 0; i < 6; ++i) { bitrate_btype_count[j][i] = eov->bitrate_blocktype_hist[j + 1][i]; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.h new file mode 100644 index 0000000..4aacb8b --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame.h @@ -0,0 +1,1400 @@ +/* + * Interface to MP3 LAME encoding engine + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* $Id: lame.h,v 1.192 2017/08/31 14:14:46 robert Exp $ */ + +#ifndef LAME_LAME_H +#define LAME_LAME_H + +/* for size_t typedef */ +#include +/* for va_list typedef */ +#include +/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */ +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef void (*lame_report_function)(const char *format, va_list ap); + +#if defined(WIN32) || defined(_WIN32) +#undef CDECL +#define CDECL __cdecl +#else +#define CDECL +#endif + +#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1 + +typedef enum vbr_mode_e { + vbr_off = 0, + vbr_mt, /* obsolete, same as vbr_mtrh */ + vbr_rh, + vbr_abr, + vbr_mtrh, + vbr_max_indicator, /* Don't use this! It's used for sanity checks. */ + vbr_default = vbr_mtrh /* change this to change the default VBR mode of LAME */ +} vbr_mode; + + +/* MPEG modes */ +typedef enum MPEG_mode_e { + STEREO = 0, + JOINT_STEREO, + DUAL_CHANNEL, /* LAME doesn't supports this! */ + MONO, + NOT_SET, + MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} MPEG_mode; + +/* Padding types */ +typedef enum Padding_type_e { + PAD_NO = 0, + PAD_ALL, + PAD_ADJUST, + PAD_MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} Padding_type; + + +/*presets*/ +typedef enum preset_mode_e { + /*values from 8 to 320 should be reserved for abr bitrates*/ + /*for abr I'd suggest to directly use the targeted bitrate as a value*/ + ABR_8 = 8, + ABR_320 = 320, + + V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/ + VBR_10 = 410, + V8 = 420, + VBR_20 = 420, + V7 = 430, + VBR_30 = 430, + V6 = 440, + VBR_40 = 440, + V5 = 450, + VBR_50 = 450, + V4 = 460, + VBR_60 = 460, + V3 = 470, + VBR_70 = 470, + V2 = 480, + VBR_80 = 480, + V1 = 490, + VBR_90 = 490, + V0 = 500, + VBR_100 = 500, + + + /*still there for compatibility*/ + R3MIX = 1000, + STANDARD = 1001, + EXTREME = 1002, + INSANE = 1003, + STANDARD_FAST = 1004, + EXTREME_FAST = 1005, + MEDIUM = 1006, + MEDIUM_FAST = 1007 +} preset_mode; + + +/*asm optimizations*/ +typedef enum asm_optimizations_e { + MMX = 1, + AMD_3DNOW = 2, + SSE = 3 +} asm_optimizations; + + +/* psychoacoustic model */ +typedef enum Psy_model_e { + PSY_GPSYCHO = 1, + PSY_NSPSYTUNE = 2 +} Psy_model; + + +/* buffer considerations */ +typedef enum buffer_constraint_e { + MDB_DEFAULT = 0, + MDB_STRICT_ISO = 1, + MDB_MAXIMUM = 2 +} buffer_constraint; + + +struct lame_global_struct; +typedef struct lame_global_struct lame_global_flags; +typedef lame_global_flags *lame_t; + + + + +/*********************************************************************** + * + * The LAME API + * These functions should be called, in this order, for each + * MP3 file to be encoded. See the file "API" for more documentation + * + ***********************************************************************/ + + +/* + * REQUIRED: + * initialize the encoder. sets default for all encoder parameters, + * returns NULL if some malloc()'s failed + * otherwise returns pointer to structure needed for all future + * API calls. + */ +lame_global_flags *CDECL lame_init(void); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* obsolete version */ +int CDECL lame_init_old(lame_global_flags *); +#endif + +/* + * OPTIONAL: + * set as needed to override defaults + */ + +/******************************************************************** + * input stream description + ***********************************************************************/ +/* number of samples. default = 2^32-1 */ +int CDECL lame_set_num_samples(lame_global_flags *, unsigned long); + +unsigned long CDECL lame_get_num_samples(const lame_global_flags *); + +/* input sample rate in Hz. default = 44100hz */ +int CDECL lame_set_in_samplerate(lame_global_flags *, int); + +int CDECL lame_get_in_samplerate(const lame_global_flags *); + +/* number of channels in input stream. default=2 */ +int CDECL lame_set_num_channels(lame_global_flags *, int); + +int CDECL lame_get_num_channels(const lame_global_flags *); + +/* + scale the input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale(lame_global_flags *, float); + +float CDECL lame_get_scale(const lame_global_flags *); + +/* + scale the channel 0 (left) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_left(lame_global_flags *, float); + +float CDECL lame_get_scale_left(const lame_global_flags *); + +/* + scale the channel 1 (right) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_right(lame_global_flags *, float); + +float CDECL lame_get_scale_right(const lame_global_flags *); + +/* + output sample rate in Hz. default = 0, which means LAME picks best value + based on the amount of compression. MPEG only allows: + MPEG1 32, 44.1, 48khz + MPEG2 16, 22.05, 24 + MPEG2.5 8, 11.025, 12 + (not used by decoding routines) +*/ +int CDECL lame_set_out_samplerate(lame_global_flags *, int); + +int CDECL lame_get_out_samplerate(const lame_global_flags *); + + +/******************************************************************** + * general control parameters + ***********************************************************************/ +/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */ +int CDECL lame_set_analysis(lame_global_flags *, int); + +int CDECL lame_get_analysis(const lame_global_flags *); + +/* + 1 = write a Xing VBR header frame. + default = 1 + this variable must have been added by a Hungarian notation Windows programmer :-) +*/ +int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int); + +int CDECL lame_get_bWriteVbrTag(const lame_global_flags *); + +/* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */ +int CDECL lame_set_decode_only(lame_global_flags *, int); + +int CDECL lame_get_decode_only(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* 1=encode a Vorbis .ogg file. default=0 */ +/* DEPRECATED */ +int CDECL lame_set_ogg(lame_global_flags *, int); +int CDECL lame_get_ogg(const lame_global_flags *); +#endif + +/* + internal algorithm selection. True quality is determined by the bitrate + but this variable will effect quality by selecting expensive or cheap algorithms. + quality=0..9. 0=best (very slow). 9=worst. + recommended: 2 near-best quality, not too slow + 5 good quality, fast + 7 ok quality, really fast +*/ +int CDECL lame_set_quality(lame_global_flags *, int); + +int CDECL lame_get_quality(const lame_global_flags *); + +/* + mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono + default: lame picks based on compression ration and input channels +*/ +int CDECL lame_set_mode(lame_global_flags *, MPEG_mode); + +MPEG_mode CDECL lame_get_mode(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + mode_automs. Use a M/S mode with a switching threshold based on + compression ratio + DEPRECATED +*/ +int CDECL lame_set_mode_automs(lame_global_flags *, int); +int CDECL lame_get_mode_automs(const lame_global_flags *); +#endif + +/* + force_ms. Force M/S for all frames. For testing only. + default = 0 (disabled) +*/ +int CDECL lame_set_force_ms(lame_global_flags *, int); + +int CDECL lame_get_force_ms(const lame_global_flags *); + +/* use free_format? default = 0 (disabled) */ +int CDECL lame_set_free_format(lame_global_flags *, int); + +int CDECL lame_get_free_format(const lame_global_flags *); + +/* perform ReplayGain analysis? default = 0 (disabled) */ +int CDECL lame_set_findReplayGain(lame_global_flags *, int); + +int CDECL lame_get_findReplayGain(const lame_global_flags *); + +/* decode on the fly. Search for the peak sample. If the ReplayGain + * analysis is enabled then perform the analysis on the decoded data + * stream. default = 0 (disabled) + * NOTE: if this option is set the build-in decoder should not be used */ +int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int); + +int CDECL lame_get_decode_on_the_fly(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* DEPRECATED: now does the same as lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_input(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_input(const lame_global_flags *); + +/* DEPRECATED: now does the same as + lame_set_decode_on_the_fly() && lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_decode(const lame_global_flags *); + +/* DEPRECATED: now does the same as lame_set_decode_on_the_fly() + default = 0 (disabled) */ +int CDECL lame_set_findPeakSample(lame_global_flags *, int); +int CDECL lame_get_findPeakSample(const lame_global_flags *); +#endif + +/* counters for gapless encoding */ +int CDECL lame_set_nogap_total(lame_global_flags *, int); + +int CDECL lame_get_nogap_total(const lame_global_flags *); + +int CDECL lame_set_nogap_currentindex(lame_global_flags *, int); + +int CDECL lame_get_nogap_currentindex(const lame_global_flags *); + + +/* + * OPTIONAL: + * Set printf like error/debug/message reporting functions. + * The second argument has to be a pointer to a function which looks like + * void my_debugf(const char *format, va_list ap) + * { + * (void) vfprintf(stdout, format, ap); + * } + * If you use NULL as the value of the pointer in the set function, the + * lame buildin function will be used (prints to stderr). + * To quiet any output you have to replace the body of the example function + * with just "return;" and use it in the set function. + */ +int CDECL lame_set_errorf(lame_global_flags *, lame_report_function); + +int CDECL lame_set_debugf(lame_global_flags *, lame_report_function); + +int CDECL lame_set_msgf(lame_global_flags *, lame_report_function); + + +/* set one of brate compression ratio. default is compression ratio of 11. */ +int CDECL lame_set_brate(lame_global_flags *, int); + +int CDECL lame_get_brate(const lame_global_flags *); + +int CDECL lame_set_compression_ratio(lame_global_flags *, float); + +float CDECL lame_get_compression_ratio(const lame_global_flags *); + + +int CDECL lame_set_preset(lame_global_flags *gfp, int); + +int CDECL lame_set_asm_optimizations(lame_global_flags *gfp, int, int); + + + +/******************************************************************** + * frame params + ***********************************************************************/ +/* mark as copyright. default=0 */ +int CDECL lame_set_copyright(lame_global_flags *, int); + +int CDECL lame_get_copyright(const lame_global_flags *); + +/* mark as original. default=1 */ +int CDECL lame_set_original(lame_global_flags *, int); + +int CDECL lame_get_original(const lame_global_flags *); + +/* error_protection. Use 2 bytes from each frame for CRC checksum. default=0 */ +int CDECL lame_set_error_protection(lame_global_flags *, int); + +int CDECL lame_get_error_protection(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* padding_type. 0=pad no frames 1=pad all frames 2=adjust padding(default) */ +int CDECL lame_set_padding_type(lame_global_flags *, Padding_type); +Padding_type CDECL lame_get_padding_type(const lame_global_flags *); +#endif + +/* MP3 'private extension' bit Meaningless. default=0 */ +int CDECL lame_set_extension(lame_global_flags *, int); + +int CDECL lame_get_extension(const lame_global_flags *); + +/* enforce strict ISO compliance. default=0 */ +int CDECL lame_set_strict_ISO(lame_global_flags *, int); + +int CDECL lame_get_strict_ISO(const lame_global_flags *); + + +/******************************************************************** + * quantization/noise shaping + ***********************************************************************/ + +/* disable the bit reservoir. For testing only. default=0 */ +int CDECL lame_set_disable_reservoir(lame_global_flags *, int); + +int CDECL lame_get_disable_reservoir(const lame_global_flags *); + +/* select a different "best quantization" function. default=0 */ +int CDECL lame_set_quant_comp(lame_global_flags *, int); + +int CDECL lame_get_quant_comp(const lame_global_flags *); + +int CDECL lame_set_quant_comp_short(lame_global_flags *, int); + +int CDECL lame_get_quant_comp_short(const lame_global_flags *); + +int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/ +int CDECL lame_get_experimentalX(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalY(lame_global_flags *, int); + +int CDECL lame_get_experimentalY(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalZ(lame_global_flags *, int); + +int CDECL lame_get_experimentalZ(const lame_global_flags *); + +/* Naoki's psycho acoustic model. default=0 */ +int CDECL lame_set_exp_nspsytune(lame_global_flags *, int); + +int CDECL lame_get_exp_nspsytune(const lame_global_flags *); + +void CDECL lame_set_msfix(lame_global_flags *, double); + +float CDECL lame_get_msfix(const lame_global_flags *); + + +/******************************************************************** + * VBR control + ***********************************************************************/ +/* Types of VBR. default = vbr_off = CBR */ +int CDECL lame_set_VBR(lame_global_flags *, vbr_mode); + +vbr_mode CDECL lame_get_VBR(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest */ +int CDECL lame_set_VBR_q(lame_global_flags *, int); + +int CDECL lame_get_VBR_q(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest, Range [0,...,10[ */ +int CDECL lame_set_VBR_quality(lame_global_flags *, float); + +float CDECL lame_get_VBR_quality(const lame_global_flags *); + +/* Ignored except for VBR=vbr_abr (ABR mode) */ +int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int); + +int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int); + +int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int); + +int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *); + +/* + 1=strictly enforce VBR_min_bitrate. Normally it will be violated for + analog silence +*/ +int CDECL lame_set_VBR_hard_min(lame_global_flags *, int); + +int CDECL lame_get_VBR_hard_min(const lame_global_flags *); + +/* for preset */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_set_preset_expopts(lame_global_flags *, int); +#endif + +/******************************************************************** + * Filtering control + ***********************************************************************/ +/* freq in Hz to apply lowpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_lowpassfreq(lame_global_flags *, int); + +int CDECL lame_get_lowpassfreq(const lame_global_flags *); + +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_lowpasswidth(lame_global_flags *, int); + +int CDECL lame_get_lowpasswidth(const lame_global_flags *); + +/* freq in Hz to apply highpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_highpassfreq(lame_global_flags *, int); + +int CDECL lame_get_highpassfreq(const lame_global_flags *); + +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_highpasswidth(lame_global_flags *, int); + +int CDECL lame_get_highpasswidth(const lame_global_flags *); + + +/******************************************************************** + * psycho acoustics and other arguments which you should not change + * unless you know what you are doing + ***********************************************************************/ + +/* only use ATH for masking */ +int CDECL lame_set_ATHonly(lame_global_flags *, int); + +int CDECL lame_get_ATHonly(const lame_global_flags *); + +/* only use ATH for short blocks */ +int CDECL lame_set_ATHshort(lame_global_flags *, int); + +int CDECL lame_get_ATHshort(const lame_global_flags *); + +/* disable ATH */ +int CDECL lame_set_noATH(lame_global_flags *, int); + +int CDECL lame_get_noATH(const lame_global_flags *); + +/* select ATH formula */ +int CDECL lame_set_ATHtype(lame_global_flags *, int); + +int CDECL lame_get_ATHtype(const lame_global_flags *); + +/* lower ATH by this many db */ +int CDECL lame_set_ATHlower(lame_global_flags *, float); + +float CDECL lame_get_ATHlower(const lame_global_flags *); + +/* select ATH adaptive adjustment type */ +int CDECL lame_set_athaa_type(lame_global_flags *, int); + +int CDECL lame_get_athaa_type(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* select the loudness approximation used by the ATH adaptive auto-leveling */ +int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int); +int CDECL lame_get_athaa_loudapprox( const lame_global_flags *); +#endif + +/* adjust (in dB) the point below which adaptive ATH level adjustment occurs */ +int CDECL lame_set_athaa_sensitivity(lame_global_flags *, float); + +float CDECL lame_get_athaa_sensitivity(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* OBSOLETE: predictability limit (ISO tonality formula) */ +int CDECL lame_set_cwlimit(lame_global_flags *, int); +int CDECL lame_get_cwlimit(const lame_global_flags *); +#endif + +/* + allow blocktypes to differ between channels? + default: 0 for jstereo, 1 for stereo +*/ +int CDECL lame_set_allow_diff_short(lame_global_flags *, int); + +int CDECL lame_get_allow_diff_short(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_useTemporal(lame_global_flags *, int); + +int CDECL lame_get_useTemporal(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_interChRatio(lame_global_flags *, float); + +float CDECL lame_get_interChRatio(const lame_global_flags *); + +/* disable short blocks */ +int CDECL lame_set_no_short_blocks(lame_global_flags *, int); + +int CDECL lame_get_no_short_blocks(const lame_global_flags *); + +/* force short blocks */ +int CDECL lame_set_force_short_blocks(lame_global_flags *, int); + +int CDECL lame_get_force_short_blocks(const lame_global_flags *); + +/* Input PCM is emphased PCM (for instance from one of the rarely + emphased CDs), it is STRONGLY not recommended to use this, because + psycho does not take it into account, and last but not least many decoders + ignore these bits */ +int CDECL lame_set_emphasis(lame_global_flags *, int); + +int CDECL lame_get_emphasis(const lame_global_flags *); + + + +/************************************************************************/ +/* internal variables, cannot be set... */ +/* provided because they may be of use to calling application */ +/************************************************************************/ +/* version 0=MPEG-2 1=MPEG-1 (2=MPEG-2.5) */ +int CDECL lame_get_version(const lame_global_flags *); + +/* encoder delay */ +int CDECL lame_get_encoder_delay(const lame_global_flags *); + +/* + padding appended to the input to make sure decoder can fully decode + all input. Note that this value can only be calculated during the + call to lame_encoder_flush(). Before lame_encoder_flush() has + been called, the value of encoder_padding = 0. +*/ +int CDECL lame_get_encoder_padding(const lame_global_flags *); + +/* size of MPEG frame */ +int CDECL lame_get_framesize(const lame_global_flags *); + +/* number of PCM samples buffered, but not yet encoded to mp3 data. */ +int CDECL lame_get_mf_samples_to_encode(const lame_global_flags *gfp); + +/* + size (bytes) of mp3 data buffered, but not yet encoded. + this is the number of bytes which would be output by a call to + lame_encode_flush_nogap. NOTE: lame_encode_flush() will return + more bytes than this because it will encode the reamining buffered + PCM samples before flushing the mp3 buffers. +*/ +int CDECL lame_get_size_mp3buffer(const lame_global_flags *gfp); + +/* number of frames encoded so far */ +int CDECL lame_get_frameNum(const lame_global_flags *); + +/* + lame's estimate of the total number of frames to be encoded + only valid if calling program set num_samples +*/ +int CDECL lame_get_totalframes(const lame_global_flags *); + +/* RadioGain value. Multiplied by 10 and rounded to the nearest. */ +int CDECL lame_get_RadioGain(const lame_global_flags *); + +/* AudiophileGain value. Multipled by 10 and rounded to the nearest. */ +int CDECL lame_get_AudiophileGain(const lame_global_flags *); + +/* the peak sample */ +float CDECL lame_get_PeakSample(const lame_global_flags *); + +/* Gain change required for preventing clipping. The value is correct only if + peak sample searching was enabled. If negative then the waveform + already does not clip. The value is multiplied by 10 and rounded up. */ +int CDECL lame_get_noclipGainChange(const lame_global_flags *); + +/* user-specified scale factor required for preventing clipping. Value is + correct only if peak sample searching was enabled and no user-specified + scaling was performed. If negative then either the waveform already does + not clip or the value cannot be determined */ +float CDECL lame_get_noclipScale(const lame_global_flags *); + +/* returns the limit of PCM samples, which one can pass in an encode call + under the constrain of a provided buffer of size buffer_size */ +int CDECL lame_get_maximum_number_of_samples(lame_t gfp, size_t buffer_size); + + +/* + * REQUIRED: + * sets more internal configuration based on data provided above. + * returns -1 if something failed. + */ +int CDECL lame_init_params(lame_global_flags *); + + +/* + * OPTIONAL: + * get the version number, in a string. of the form: + * "3.63 (beta)" or just "3.63". + */ +const char *CDECL get_lame_version(void); + +const char *CDECL get_lame_short_version(void); + +const char *CDECL get_lame_very_short_version(void); + +const char *CDECL get_psy_version(void); + +const char *CDECL get_lame_url(void); + +const char *CDECL get_lame_os_bitness(void); + +/* + * OPTIONAL: + * get the version numbers in numerical form. + */ +typedef struct { + /* generic LAME version */ + int major; + int minor; + int alpha; /* 0 if not an alpha version */ + int beta; /* 0 if not a beta version */ + + /* version of the psy model */ + int psy_major; + int psy_minor; + int psy_alpha; /* 0 if not an alpha version */ + int psy_beta; /* 0 if not a beta version */ + + /* compile time features */ + const char *features; /* Don't make assumptions about the contents! */ +} lame_version_t; + +void CDECL get_lame_version_numerical(lame_version_t *); + + +/* + * OPTIONAL: + * print internal lame configuration to message handler + */ +void CDECL lame_print_config(const lame_global_flags *gfp); + +void CDECL lame_print_internals(const lame_global_flags *gfp); + + +/* + * input pcm data, output (maybe) mp3 frames. + * This routine handles all buffering, resampling and filtering for you. + * + * return code number of bytes output in mp3buf. Can be 0 + * -1: mp3buf was too small + * -2: malloc() problem + * -3: lame_init_params() not called + * -4: psycho acoustic problems + * + * The required mp3buf_size can be computed from num_samples, + * samplerate and encoding rate, but here is a worst case estimate: + * + * mp3buf_size in bytes = 1.25*num_samples + 7200 + * + * I think a tighter bound could be: (mt, March 2000) + * MPEG1: + * num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512 + * MPEG2: + * num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256 + * + * but test first if you use that! + * + * set mp3buf_size = 0 and LAME will not check if mp3buf_size is + * large enough. + * + * NOTE: + * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels + * will be averaged into the L channel before encoding only the L channel + * This will overwrite the data in buffer_l[] and buffer_r[]. + * +*/ +int CDECL lame_encode_buffer( + lame_global_flags *gfp, /* global context handle */ + const short int buffer_l[], /* PCM data for left channel */ + const short int buffer_r[], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size); /* number of valid octets in this + stream */ + +/* + * as above, but input has L & R channel data interleaved. + * NOTE: + * num_samples = number of samples in the L (or R) + * channel, not the total number of samples in pcm[] + */ +int CDECL lame_encode_buffer_interleaved( + lame_global_flags *gfp, /* global context handlei */ + short int pcm[], /* PCM data for left and right + channel, interleaved */ + int num_samples, /* number of samples per channel, + _not_ number of samples in + pcm[] */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + int mp3buf_size); /* number of valid octets in this + stream */ + + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + */ +int CDECL lame_encode_buffer_float( + lame_global_flags *gfp, /* global context handle */ + const float pcm_l[], /* PCM data for left channel */ + const float pcm_r[], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_float( + lame_t gfp, + const float pcm_l[], /* PCM data for left channel */ + const float pcm_r[], /* PCM data for right channel */ + const int nsamples, + unsigned char *mp3buf, + const int mp3buf_size); + +int CDECL lame_encode_buffer_interleaved_ieee_float( + lame_t gfp, + const float pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char *mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for 'double's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_double( + lame_t gfp, + const double pcm_l[], /* PCM data for left channel */ + const double pcm_r[], /* PCM data for right channel */ + const int nsamples, + unsigned char *mp3buf, + const int mp3buf_size); + +int CDECL lame_encode_buffer_interleaved_ieee_double( + lame_t gfp, + const double pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char *mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for long's + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + * + * This scaling was a mistake (doesn't allow one to exploit full + * precision of type 'long'. Use lame_encode_buffer_long2() instead. + * + */ +int CDECL lame_encode_buffer_long( + lame_global_flags *gfp, /* global context handle */ + const long buffer_l[], /* PCM data for left channel */ + const long buffer_r[], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size); /* number of valid octets in this + stream */ + +/* Same as lame_encode_buffer_long(), but with correct scaling. + * !! NOTE: !! data must still be scaled to be in the same range as + * type 'long'. Data should be in the range: +/- 2^(8*size(long)-1) + * + */ +int CDECL lame_encode_buffer_long2( + lame_global_flags *gfp, /* global context handle */ + const long buffer_l[], /* PCM data for left channel */ + const long buffer_r[], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for int's + * !! NOTE: !! input should be scaled to the maximum range of 'int' + * If int is 4 bytes, then the values should range from + * +/- 2147483648. + * + * This routine does not (and cannot, without loosing precision) use + * the same scaling as the rest of the lame_encode_buffer() routines. + * + */ +int CDECL lame_encode_buffer_int( + lame_global_flags *gfp, /* global context handle */ + const int buffer_l[], /* PCM data for left channel */ + const int buffer_r[], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size); /* number of valid octets in this + stream */ + +/* + * as above, but for interleaved data. + * !! NOTE: !! data must still be scaled to be in the same range as + * type 'int32_t'. Data should be in the range: +/- 2^(8*size(int32_t)-1) + * NOTE: + * num_samples = number of samples in the L (or R) + * channel, not the total number of samples in pcm[] + */ +int +lame_encode_buffer_interleaved_int( + lame_t gfp, + const int pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, /* number of samples per channel, + _not_ number of samples in + pcm[] */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size); /* number of valid octets in this + stream */ + + + +/* + * REQUIRED: + * lame_encode_flush will flush the intenal PCM buffers, padding with + * 0's to make sure the final frame is complete, and then flush + * the internal MP3 buffers, and thus may return a + * final few mp3 frames. 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * will also write id3v1 tags (if any) into the bitstream + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush( + lame_global_flags *gfp, /* global context handle */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * lame_encode_flush_nogap will flush the internal mp3 buffers and pad + * the last frame with ancillary data so it is a complete mp3 frame. + * + * 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * After a call to this routine, the outputed mp3 data is complete, but + * you may continue to encode new PCM samples and write future mp3 data + * to a different file. The two mp3 files will play back with no gaps + * if they are concatenated together. + * + * This routine will NOT write id3v1 tags into the bitstream. + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush_nogap( + lame_global_flags *gfp, /* global context handle */ + unsigned char *mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * Normally, this is called by lame_init_params(). It writes id3v2 and + * Xing headers into the front of the bitstream, and sets frame counters + * and bitrate histogram data to 0. You can also call this after + * lame_encode_flush_nogap(). + */ +int CDECL lame_init_bitstream( + lame_global_flags *gfp); /* global context handle */ + + + +/* + * OPTIONAL: some simple statistics + * a bitrate histogram to visualize the distribution of used frame sizes + * a stereo mode histogram to visualize the distribution of used stereo + * modes, useful in joint-stereo mode only + * 0: LR left-right encoded + * 1: LR-I left-right and intensity encoded (currently not supported) + * 2: MS mid-side encoded + * 3: MS-I mid-side and intensity encoded (currently not supported) + * + * attention: don't call them after lame_encode_finish + * suggested: lame_encode_flush -> lame_*_hist -> lame_close + */ + +void CDECL lame_bitrate_hist( + const lame_global_flags *gfp, + int bitrate_count[14]); + +void CDECL lame_bitrate_kbps( + const lame_global_flags *gfp, + int bitrate_kbps[14]); + +void CDECL lame_stereo_mode_hist( + const lame_global_flags *gfp, + int stereo_mode_count[4]); + +void CDECL lame_bitrate_stereo_mode_hist( + const lame_global_flags *gfp, + int bitrate_stmode_count[14][4]); + +void CDECL lame_block_type_hist( + const lame_global_flags *gfp, + int btype_count[6]); + +void CDECL lame_bitrate_block_type_hist( + const lame_global_flags *gfp, + int bitrate_btype_count[14][6]); + +#if (DEPRECATED_OR_OBSOLETE_CODE_REMOVED && 0) +#else + +/* + * OPTIONAL: + * lame_mp3_tags_fid will rewrite a Xing VBR tag to the mp3 file with file + * pointer fid. These calls perform forward and backwards seeks, so make + * sure fid is a real file. Make sure lame_encode_flush has been called, + * and all mp3 data has been written to the file before calling this + * function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME because + * the output is not a regular file, this call does nothing + * NOTE: + * LAME wants to read from the file to skip an optional ID3v2 tag, so + * make sure you opened the file for writing and reading. + * NOTE: + * You can call lame_get_lametag_frame instead, if you want to insert + * the lametag yourself. +*/ +void CDECL lame_mp3_tags_fid(lame_global_flags *, FILE *fid); + +#endif + +/* + * OPTIONAL: + * lame_get_lametag_frame copies the final LAME-tag into 'buffer'. + * The function returns the number of bytes copied into buffer, or + * the required buffer size, if the provided buffer is too small. + * Function failed, if the return value is larger than 'size'! + * Make sure lame_encode flush has been called before calling this function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME, + * this call does nothing and returns 0. + * NOTE: + * LAME inserted an empty frame in the beginning of mp3 audio data, + * which you have to replace by the final LAME-tag frame after encoding. + * In case there is no ID3v2 tag, usually this frame will be the very first + * data in your mp3 file. If you put some other leading data into your + * file, you'll have to do some bookkeeping about where to write this buffer. + */ +size_t CDECL lame_get_lametag_frame( + const lame_global_flags *, unsigned char *buffer, size_t size); + +/* + * REQUIRED: + * final call to free all remaining buffers + */ +int CDECL lame_close(lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + * OBSOLETE: + * lame_encode_finish combines lame_encode_flush() and lame_close() in + * one call. However, once this call is made, the statistics routines + * will no longer work because the data will have been cleared, and + * lame_mp3_tags_fid() cannot be called to add data to the VBR header + */ +int CDECL lame_encode_finish( + lame_global_flags* gfp, + unsigned char* mp3buf, + int size ); +#endif + + +/********************************************************************* + * + * decoding + * + * a simple interface to mpglib, part of mpg123, is also included if + * libmp3lame is compiled with HAVE_MPGLIB + * + *********************************************************************/ + +struct hip_global_struct; +typedef struct hip_global_struct hip_global_flags; +typedef hip_global_flags *hip_t; + + +typedef struct { + int header_parsed; /* 1 if header was parsed and following data was + computed */ + int stereo; /* number of channels */ + int samplerate; /* sample rate */ + int bitrate; /* bitrate */ + int mode; /* mp3 frame type */ + int mode_ext; /* mp3 frame type */ + int framesize; /* number of samples per mp3 frame */ + + /* this data is only computed if mpglib detects a Xing VBR header */ + unsigned long nsamp; /* number of samples in mp3 file. */ + int totalframes; /* total number of frames in mp3 file */ + + /* this data is not currently computed by the mpglib routines */ + int framenum; /* frames decoded counter */ +} mp3data_struct; + +/* required call to initialize decoder */ +hip_t CDECL hip_decode_init(void); + +/* cleanup call to exit decoder */ +int CDECL hip_decode_exit(hip_t gfp); + +/* HIP reporting functions */ +void CDECL hip_set_errorf(hip_t gfp, lame_report_function f); + +void CDECL hip_set_debugf(hip_t gfp, lame_report_function f); + +void CDECL hip_set_msgf(hip_t gfp, lame_report_function f); + +/********************************************************************* + * input 1 mp3 frame, output (maybe) pcm data. + * + * nout = hip_decode(hip, mp3buf,len,pcm_l,pcm_r); + * + * input: + * len : number of bytes of mp3 data in mp3buf + * mp3buf[len] : mp3 data to be decoded + * + * output: + * nout: -1 : decoding error + * 0 : need more data before we can complete the decode + * >0 : returned 'nout' samples worth of data in pcm_l,pcm_r + * pcm_l[nout] : left channel data + * pcm_r[nout] : right channel data + * + *********************************************************************/ +int CDECL hip_decode(hip_t gfp, unsigned char *mp3buf, size_t len, short pcm_l[], short pcm_r[] +); + +/* same as hip_decode, and also returns mp3 header data */ +int CDECL +hip_decode_headers(hip_t gfp, unsigned char *mp3buf, size_t len, short pcm_l[], short pcm_r[], + mp3data_struct *mp3data +); + +/* same as hip_decode, but returns at most one frame */ +int CDECL hip_decode1(hip_t gfp, unsigned char *mp3buf, size_t len, short pcm_l[], short pcm_r[] +); + +/* same as hip_decode1, but returns at most one frame and mp3 header data */ +int CDECL +hip_decode1_headers(hip_t gfp, unsigned char *mp3buf, size_t len, short pcm_l[], short pcm_r[], + mp3data_struct *mp3data +); + +/* same as hip_decode1_headers, but also returns enc_delay and enc_padding + from VBR Info tag, (-1 if no info tag was found) */ +int CDECL +hip_decode1_headersB(hip_t gfp, unsigned char *mp3buf, size_t len, short pcm_l[], short pcm_r[], + mp3data_struct *mp3data, int *enc_delay, int *enc_padding +); + + + +/* OBSOLETE: + * lame_decode... functions are there to keep old code working + * but it is strongly recommended to replace calls by hip_decode... + * function calls, see above. + */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_decode_init(void); +int CDECL lame_decode( + unsigned char * mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode1_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1_headersB( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data, + int *enc_delay, + int *enc_padding ); +int CDECL lame_decode_exit(void); + +#endif /* obsolete lame_decode API calls */ + + +/********************************************************************* + * + * id3tag stuff + * + *********************************************************************/ + +/* + * id3tag.h -- Interface to write ID3 version 1 and 2 tags. + * + * Copyright (C) 2000 Don Melton. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* utility to obtain alphabetically sorted list of genre names with numbers */ +void CDECL id3tag_genre_list( + void (*handler)(int, const char *, void *), + void *cookie); + +void CDECL id3tag_init(lame_t gfp); + +/* force addition of version 2 tag */ +void CDECL id3tag_add_v2(lame_t gfp); + +/* add only a version 1 tag */ +void CDECL id3tag_v1_only(lame_t gfp); + +/* add only a version 2 tag */ +void CDECL id3tag_v2_only(lame_t gfp); + +/* pad version 1 tag with spaces instead of nulls */ +void CDECL id3tag_space_v1(lame_t gfp); + +/* pad version 2 tag with extra 128 bytes */ +void CDECL id3tag_pad_v2(lame_t gfp); + +/* pad version 2 tag with extra n bytes */ +void CDECL id3tag_set_pad(lame_t gfp, size_t n); + +void CDECL id3tag_set_title(lame_t gfp, const char *title); + +void CDECL id3tag_set_artist(lame_t gfp, const char *artist); + +void CDECL id3tag_set_album(lame_t gfp, const char *album); + +void CDECL id3tag_set_year(lame_t gfp, const char *year); + +void CDECL id3tag_set_comment(lame_t gfp, const char *comment); + +/* return -1 result if track number is out of ID3v1 range + and ignored for ID3v1 */ +int CDECL id3tag_set_track(lame_t gfp, const char *track); + +/* return non-zero result if genre name or number is invalid + result 0: OK + result -1: genre number out of range + result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other' + but taken as-is for ID3v2 genre tag */ +int CDECL id3tag_set_genre(lame_t gfp, const char *genre); + +/* return non-zero result if field name is invalid */ +int CDECL id3tag_set_fieldvalue(lame_t gfp, const char *fieldvalue); + +/* return non-zero result if image type is invalid */ +int CDECL id3tag_set_albumart(lame_t gfp, const char *image, size_t size); + +/* lame_get_id3v1_tag copies ID3v1 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v1 tag. + */ +size_t CDECL lame_get_id3v1_tag(lame_t gfp, unsigned char *buffer, size_t size); + +/* lame_get_id3v2_tag copies ID3v2 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v2 tag. + */ +size_t CDECL lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size); + +/* normaly lame_init_param writes ID3v2 tags into the audio stream + * Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param + * to turn off this behaviour and get ID3v2 tag with above function + * write it yourself into your file. + */ +void CDECL lame_set_write_id3tag_automatic(lame_global_flags *gfp, int); + +int CDECL lame_get_write_id3tag_automatic(lame_global_flags const *gfp); + +/* experimental */ +int CDECL id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text); + +/* experimental */ +int CDECL +id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* experimental */ +int CDECL id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_ucs2(lame_t gfp, char const *lang, + unsigned short const *desc, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue); +#endif + +/* experimental */ +int CDECL id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue); + +/* experimental */ +int CDECL id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, + unsigned short const *text); + + +/*********************************************************************** +* +* list of valid bitrates [kbps] & sample frequencies [Hz]. +* first index: 0: MPEG-2 values (sample frequencies 16...24 kHz) +* 1: MPEG-1 values (sample frequencies 32...48 kHz) +* 2: MPEG-2.5 values (sample frequencies 8...12 kHz) +***********************************************************************/ + +extern const int bitrate_table[3][16]; +extern const int samplerate_table[3][4]; + +/* access functions for use in DLL, global vars are not exported */ +int CDECL lame_get_bitrate(int mpeg_version, int table_index); + +int CDECL lame_get_samplerate(int mpeg_version, int table_index); + + +/* maximum size of albumart image (128KB), which affects LAME_MAXMP3BUFFER + as well since lame_encode_buffer() also returns ID3v2 tag data */ +#define LAME_MAXALBUMART (128 * 1024) + +/* maximum size of mp3buffer needed if you encode at most 1152 samples for + each call to lame_encode_buffer. see lame_encode_buffer() below + (LAME_MAXMP3BUFFER is now obsolete) */ +#define LAME_MAXMP3BUFFER (16384 + LAME_MAXALBUMART) + + +typedef enum { + LAME_OKAY = 0, + LAME_NOERROR = 0, + LAME_GENERICERROR = -1, + LAME_NOMEM = -10, + LAME_BADBITRATE = -11, + LAME_BADSAMPFREQ = -12, + LAME_INTERNALERROR = -13, + + FRONTEND_READERROR = -80, + FRONTEND_WRITEERROR = -81, + FRONTEND_FILETOOLARGE = -82 + +} lame_errorcodes_t; + +#if defined(__cplusplus) +} +#endif +#endif /* LAME_LAME_H */ + diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame_global_flags.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame_global_flags.h new file mode 100644 index 0000000..1a7a2c8 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lame_global_flags.h @@ -0,0 +1,186 @@ +#ifndef LAME_GLOBAL_FLAGS_H +#define LAME_GLOBAL_FLAGS_H + +#ifndef lame_internal_flags_defined +#define lame_internal_flags_defined +struct lame_internal_flags; +typedef struct lame_internal_flags lame_internal_flags; +#endif + + +typedef enum short_block_e { + short_block_not_set = -1, /* allow LAME to decide */ + short_block_allowed = 0, /* LAME may use them, even different block types for L/R */ + short_block_coupled, /* LAME may use them, but always same block types in L/R */ + short_block_dispensed, /* LAME will not use short blocks, long blocks only */ + short_block_forced /* LAME will not use long blocks, short blocks only */ +} short_block_t; + +/*********************************************************************** +* +* Control Parameters set by User. These parameters are here for +* backwards compatibility with the old, non-shared lib API. +* Please use the lame_set_variablename() functions below +* +* +***********************************************************************/ +struct lame_global_struct { + unsigned int class_id; + + /* input description */ + unsigned long num_samples; /* number of samples. default=2^32-1 */ + int num_channels; /* input number of channels. default=2 */ + int samplerate_in; /* input_samp_rate in Hz. default=44.1 kHz */ + int samplerate_out; /* output_samp_rate. + default: LAME picks best value + at least not used for MP3 decoding: + Remember 44.1 kHz MP3s and AC97 */ + float scale; /* scale input by this amount before encoding + at least not used for MP3 decoding */ + float scale_left; /* scale input of channel 0 (left) by this + amount before encoding */ + float scale_right; /* scale input of channel 1 (right) by this + amount before encoding */ + + /* general control params */ + int analysis; /* collect data for a MP3 frame analyzer? */ + int write_lame_tag; /* add Xing VBR tag? */ + int decode_only; /* use lame/mpglib to convert mp3 to wav */ + int quality; /* quality setting 0=best, 9=worst default=5 */ + MPEG_mode mode; /* see enum in lame.h + default = LAME picks best value */ + int force_ms; /* force M/S mode. requires mode=1 */ + int free_format; /* use free format? default=0 */ + int findReplayGain; /* find the RG value? default=0 */ + int decode_on_the_fly; /* decode on the fly? default=0 */ + int write_id3tag_automatic; /* 1 (default) writes ID3 tags, 0 not */ + + int nogap_total; + int nogap_current; + + int substep_shaping; + int noise_shaping; + int subblock_gain; /* 0 = no, 1 = yes */ + int use_best_huffman; /* 0 = no. 1=outside loop 2=inside loop(slow) */ + + /* + * set either brate>0 or compression_ratio>0, LAME will compute + * the value of the variable not set. + * Default is compression_ratio = 11.025 + */ + int brate; /* bitrate */ + float compression_ratio; /* sizeof(wav file)/sizeof(mp3 file) */ + + + /* frame params */ + int copyright; /* mark as copyright. default=0 */ + int original; /* mark as original. default=1 */ + int extension; /* the MP3 'private extension' bit. + Meaningless */ + int emphasis; /* Input PCM is emphased PCM (for + instance from one of the rarely + emphased CDs), it is STRONGLY not + recommended to use this, because + psycho does not take it into account, + and last but not least many decoders + don't care about these bits */ + int error_protection; /* use 2 bytes per frame for a CRC + checksum. default=0 */ + int strict_ISO; /* enforce ISO spec as much as possible */ + + int disable_reservoir; /* use bit reservoir? */ + + /* quantization/noise shaping */ + int quant_comp; + int quant_comp_short; + int experimentalY; + int experimentalZ; + int exp_nspsytune; + + int preset; + + /* VBR control */ + vbr_mode VBR; + float VBR_q_frac; /* Range [0,...,1[ */ + int VBR_q; /* Range [0,...,9] */ + int VBR_mean_bitrate_kbps; + int VBR_min_bitrate_kbps; + int VBR_max_bitrate_kbps; + int VBR_hard_min; /* strictly enforce VBR_min_bitrate + normaly, it will be violated for analog + silence */ + + + /* resampling and filtering */ + int lowpassfreq; /* freq in Hz. 0=lame choses. + -1=no filter */ + int highpassfreq; /* freq in Hz. 0=lame choses. + -1=no filter */ + int lowpasswidth; /* freq width of filter, in Hz + (default=15%) */ + int highpasswidth; /* freq width of filter, in Hz + (default=15%) */ + + + + /* + * psycho acoustics and other arguments which you should not change + * unless you know what you are doing + */ + float maskingadjust; + float maskingadjust_short; + int ATHonly; /* only use ATH */ + int ATHshort; /* only use ATH for short blocks */ + int noATH; /* disable ATH */ + int ATHtype; /* select ATH formula */ + float ATHcurve; /* change ATH formula 4 shape */ + float ATH_lower_db; /* lower ATH by this many db */ + int athaa_type; /* select ATH auto-adjust scheme */ + float athaa_sensitivity; /* dB, tune active region of auto-level */ + short_block_t short_blocks; + int useTemporal; /* use temporal masking effect */ + float interChRatio; + float msfix; /* Naoki's adjustment of Mid/Side maskings */ + + int tune; /* 0 off, 1 on */ + float tune_value_a; /* used to pass values for debugging and stuff */ + + float attackthre; /* attack threshold for L/R/M channel */ + float attackthre_s; /* attack threshold for S channel */ + + + struct { + void (*msgf)(const char *format, va_list ap); + + void (*debugf)(const char *format, va_list ap); + + void (*errorf)(const char *format, va_list ap); + } report; + + /************************************************************************/ + /* internal variables, do not set... */ + /* provided because they may be of use to calling application */ + /************************************************************************/ + + int lame_allocated_gfp; /* is this struct owned by calling + program or lame? */ + + + + /**************************************************************************/ + /* more internal variables are stored in this structure: */ + /**************************************************************************/ + lame_internal_flags *internal_flags; + + + struct { + int mmx; + int amd3dnow; + int sse; + + } asm_optimizations; +}; + +int is_lame_global_flags_valid(const lame_global_flags *gfp); + +#endif /* LAME_GLOBAL_FLAGS_H */ diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lameerror.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lameerror.h new file mode 100644 index 0000000..7d9216b --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/lameerror.h @@ -0,0 +1,26 @@ +/* + * A collection of LAME Error Codes + * + * Please use the constants defined here instead of some arbitrary + * values. Currently the values starting at -10 to avoid intersection + * with the -1, -2, -3 and -4 used in the current code. + * + * May be this should be a part of the include/lame.h. + */ + +typedef enum { + LAME_OKAY = 0, + LAME_NOERROR = 0, + LAME_GENERICERROR = -1, + LAME_NOMEM = -10, + LAME_BADBITRATE = -11, + LAME_BADSAMPFREQ = -12, + LAME_INTERNALERROR = -13, + + FRONTEND_READERROR = -80, + FRONTEND_WRITEERROR = -81, + FRONTEND_FILETOOLARGE = -82, + +} lame_errorcodes_t; + +/* end of lameerror.h */ diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/machine.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/machine.h new file mode 100644 index 0000000..2d02057 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/machine.h @@ -0,0 +1,195 @@ +/* + * Machine dependent defines/includes for LAME. + * + * Copyright (c) 1999 A.L. Faber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_MACHINE_H +#define LAME_MACHINE_H + +#include "version.h" + +#include +#include + +#ifdef STDC_HEADERS +# include +# include +#else + +//# ifndef HAVE_STRCHR +//# define strchr index +//# define strrchr rindex +//# endif +char *strchr(), *strrchr(); +//# ifndef HAVE_MEMCPY +//# define memcpy(d, s, n) bcopy ((s), (d), (n)) +//# define memmove(d, s, n) bcopy ((s), (d), (n)) +//# endif +#endif + +#if defined(__riscos__) && defined(FPA10) +# include "ymath.h" +#else + +# include + +#endif + +#include + +#include + +#ifdef HAVE_ERRNO_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif + +#if defined(macintosh) +# include +# include +#else + +# include +# include + +#endif + +#ifdef HAVE_INTTYPES_H +# include +#else +# ifdef HAVE_STDINT_H +# include +# endif +#endif + +#ifdef WITH_DMALLOC +#include +#endif + +/* + * 3 different types of pow() functions: + * - table lookup + * - pow() + * - exp() on some machines this is claimed to be faster than pow() + */ + +#define POW20(x) (assert(0 <= (x+Q_MAX2) && x < Q_MAX), pow20[x+Q_MAX2]) +/*#define POW20(x) pow(2.0,((double)(x)-210)*.25) */ +/*#define POW20(x) exp( ((double)(x)-210)*(.25*LOG2) ) */ + +#define IPOW20(x) (assert(0 <= x && x < Q_MAX), ipow20[x]) +/*#define IPOW20(x) exp( -((double)(x)-210)*.1875*LOG2 ) */ +/*#define IPOW20(x) pow(2.0,-((double)(x)-210)*.1875) */ + +/* in case this is used without configure */ +#ifndef inline +# define inline +#endif + +#if defined(_MSC_VER) +# undef inline +# define inline _inline +#elif defined(__SASC) || defined(__GNUC__) || defined(__ICC) || defined(__ECC) +/* if __GNUC__ we always want to inline, not only if the user requests it */ +# undef inline +# define inline __inline +#endif + +#if defined(_MSC_VER) +# pragma warning( disable : 4244 ) +/*# pragma warning( disable : 4305 ) */ +#endif + +/* + * FLOAT for variables which require at least 32 bits + * FLOAT8 for variables which require at least 64 bits + * + * On some machines, 64 bit will be faster than 32 bit. Also, some math + * routines require 64 bit float, so setting FLOAT=float will result in a + * lot of conversions. + */ + +#if (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)) +# define WIN32_LEAN_AND_MEAN +# include +# include +# define FLOAT_MAX FLT_MAX +#else +# ifndef FLOAT +typedef float FLOAT; +# ifdef FLT_MAX +# define FLOAT_MAX FLT_MAX +# else +# define FLOAT_MAX 1e37 /* approx */ +# endif +# endif +#endif + +#ifndef FLOAT8 +typedef double FLOAT8; +# ifdef DBL_MAX +# define FLOAT8_MAX DBL_MAX +# else +# define FLOAT8_MAX 1e99 /* approx */ +# endif +#else +# ifdef FLT_MAX +# define FLOAT8_MAX FLT_MAX +# else +# define FLOAT8_MAX 1e37 /* approx */ +# endif +#endif + +/* sample_t must be floating point, at least 32 bits */ +typedef FLOAT sample_t; + +#define dimension_of(array) (sizeof(array)/sizeof(array[0])) +#define beyond(array) (array+dimension_of(array)) +#define compiletime_assert(expression) enum{static_assert_##FILE##_##LINE = 1/((expression)?1:0)} +#define lame_calloc(TYPE, COUNT) ((TYPE*)calloc(COUNT, sizeof(TYPE))) +#define multiple_of(CHUNK, COUNT) (\ + ( (COUNT) < 1 || (CHUNK) < 1 || (COUNT) % (CHUNK) == 0 ) \ + ? (COUNT) \ + : ((COUNT) + (CHUNK) - (COUNT) % (CHUNK)) \ + ) + +#if 1 +#define EQ(a, b) (\ +(abs(a) > abs(b)) \ + ? (abs((a)-(b)) <= (abs(a) * 1e-6f)) \ + : (abs((a)-(b)) <= (abs(b) * 1e-6f))) +#else +#define EQ(a,b) (abs((a)-(b))<1E-37) +#endif + +#define NEQ(a, b) (!EQ(a,b)) + +#ifdef _MSC_VER +# if _MSC_VER < 1400 +# define fabsf fabs +# define powf pow +# define log10f log10 +# endif +#endif + +#endif + +/* end of machine.h */ diff --git a/library/src/main/cpp/lamemp3/mpglib_interface.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/mpglib_interface.c similarity index 100% rename from library/src/main/cpp/lamemp3/mpglib_interface.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/mpglib_interface.c diff --git a/library/src/main/cpp/lamemp3/newmdct.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.c similarity index 50% rename from library/src/main/cpp/lamemp3/newmdct.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.c index ac98abd..d28f312 100644 --- a/library/src/main/cpp/lamemp3/newmdct.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.c @@ -31,199 +31,236 @@ #endif #include -#include "lame.h" #include "machine.h" #include "encoder.h" #include "util.h" #include "newmdct.h" - #ifndef USE_GOGO_SUBBAND static const FLOAT enwindow[] = { - -4.77e-07 * 0.740951125354959 / 2.384e-06, 1.03951e-04 * 0.740951125354959 / 2.384e-06, - 9.53674e-04 * 0.740951125354959 / 2.384e-06, 2.841473e-03 * 0.740951125354959 / 2.384e-06, - 3.5758972e-02 * 0.740951125354959 / 2.384e-06, 3.401756e-03 * 0.740951125354959 / 2.384e-06, 9.83715e-04 * 0.740951125354959 / 2.384e-06, 9.9182e-05 * 0.740951125354959 / 2.384e-06, /* 15 */ - 1.2398e-05 * 0.740951125354959 / 2.384e-06, 1.91212e-04 * 0.740951125354959 / 2.384e-06, - 2.283096e-03 * 0.740951125354959 / 2.384e-06, 1.6994476e-02 * 0.740951125354959 / 2.384e-06, - -1.8756866e-02 * 0.740951125354959 / 2.384e-06, -2.630711e-03 * 0.740951125354959 / 2.384e-06, - -2.47478e-04 * 0.740951125354959 / 2.384e-06, -1.4782e-05 * 0.740951125354959 / 2.384e-06, - 9.063471690191471e-01, - 1.960342806591213e-01, - - - -4.77e-07 * 0.773010453362737 / 2.384e-06, 1.05858e-04 * 0.773010453362737 / 2.384e-06, - 9.30786e-04 * 0.773010453362737 / 2.384e-06, 2.521515e-03 * 0.773010453362737 / 2.384e-06, - 3.5694122e-02 * 0.773010453362737 / 2.384e-06, 3.643036e-03 * 0.773010453362737 / 2.384e-06, 9.91821e-04 * 0.773010453362737 / 2.384e-06, 9.6321e-05 * 0.773010453362737 / 2.384e-06, /* 14 */ - 1.1444e-05 * 0.773010453362737 / 2.384e-06, 1.65462e-04 * 0.773010453362737 / 2.384e-06, - 2.110004e-03 * 0.773010453362737 / 2.384e-06, 1.6112804e-02 * 0.773010453362737 / 2.384e-06, - -1.9634247e-02 * 0.773010453362737 / 2.384e-06, -2.803326e-03 * 0.773010453362737 / 2.384e-06, - -2.77042e-04 * 0.773010453362737 / 2.384e-06, -1.6689e-05 * 0.773010453362737 / 2.384e-06, - 8.206787908286602e-01, - 3.901806440322567e-01, - - - -4.77e-07 * 0.803207531480645 / 2.384e-06, 1.07288e-04 * 0.803207531480645 / 2.384e-06, - 9.02653e-04 * 0.803207531480645 / 2.384e-06, 2.174854e-03 * 0.803207531480645 / 2.384e-06, - 3.5586357e-02 * 0.803207531480645 / 2.384e-06, 3.858566e-03 * 0.803207531480645 / 2.384e-06, 9.95159e-04 * 0.803207531480645 / 2.384e-06, 9.3460e-05 * 0.803207531480645 / 2.384e-06, /* 13 */ - 1.0014e-05 * 0.803207531480645 / 2.384e-06, 1.40190e-04 * 0.803207531480645 / 2.384e-06, - 1.937389e-03 * 0.803207531480645 / 2.384e-06, 1.5233517e-02 * 0.803207531480645 / 2.384e-06, - -2.0506859e-02 * 0.803207531480645 / 2.384e-06, -2.974033e-03 * 0.803207531480645 / 2.384e-06, - -3.07560e-04 * 0.803207531480645 / 2.384e-06, -1.8120e-05 * 0.803207531480645 / 2.384e-06, - 7.416505462720353e-01, - 5.805693545089249e-01, - - - -4.77e-07 * 0.831469612302545 / 2.384e-06, 1.08242e-04 * 0.831469612302545 / 2.384e-06, - 8.68797e-04 * 0.831469612302545 / 2.384e-06, 1.800537e-03 * 0.831469612302545 / 2.384e-06, - 3.5435200e-02 * 0.831469612302545 / 2.384e-06, 4.049301e-03 * 0.831469612302545 / 2.384e-06, 9.94205e-04 * 0.831469612302545 / 2.384e-06, 9.0599e-05 * 0.831469612302545 / 2.384e-06, /* 12 */ - 9.060e-06 * 0.831469612302545 / 2.384e-06, 1.16348e-04 * 0.831469612302545 / 2.384e-06, - 1.766682e-03 * 0.831469612302545 / 2.384e-06, 1.4358521e-02 * 0.831469612302545 / 2.384e-06, - -2.1372318e-02 * 0.831469612302545 / 2.384e-06, -3.14188e-03 * 0.831469612302545 / 2.384e-06, - -3.39031e-04 * 0.831469612302545 / 2.384e-06, -1.9550e-05 * 0.831469612302545 / 2.384e-06, - 6.681786379192989e-01, - 7.653668647301797e-01, - - - -4.77e-07 * 0.857728610000272 / 2.384e-06, 1.08719e-04 * 0.857728610000272 / 2.384e-06, - 8.29220e-04 * 0.857728610000272 / 2.384e-06, 1.399517e-03 * 0.857728610000272 / 2.384e-06, - 3.5242081e-02 * 0.857728610000272 / 2.384e-06, 4.215240e-03 * 0.857728610000272 / 2.384e-06, 9.89437e-04 * 0.857728610000272 / 2.384e-06, 8.7261e-05 * 0.857728610000272 / 2.384e-06, /* 11 */ - 8.106e-06 * 0.857728610000272 / 2.384e-06, 9.3937e-05 * 0.857728610000272 / 2.384e-06, - 1.597881e-03 * 0.857728610000272 / 2.384e-06, 1.3489246e-02 * 0.857728610000272 / 2.384e-06, - -2.2228718e-02 * 0.857728610000272 / 2.384e-06, -3.306866e-03 * 0.857728610000272 / 2.384e-06, - -3.71456e-04 * 0.857728610000272 / 2.384e-06, -2.1458e-05 * 0.857728610000272 / 2.384e-06, - 5.993769336819237e-01, - 9.427934736519954e-01, - - - -4.77e-07 * 0.881921264348355 / 2.384e-06, 1.08719e-04 * 0.881921264348355 / 2.384e-06, - 7.8392e-04 * 0.881921264348355 / 2.384e-06, 9.71317e-04 * 0.881921264348355 / 2.384e-06, - 3.5007000e-02 * 0.881921264348355 / 2.384e-06, 4.357815e-03 * 0.881921264348355 / 2.384e-06, 9.80854e-04 * 0.881921264348355 / 2.384e-06, 8.3923e-05 * 0.881921264348355 / 2.384e-06, /* 10 */ - 7.629e-06 * 0.881921264348355 / 2.384e-06, 7.2956e-05 * 0.881921264348355 / 2.384e-06, - 1.432419e-03 * 0.881921264348355 / 2.384e-06, 1.2627602e-02 * 0.881921264348355 / 2.384e-06, - -2.3074150e-02 * 0.881921264348355 / 2.384e-06, -3.467083e-03 * 0.881921264348355 / 2.384e-06, - -4.04358e-04 * 0.881921264348355 / 2.384e-06, -2.3365e-05 * 0.881921264348355 / 2.384e-06, - 5.345111359507916e-01, - 1.111140466039205e+00, - - - -9.54e-07 * 0.903989293123443 / 2.384e-06, 1.08242e-04 * 0.903989293123443 / 2.384e-06, - 7.31945e-04 * 0.903989293123443 / 2.384e-06, 5.15938e-04 * 0.903989293123443 / 2.384e-06, - 3.4730434e-02 * 0.903989293123443 / 2.384e-06, 4.477024e-03 * 0.903989293123443 / 2.384e-06, 9.68933e-04 * 0.903989293123443 / 2.384e-06, 8.0585e-05 * 0.903989293123443 / 2.384e-06, /* 9 */ - 6.676e-06 * 0.903989293123443 / 2.384e-06, 5.2929e-05 * 0.903989293123443 / 2.384e-06, - 1.269817e-03 * 0.903989293123443 / 2.384e-06, 1.1775017e-02 * 0.903989293123443 / 2.384e-06, - -2.3907185e-02 * 0.903989293123443 / 2.384e-06, -3.622532e-03 * 0.903989293123443 / 2.384e-06, - -4.38213e-04 * 0.903989293123443 / 2.384e-06, -2.5272e-05 * 0.903989293123443 / 2.384e-06, - 4.729647758913199e-01, - 1.268786568327291e+00, - - - -9.54e-07 * 0.92387953251128675613 / 2.384e-06, - 1.06812e-04 * 0.92387953251128675613 / 2.384e-06, - 6.74248e-04 * 0.92387953251128675613 / 2.384e-06, - 3.3379e-05 * 0.92387953251128675613 / 2.384e-06, - 3.4412861e-02 * 0.92387953251128675613 / 2.384e-06, - 4.573822e-03 * 0.92387953251128675613 / 2.384e-06, - 9.54151e-04 * 0.92387953251128675613 / 2.384e-06, - 7.6771e-05 * 0.92387953251128675613 / 2.384e-06, - 6.199e-06 * 0.92387953251128675613 / 2.384e-06, 3.4332e-05 * 0.92387953251128675613 / 2.384e-06, - 1.111031e-03 * 0.92387953251128675613 / 2.384e-06, - 1.0933399e-02 * 0.92387953251128675613 / 2.384e-06, - -2.4725437e-02 * 0.92387953251128675613 / 2.384e-06, - -3.771782e-03 * 0.92387953251128675613 / 2.384e-06, - -4.72546e-04 * 0.92387953251128675613 / 2.384e-06, - -2.7657e-05 * 0.92387953251128675613 / 2.384e-06, - 4.1421356237309504879e-01, /* tan(PI/8) */ - 1.414213562373095e+00, - - - -9.54e-07 * 0.941544065183021 / 2.384e-06, 1.05381e-04 * 0.941544065183021 / 2.384e-06, - 6.10352e-04 * 0.941544065183021 / 2.384e-06, -4.75883e-04 * 0.941544065183021 / 2.384e-06, - 3.4055710e-02 * 0.941544065183021 / 2.384e-06, 4.649162e-03 * 0.941544065183021 / 2.384e-06, 9.35555e-04 * 0.941544065183021 / 2.384e-06, 7.3433e-05 * 0.941544065183021 / 2.384e-06, /* 7 */ - 5.245e-06 * 0.941544065183021 / 2.384e-06, 1.7166e-05 * 0.941544065183021 / 2.384e-06, - 9.56535e-04 * 0.941544065183021 / 2.384e-06, 1.0103703e-02 * 0.941544065183021 / 2.384e-06, - -2.5527000e-02 * 0.941544065183021 / 2.384e-06, -3.914356e-03 * 0.941544065183021 / 2.384e-06, - -5.07355e-04 * 0.941544065183021 / 2.384e-06, -3.0041e-05 * 0.941544065183021 / 2.384e-06, - 3.578057213145241e-01, - 1.546020906725474e+00, - - - -9.54e-07 * 0.956940335732209 / 2.384e-06, 1.02520e-04 * 0.956940335732209 / 2.384e-06, - 5.39303e-04 * 0.956940335732209 / 2.384e-06, -1.011848e-03 * 0.956940335732209 / 2.384e-06, - 3.3659935e-02 * 0.956940335732209 / 2.384e-06, 4.703045e-03 * 0.956940335732209 / 2.384e-06, 9.15051e-04 * 0.956940335732209 / 2.384e-06, 7.0095e-05 * 0.956940335732209 / 2.384e-06, /* 6 */ - 4.768e-06 * 0.956940335732209 / 2.384e-06, 9.54e-07 * 0.956940335732209 / 2.384e-06, - 8.06808e-04 * 0.956940335732209 / 2.384e-06, 9.287834e-03 * 0.956940335732209 / 2.384e-06, - -2.6310921e-02 * 0.956940335732209 / 2.384e-06, -4.048824e-03 * 0.956940335732209 / 2.384e-06, - -5.42164e-04 * 0.956940335732209 / 2.384e-06, -3.2425e-05 * 0.956940335732209 / 2.384e-06, - 3.033466836073424e-01, - 1.662939224605090e+00, - - - -1.431e-06 * 0.970031253194544 / 2.384e-06, 9.9182e-05 * 0.970031253194544 / 2.384e-06, - 4.62532e-04 * 0.970031253194544 / 2.384e-06, -1.573563e-03 * 0.970031253194544 / 2.384e-06, - 3.3225536e-02 * 0.970031253194544 / 2.384e-06, 4.737377e-03 * 0.970031253194544 / 2.384e-06, 8.91685e-04 * 0.970031253194544 / 2.384e-06, 6.6280e-05 * 0.970031253194544 / 2.384e-06, /* 5 */ - 4.292e-06 * 0.970031253194544 / 2.384e-06, -1.3828e-05 * 0.970031253194544 / 2.384e-06, - 6.61850e-04 * 0.970031253194544 / 2.384e-06, 8.487225e-03 * 0.970031253194544 / 2.384e-06, - -2.7073860e-02 * 0.970031253194544 / 2.384e-06, -4.174709e-03 * 0.970031253194544 / 2.384e-06, - -5.76973e-04 * 0.970031253194544 / 2.384e-06, -3.4809e-05 * 0.970031253194544 / 2.384e-06, - 2.504869601913055e-01, - 1.763842528696710e+00, - - - -1.431e-06 * 0.98078528040323 / 2.384e-06, 9.5367e-05 * 0.98078528040323 / 2.384e-06, - 3.78609e-04 * 0.98078528040323 / 2.384e-06, -2.161503e-03 * 0.98078528040323 / 2.384e-06, - 3.2754898e-02 * 0.98078528040323 / 2.384e-06, 4.752159e-03 * 0.98078528040323 / 2.384e-06, 8.66413e-04 * 0.98078528040323 / 2.384e-06, 6.2943e-05 * 0.98078528040323 / 2.384e-06, /* 4 */ - 3.815e-06 * 0.98078528040323 / 2.384e-06, -2.718e-05 * 0.98078528040323 / 2.384e-06, - 5.22137e-04 * 0.98078528040323 / 2.384e-06, 7.703304e-03 * 0.98078528040323 / 2.384e-06, - -2.7815342e-02 * 0.98078528040323 / 2.384e-06, -4.290581e-03 * 0.98078528040323 / 2.384e-06, - -6.11782e-04 * 0.98078528040323 / 2.384e-06, -3.7670e-05 * 0.98078528040323 / 2.384e-06, - 1.989123673796580e-01, - 1.847759065022573e+00, - - - -1.907e-06 * 0.989176509964781 / 2.384e-06, 9.0122e-05 * 0.989176509964781 / 2.384e-06, - 2.88486e-04 * 0.989176509964781 / 2.384e-06, -2.774239e-03 * 0.989176509964781 / 2.384e-06, - 3.2248020e-02 * 0.989176509964781 / 2.384e-06, 4.748821e-03 * 0.989176509964781 / 2.384e-06, 8.38757e-04 * 0.989176509964781 / 2.384e-06, 5.9605e-05 * 0.989176509964781 / 2.384e-06, /* 3 */ - 3.338e-06 * 0.989176509964781 / 2.384e-06, -3.9577e-05 * 0.989176509964781 / 2.384e-06, - 3.88145e-04 * 0.989176509964781 / 2.384e-06, 6.937027e-03 * 0.989176509964781 / 2.384e-06, - -2.8532982e-02 * 0.989176509964781 / 2.384e-06, -4.395962e-03 * 0.989176509964781 / 2.384e-06, - -6.46591e-04 * 0.989176509964781 / 2.384e-06, -4.0531e-05 * 0.989176509964781 / 2.384e-06, - 1.483359875383474e-01, - 1.913880671464418e+00, - - - -1.907e-06 * 0.995184726672197 / 2.384e-06, 8.4400e-05 * 0.995184726672197 / 2.384e-06, - 1.91689e-04 * 0.995184726672197 / 2.384e-06, -3.411293e-03 * 0.995184726672197 / 2.384e-06, - 3.1706810e-02 * 0.995184726672197 / 2.384e-06, 4.728317e-03 * 0.995184726672197 / 2.384e-06, - 8.09669e-04 * 0.995184726672197 / 2.384e-06, 5.579e-05 * 0.995184726672197 / 2.384e-06, - 3.338e-06 * 0.995184726672197 / 2.384e-06, -5.0545e-05 * 0.995184726672197 / 2.384e-06, - 2.59876e-04 * 0.995184726672197 / 2.384e-06, 6.189346e-03 * 0.995184726672197 / 2.384e-06, - -2.9224873e-02 * 0.995184726672197 / 2.384e-06, -4.489899e-03 * 0.995184726672197 / 2.384e-06, - -6.80923e-04 * 0.995184726672197 / 2.384e-06, -4.3392e-05 * 0.995184726672197 / 2.384e-06, - 9.849140335716425e-02, - 1.961570560806461e+00, - - - -2.384e-06 * 0.998795456205172 / 2.384e-06, 7.7724e-05 * 0.998795456205172 / 2.384e-06, - 8.8215e-05 * 0.998795456205172 / 2.384e-06, -4.072189e-03 * 0.998795456205172 / 2.384e-06, - 3.1132698e-02 * 0.998795456205172 / 2.384e-06, 4.691124e-03 * 0.998795456205172 / 2.384e-06, - 7.79152e-04 * 0.998795456205172 / 2.384e-06, 5.2929e-05 * 0.998795456205172 / 2.384e-06, - 2.861e-06 * 0.998795456205172 / 2.384e-06, -6.0558e-05 * 0.998795456205172 / 2.384e-06, - 1.37329e-04 * 0.998795456205172 / 2.384e-06, 5.462170e-03 * 0.998795456205172 / 2.384e-06, - -2.9890060e-02 * 0.998795456205172 / 2.384e-06, -4.570484e-03 * 0.998795456205172 / 2.384e-06, - -7.14302e-04 * 0.998795456205172 / 2.384e-06, -4.6253e-05 * 0.998795456205172 / 2.384e-06, - 4.912684976946725e-02, - 1.990369453344394e+00, - - - 3.5780907e-02 * SQRT2 * 0.5 / 2.384e-06, 1.7876148e-02 * SQRT2 * 0.5 / 2.384e-06, - 3.134727e-03 * SQRT2 * 0.5 / 2.384e-06, 2.457142e-03 * SQRT2 * 0.5 / 2.384e-06, - 9.71317e-04 * SQRT2 * 0.5 / 2.384e-06, 2.18868e-04 * SQRT2 * 0.5 / 2.384e-06, - 1.01566e-04 * SQRT2 * 0.5 / 2.384e-06, 1.3828e-05 * SQRT2 * 0.5 / 2.384e-06, - - 3.0526638e-02 / 2.384e-06, 4.638195e-03 / 2.384e-06, 7.47204e-04 / 2.384e-06, - 4.9591e-05 / 2.384e-06, - 4.756451e-03 / 2.384e-06, 2.1458e-05 / 2.384e-06, -6.9618e-05 / 2.384e-06, /* 2.384e-06/2.384e-06 */ + -4.77e-07 * 0.740951125354959 / 2.384e-06, 1.03951e-04 * 0.740951125354959 / 2.384e-06, + 9.53674e-04 * 0.740951125354959 / 2.384e-06, 2.841473e-03 * 0.740951125354959 / 2.384e-06, + 3.5758972e-02 * 0.740951125354959 / 2.384e-06, 3.401756e-03 * 0.740951125354959 / 2.384e-06, + 9.83715e-04 * 0.740951125354959 / 2.384e-06, + 9.9182e-05 * 0.740951125354959 / 2.384e-06, /* 15 */ + 1.2398e-05 * 0.740951125354959 / 2.384e-06, 1.91212e-04 * 0.740951125354959 / 2.384e-06, + 2.283096e-03 * 0.740951125354959 / 2.384e-06, 1.6994476e-02 * 0.740951125354959 / 2.384e-06, + -1.8756866e-02 * 0.740951125354959 / 2.384e-06, + -2.630711e-03 * 0.740951125354959 / 2.384e-06, + -2.47478e-04 * 0.740951125354959 / 2.384e-06, -1.4782e-05 * 0.740951125354959 / 2.384e-06, + 9.063471690191471e-01, + 1.960342806591213e-01, + + + -4.77e-07 * 0.773010453362737 / 2.384e-06, 1.05858e-04 * 0.773010453362737 / 2.384e-06, + 9.30786e-04 * 0.773010453362737 / 2.384e-06, 2.521515e-03 * 0.773010453362737 / 2.384e-06, + 3.5694122e-02 * 0.773010453362737 / 2.384e-06, 3.643036e-03 * 0.773010453362737 / 2.384e-06, + 9.91821e-04 * 0.773010453362737 / 2.384e-06, + 9.6321e-05 * 0.773010453362737 / 2.384e-06, /* 14 */ + 1.1444e-05 * 0.773010453362737 / 2.384e-06, 1.65462e-04 * 0.773010453362737 / 2.384e-06, + 2.110004e-03 * 0.773010453362737 / 2.384e-06, 1.6112804e-02 * 0.773010453362737 / 2.384e-06, + -1.9634247e-02 * 0.773010453362737 / 2.384e-06, + -2.803326e-03 * 0.773010453362737 / 2.384e-06, + -2.77042e-04 * 0.773010453362737 / 2.384e-06, -1.6689e-05 * 0.773010453362737 / 2.384e-06, + 8.206787908286602e-01, + 3.901806440322567e-01, + + + -4.77e-07 * 0.803207531480645 / 2.384e-06, 1.07288e-04 * 0.803207531480645 / 2.384e-06, + 9.02653e-04 * 0.803207531480645 / 2.384e-06, 2.174854e-03 * 0.803207531480645 / 2.384e-06, + 3.5586357e-02 * 0.803207531480645 / 2.384e-06, 3.858566e-03 * 0.803207531480645 / 2.384e-06, + 9.95159e-04 * 0.803207531480645 / 2.384e-06, + 9.3460e-05 * 0.803207531480645 / 2.384e-06, /* 13 */ + 1.0014e-05 * 0.803207531480645 / 2.384e-06, 1.40190e-04 * 0.803207531480645 / 2.384e-06, + 1.937389e-03 * 0.803207531480645 / 2.384e-06, 1.5233517e-02 * 0.803207531480645 / 2.384e-06, + -2.0506859e-02 * 0.803207531480645 / 2.384e-06, + -2.974033e-03 * 0.803207531480645 / 2.384e-06, + -3.07560e-04 * 0.803207531480645 / 2.384e-06, -1.8120e-05 * 0.803207531480645 / 2.384e-06, + 7.416505462720353e-01, + 5.805693545089249e-01, + + + -4.77e-07 * 0.831469612302545 / 2.384e-06, 1.08242e-04 * 0.831469612302545 / 2.384e-06, + 8.68797e-04 * 0.831469612302545 / 2.384e-06, 1.800537e-03 * 0.831469612302545 / 2.384e-06, + 3.5435200e-02 * 0.831469612302545 / 2.384e-06, 4.049301e-03 * 0.831469612302545 / 2.384e-06, + 9.94205e-04 * 0.831469612302545 / 2.384e-06, + 9.0599e-05 * 0.831469612302545 / 2.384e-06, /* 12 */ + 9.060e-06 * 0.831469612302545 / 2.384e-06, 1.16348e-04 * 0.831469612302545 / 2.384e-06, + 1.766682e-03 * 0.831469612302545 / 2.384e-06, 1.4358521e-02 * 0.831469612302545 / 2.384e-06, + -2.1372318e-02 * 0.831469612302545 / 2.384e-06, + -3.14188e-03 * 0.831469612302545 / 2.384e-06, + -3.39031e-04 * 0.831469612302545 / 2.384e-06, -1.9550e-05 * 0.831469612302545 / 2.384e-06, + 6.681786379192989e-01, + 7.653668647301797e-01, + + + -4.77e-07 * 0.857728610000272 / 2.384e-06, 1.08719e-04 * 0.857728610000272 / 2.384e-06, + 8.29220e-04 * 0.857728610000272 / 2.384e-06, 1.399517e-03 * 0.857728610000272 / 2.384e-06, + 3.5242081e-02 * 0.857728610000272 / 2.384e-06, 4.215240e-03 * 0.857728610000272 / 2.384e-06, + 9.89437e-04 * 0.857728610000272 / 2.384e-06, + 8.7261e-05 * 0.857728610000272 / 2.384e-06, /* 11 */ + 8.106e-06 * 0.857728610000272 / 2.384e-06, 9.3937e-05 * 0.857728610000272 / 2.384e-06, + 1.597881e-03 * 0.857728610000272 / 2.384e-06, 1.3489246e-02 * 0.857728610000272 / 2.384e-06, + -2.2228718e-02 * 0.857728610000272 / 2.384e-06, + -3.306866e-03 * 0.857728610000272 / 2.384e-06, + -3.71456e-04 * 0.857728610000272 / 2.384e-06, -2.1458e-05 * 0.857728610000272 / 2.384e-06, + 5.993769336819237e-01, + 9.427934736519954e-01, + + + -4.77e-07 * 0.881921264348355 / 2.384e-06, 1.08719e-04 * 0.881921264348355 / 2.384e-06, + 7.8392e-04 * 0.881921264348355 / 2.384e-06, 9.71317e-04 * 0.881921264348355 / 2.384e-06, + 3.5007000e-02 * 0.881921264348355 / 2.384e-06, 4.357815e-03 * 0.881921264348355 / 2.384e-06, + 9.80854e-04 * 0.881921264348355 / 2.384e-06, + 8.3923e-05 * 0.881921264348355 / 2.384e-06, /* 10 */ + 7.629e-06 * 0.881921264348355 / 2.384e-06, 7.2956e-05 * 0.881921264348355 / 2.384e-06, + 1.432419e-03 * 0.881921264348355 / 2.384e-06, 1.2627602e-02 * 0.881921264348355 / 2.384e-06, + -2.3074150e-02 * 0.881921264348355 / 2.384e-06, + -3.467083e-03 * 0.881921264348355 / 2.384e-06, + -4.04358e-04 * 0.881921264348355 / 2.384e-06, -2.3365e-05 * 0.881921264348355 / 2.384e-06, + 5.345111359507916e-01, + 1.111140466039205e+00, + + + -9.54e-07 * 0.903989293123443 / 2.384e-06, 1.08242e-04 * 0.903989293123443 / 2.384e-06, + 7.31945e-04 * 0.903989293123443 / 2.384e-06, 5.15938e-04 * 0.903989293123443 / 2.384e-06, + 3.4730434e-02 * 0.903989293123443 / 2.384e-06, 4.477024e-03 * 0.903989293123443 / 2.384e-06, + 9.68933e-04 * 0.903989293123443 / 2.384e-06, + 8.0585e-05 * 0.903989293123443 / 2.384e-06, /* 9 */ + 6.676e-06 * 0.903989293123443 / 2.384e-06, 5.2929e-05 * 0.903989293123443 / 2.384e-06, + 1.269817e-03 * 0.903989293123443 / 2.384e-06, 1.1775017e-02 * 0.903989293123443 / 2.384e-06, + -2.3907185e-02 * 0.903989293123443 / 2.384e-06, + -3.622532e-03 * 0.903989293123443 / 2.384e-06, + -4.38213e-04 * 0.903989293123443 / 2.384e-06, -2.5272e-05 * 0.903989293123443 / 2.384e-06, + 4.729647758913199e-01, + 1.268786568327291e+00, + + + -9.54e-07 * 0.92387953251128675613 / 2.384e-06, + 1.06812e-04 * 0.92387953251128675613 / 2.384e-06, + 6.74248e-04 * 0.92387953251128675613 / 2.384e-06, + 3.3379e-05 * 0.92387953251128675613 / 2.384e-06, + 3.4412861e-02 * 0.92387953251128675613 / 2.384e-06, + 4.573822e-03 * 0.92387953251128675613 / 2.384e-06, + 9.54151e-04 * 0.92387953251128675613 / 2.384e-06, + 7.6771e-05 * 0.92387953251128675613 / 2.384e-06, + 6.199e-06 * 0.92387953251128675613 / 2.384e-06, + 3.4332e-05 * 0.92387953251128675613 / 2.384e-06, + 1.111031e-03 * 0.92387953251128675613 / 2.384e-06, + 1.0933399e-02 * 0.92387953251128675613 / 2.384e-06, + -2.4725437e-02 * 0.92387953251128675613 / 2.384e-06, + -3.771782e-03 * 0.92387953251128675613 / 2.384e-06, + -4.72546e-04 * 0.92387953251128675613 / 2.384e-06, + -2.7657e-05 * 0.92387953251128675613 / 2.384e-06, + 4.1421356237309504879e-01, /* tan(PI/8) */ + 1.414213562373095e+00, + + + -9.54e-07 * 0.941544065183021 / 2.384e-06, 1.05381e-04 * 0.941544065183021 / 2.384e-06, + 6.10352e-04 * 0.941544065183021 / 2.384e-06, -4.75883e-04 * 0.941544065183021 / 2.384e-06, + 3.4055710e-02 * 0.941544065183021 / 2.384e-06, 4.649162e-03 * 0.941544065183021 / 2.384e-06, + 9.35555e-04 * 0.941544065183021 / 2.384e-06, + 7.3433e-05 * 0.941544065183021 / 2.384e-06, /* 7 */ + 5.245e-06 * 0.941544065183021 / 2.384e-06, 1.7166e-05 * 0.941544065183021 / 2.384e-06, + 9.56535e-04 * 0.941544065183021 / 2.384e-06, 1.0103703e-02 * 0.941544065183021 / 2.384e-06, + -2.5527000e-02 * 0.941544065183021 / 2.384e-06, + -3.914356e-03 * 0.941544065183021 / 2.384e-06, + -5.07355e-04 * 0.941544065183021 / 2.384e-06, -3.0041e-05 * 0.941544065183021 / 2.384e-06, + 3.578057213145241e-01, + 1.546020906725474e+00, + + + -9.54e-07 * 0.956940335732209 / 2.384e-06, 1.02520e-04 * 0.956940335732209 / 2.384e-06, + 5.39303e-04 * 0.956940335732209 / 2.384e-06, -1.011848e-03 * 0.956940335732209 / 2.384e-06, + 3.3659935e-02 * 0.956940335732209 / 2.384e-06, 4.703045e-03 * 0.956940335732209 / 2.384e-06, + 9.15051e-04 * 0.956940335732209 / 2.384e-06, + 7.0095e-05 * 0.956940335732209 / 2.384e-06, /* 6 */ + 4.768e-06 * 0.956940335732209 / 2.384e-06, 9.54e-07 * 0.956940335732209 / 2.384e-06, + 8.06808e-04 * 0.956940335732209 / 2.384e-06, 9.287834e-03 * 0.956940335732209 / 2.384e-06, + -2.6310921e-02 * 0.956940335732209 / 2.384e-06, + -4.048824e-03 * 0.956940335732209 / 2.384e-06, + -5.42164e-04 * 0.956940335732209 / 2.384e-06, -3.2425e-05 * 0.956940335732209 / 2.384e-06, + 3.033466836073424e-01, + 1.662939224605090e+00, + + + -1.431e-06 * 0.970031253194544 / 2.384e-06, 9.9182e-05 * 0.970031253194544 / 2.384e-06, + 4.62532e-04 * 0.970031253194544 / 2.384e-06, -1.573563e-03 * 0.970031253194544 / 2.384e-06, + 3.3225536e-02 * 0.970031253194544 / 2.384e-06, 4.737377e-03 * 0.970031253194544 / 2.384e-06, + 8.91685e-04 * 0.970031253194544 / 2.384e-06, + 6.6280e-05 * 0.970031253194544 / 2.384e-06, /* 5 */ + 4.292e-06 * 0.970031253194544 / 2.384e-06, -1.3828e-05 * 0.970031253194544 / 2.384e-06, + 6.61850e-04 * 0.970031253194544 / 2.384e-06, 8.487225e-03 * 0.970031253194544 / 2.384e-06, + -2.7073860e-02 * 0.970031253194544 / 2.384e-06, + -4.174709e-03 * 0.970031253194544 / 2.384e-06, + -5.76973e-04 * 0.970031253194544 / 2.384e-06, -3.4809e-05 * 0.970031253194544 / 2.384e-06, + 2.504869601913055e-01, + 1.763842528696710e+00, + + + -1.431e-06 * 0.98078528040323 / 2.384e-06, 9.5367e-05 * 0.98078528040323 / 2.384e-06, + 3.78609e-04 * 0.98078528040323 / 2.384e-06, -2.161503e-03 * 0.98078528040323 / 2.384e-06, + 3.2754898e-02 * 0.98078528040323 / 2.384e-06, 4.752159e-03 * 0.98078528040323 / 2.384e-06, + 8.66413e-04 * 0.98078528040323 / 2.384e-06, + 6.2943e-05 * 0.98078528040323 / 2.384e-06, /* 4 */ + 3.815e-06 * 0.98078528040323 / 2.384e-06, -2.718e-05 * 0.98078528040323 / 2.384e-06, + 5.22137e-04 * 0.98078528040323 / 2.384e-06, 7.703304e-03 * 0.98078528040323 / 2.384e-06, + -2.7815342e-02 * 0.98078528040323 / 2.384e-06, -4.290581e-03 * 0.98078528040323 / 2.384e-06, + -6.11782e-04 * 0.98078528040323 / 2.384e-06, -3.7670e-05 * 0.98078528040323 / 2.384e-06, + 1.989123673796580e-01, + 1.847759065022573e+00, + + + -1.907e-06 * 0.989176509964781 / 2.384e-06, 9.0122e-05 * 0.989176509964781 / 2.384e-06, + 2.88486e-04 * 0.989176509964781 / 2.384e-06, -2.774239e-03 * 0.989176509964781 / 2.384e-06, + 3.2248020e-02 * 0.989176509964781 / 2.384e-06, 4.748821e-03 * 0.989176509964781 / 2.384e-06, + 8.38757e-04 * 0.989176509964781 / 2.384e-06, + 5.9605e-05 * 0.989176509964781 / 2.384e-06, /* 3 */ + 3.338e-06 * 0.989176509964781 / 2.384e-06, -3.9577e-05 * 0.989176509964781 / 2.384e-06, + 3.88145e-04 * 0.989176509964781 / 2.384e-06, 6.937027e-03 * 0.989176509964781 / 2.384e-06, + -2.8532982e-02 * 0.989176509964781 / 2.384e-06, + -4.395962e-03 * 0.989176509964781 / 2.384e-06, + -6.46591e-04 * 0.989176509964781 / 2.384e-06, -4.0531e-05 * 0.989176509964781 / 2.384e-06, + 1.483359875383474e-01, + 1.913880671464418e+00, + + + -1.907e-06 * 0.995184726672197 / 2.384e-06, 8.4400e-05 * 0.995184726672197 / 2.384e-06, + 1.91689e-04 * 0.995184726672197 / 2.384e-06, -3.411293e-03 * 0.995184726672197 / 2.384e-06, + 3.1706810e-02 * 0.995184726672197 / 2.384e-06, 4.728317e-03 * 0.995184726672197 / 2.384e-06, + 8.09669e-04 * 0.995184726672197 / 2.384e-06, 5.579e-05 * 0.995184726672197 / 2.384e-06, + 3.338e-06 * 0.995184726672197 / 2.384e-06, -5.0545e-05 * 0.995184726672197 / 2.384e-06, + 2.59876e-04 * 0.995184726672197 / 2.384e-06, 6.189346e-03 * 0.995184726672197 / 2.384e-06, + -2.9224873e-02 * 0.995184726672197 / 2.384e-06, + -4.489899e-03 * 0.995184726672197 / 2.384e-06, + -6.80923e-04 * 0.995184726672197 / 2.384e-06, -4.3392e-05 * 0.995184726672197 / 2.384e-06, + 9.849140335716425e-02, + 1.961570560806461e+00, + + + -2.384e-06 * 0.998795456205172 / 2.384e-06, 7.7724e-05 * 0.998795456205172 / 2.384e-06, + 8.8215e-05 * 0.998795456205172 / 2.384e-06, -4.072189e-03 * 0.998795456205172 / 2.384e-06, + 3.1132698e-02 * 0.998795456205172 / 2.384e-06, 4.691124e-03 * 0.998795456205172 / 2.384e-06, + 7.79152e-04 * 0.998795456205172 / 2.384e-06, 5.2929e-05 * 0.998795456205172 / 2.384e-06, + 2.861e-06 * 0.998795456205172 / 2.384e-06, -6.0558e-05 * 0.998795456205172 / 2.384e-06, + 1.37329e-04 * 0.998795456205172 / 2.384e-06, 5.462170e-03 * 0.998795456205172 / 2.384e-06, + -2.9890060e-02 * 0.998795456205172 / 2.384e-06, + -4.570484e-03 * 0.998795456205172 / 2.384e-06, + -7.14302e-04 * 0.998795456205172 / 2.384e-06, -4.6253e-05 * 0.998795456205172 / 2.384e-06, + 4.912684976946725e-02, + 1.990369453344394e+00, + + + 3.5780907e-02 * SQRT2 * 0.5 / 2.384e-06, 1.7876148e-02 * SQRT2 * 0.5 / 2.384e-06, + 3.134727e-03 * SQRT2 * 0.5 / 2.384e-06, 2.457142e-03 * SQRT2 * 0.5 / 2.384e-06, + 9.71317e-04 * SQRT2 * 0.5 / 2.384e-06, 2.18868e-04 * SQRT2 * 0.5 / 2.384e-06, + 1.01566e-04 * SQRT2 * 0.5 / 2.384e-06, 1.3828e-05 * SQRT2 * 0.5 / 2.384e-06, + + 3.0526638e-02 / 2.384e-06, 4.638195e-03 / 2.384e-06, 7.47204e-04 / 2.384e-06, + 4.9591e-05 / 2.384e-06, + 4.756451e-03 / 2.384e-06, 2.1458e-05 / 2.384e-06, + -6.9618e-05 / 2.384e-06, /* 2.384e-06/2.384e-06 */ }; #endif @@ -232,171 +269,171 @@ static const FLOAT enwindow[] = { #define NL 36 static const FLOAT win[4][NL] = { - { - 2.382191739347913e-13, - 6.423305872147834e-13, - 9.400849094049688e-13, - 1.122435026096556e-12, - 1.183840321267481e-12, - 1.122435026096556e-12, - 9.400849094049690e-13, - 6.423305872147839e-13, - 2.382191739347918e-13, - - 5.456116108943412e-12, - 4.878985199565852e-12, - 4.240448995017367e-12, - 3.559909094758252e-12, - 2.858043359288075e-12, - 2.156177623817898e-12, - 1.475637723558783e-12, - 8.371015190102974e-13, - 2.599706096327376e-13, - - -5.456116108943412e-12, - -4.878985199565852e-12, - -4.240448995017367e-12, - -3.559909094758252e-12, - -2.858043359288076e-12, - -2.156177623817898e-12, - -1.475637723558783e-12, - -8.371015190102975e-13, - -2.599706096327376e-13, - - -2.382191739347923e-13, - -6.423305872147843e-13, - -9.400849094049696e-13, - -1.122435026096556e-12, - -1.183840321267481e-12, - -1.122435026096556e-12, - -9.400849094049694e-13, - -6.423305872147840e-13, - -2.382191739347918e-13, - }, - { - 2.382191739347913e-13, - 6.423305872147834e-13, - 9.400849094049688e-13, - 1.122435026096556e-12, - 1.183840321267481e-12, - 1.122435026096556e-12, - 9.400849094049688e-13, - 6.423305872147841e-13, - 2.382191739347918e-13, - - 5.456116108943413e-12, - 4.878985199565852e-12, - 4.240448995017367e-12, - 3.559909094758253e-12, - 2.858043359288075e-12, - 2.156177623817898e-12, - 1.475637723558782e-12, - 8.371015190102975e-13, - 2.599706096327376e-13, - - -5.461314069809755e-12, - -4.921085770524055e-12, - -4.343405037091838e-12, - -3.732668368707687e-12, - -3.093523840190885e-12, - -2.430835727329465e-12, - -1.734679010007751e-12, - -9.748253656609281e-13, - -2.797435120168326e-13, - - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - -2.283748241799531e-13, - -4.037858874020686e-13, - -2.146547464825323e-13, - }, - { - 1.316524975873958e-01, /* win[SHORT_TYPE] */ - 4.142135623730950e-01, - 7.673269879789602e-01, - - 1.091308501069271e+00, /* tantab_l */ - 1.303225372841206e+00, - 1.569685577117490e+00, - 1.920982126971166e+00, - 2.414213562373094e+00, - 3.171594802363212e+00, - 4.510708503662055e+00, - 7.595754112725146e+00, - 2.290376554843115e+01, - - 0.98480775301220802032, /* cx */ - 0.64278760968653936292, - 0.34202014332566882393, - 0.93969262078590842791, - -0.17364817766693030343, - -0.76604444311897790243, - 0.86602540378443870761, - 0.500000000000000e+00, - - -5.144957554275265e-01, /* ca */ - -4.717319685649723e-01, - -3.133774542039019e-01, - -1.819131996109812e-01, - -9.457419252642064e-02, - -4.096558288530405e-02, - -1.419856857247115e-02, - -3.699974673760037e-03, - - 8.574929257125442e-01, /* cs */ - 8.817419973177052e-01, - 9.496286491027329e-01, - 9.833145924917901e-01, - 9.955178160675857e-01, - 9.991605581781475e-01, - 9.998991952444470e-01, - 9.999931550702802e-01, - }, - { - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 0.000000000000000e+00, - 2.283748241799531e-13, - 4.037858874020686e-13, - 2.146547464825323e-13, - - 5.461314069809755e-12, - 4.921085770524055e-12, - 4.343405037091838e-12, - 3.732668368707687e-12, - 3.093523840190885e-12, - 2.430835727329466e-12, - 1.734679010007751e-12, - 9.748253656609281e-13, - 2.797435120168326e-13, - - -5.456116108943413e-12, - -4.878985199565852e-12, - -4.240448995017367e-12, - -3.559909094758253e-12, - -2.858043359288075e-12, - -2.156177623817898e-12, - -1.475637723558782e-12, - -8.371015190102975e-13, - -2.599706096327376e-13, - - -2.382191739347913e-13, - -6.423305872147834e-13, - -9.400849094049688e-13, - -1.122435026096556e-12, - -1.183840321267481e-12, - -1.122435026096556e-12, - -9.400849094049688e-13, - -6.423305872147841e-13, - -2.382191739347918e-13, - } + { + 2.382191739347913e-13, + 6.423305872147834e-13, + 9.400849094049688e-13, + 1.122435026096556e-12, + 1.183840321267481e-12, + 1.122435026096556e-12, + 9.400849094049690e-13, + 6.423305872147839e-13, + 2.382191739347918e-13, + + 5.456116108943412e-12, + 4.878985199565852e-12, + 4.240448995017367e-12, + 3.559909094758252e-12, + 2.858043359288075e-12, + 2.156177623817898e-12, + 1.475637723558783e-12, + 8.371015190102974e-13, + 2.599706096327376e-13, + + -5.456116108943412e-12, + -4.878985199565852e-12, + -4.240448995017367e-12, + -3.559909094758252e-12, + -2.858043359288076e-12, + -2.156177623817898e-12, + -1.475637723558783e-12, + -8.371015190102975e-13, + -2.599706096327376e-13, + + -2.382191739347923e-13, + -6.423305872147843e-13, + -9.400849094049696e-13, + -1.122435026096556e-12, + -1.183840321267481e-12, + -1.122435026096556e-12, + -9.400849094049694e-13, + -6.423305872147840e-13, + -2.382191739347918e-13, + }, + { + 2.382191739347913e-13, + 6.423305872147834e-13, + 9.400849094049688e-13, + 1.122435026096556e-12, + 1.183840321267481e-12, + 1.122435026096556e-12, + 9.400849094049688e-13, + 6.423305872147841e-13, + 2.382191739347918e-13, + + 5.456116108943413e-12, + 4.878985199565852e-12, + 4.240448995017367e-12, + 3.559909094758253e-12, + 2.858043359288075e-12, + 2.156177623817898e-12, + 1.475637723558782e-12, + 8.371015190102975e-13, + 2.599706096327376e-13, + + -5.461314069809755e-12, + -4.921085770524055e-12, + -4.343405037091838e-12, + -3.732668368707687e-12, + -3.093523840190885e-12, + -2.430835727329465e-12, + -1.734679010007751e-12, + -9.748253656609281e-13, + -2.797435120168326e-13, + + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + -2.283748241799531e-13, + -4.037858874020686e-13, + -2.146547464825323e-13, + }, + { + 1.316524975873958e-01, /* win[SHORT_TYPE] */ + 4.142135623730950e-01, + 7.673269879789602e-01, + + 1.091308501069271e+00, /* tantab_l */ + 1.303225372841206e+00, + 1.569685577117490e+00, + 1.920982126971166e+00, + 2.414213562373094e+00, + 3.171594802363212e+00, + 4.510708503662055e+00, + 7.595754112725146e+00, + 2.290376554843115e+01, + + 0.98480775301220802032, /* cx */ + 0.64278760968653936292, + 0.34202014332566882393, + 0.93969262078590842791, + -0.17364817766693030343, + -0.76604444311897790243, + 0.86602540378443870761, + 0.500000000000000e+00, + + -5.144957554275265e-01, /* ca */ + -4.717319685649723e-01, + -3.133774542039019e-01, + -1.819131996109812e-01, + -9.457419252642064e-02, + -4.096558288530405e-02, + -1.419856857247115e-02, + -3.699974673760037e-03, + + 8.574929257125442e-01, /* cs */ + 8.817419973177052e-01, + 9.496286491027329e-01, + 9.833145924917901e-01, + 9.955178160675857e-01, + 9.991605581781475e-01, + 9.998991952444470e-01, + 9.999931550702802e-01, + }, + { + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 0.000000000000000e+00, + 2.283748241799531e-13, + 4.037858874020686e-13, + 2.146547464825323e-13, + + 5.461314069809755e-12, + 4.921085770524055e-12, + 4.343405037091838e-12, + 3.732668368707687e-12, + 3.093523840190885e-12, + 2.430835727329466e-12, + 1.734679010007751e-12, + 9.748253656609281e-13, + 2.797435120168326e-13, + + -5.456116108943413e-12, + -4.878985199565852e-12, + -4.240448995017367e-12, + -3.559909094758253e-12, + -2.858043359288075e-12, + -2.156177623817898e-12, + -1.475637723558782e-12, + -8.371015190102975e-13, + -2.599706096327376e-13, + + -2.382191739347913e-13, + -6.423305872147834e-13, + -9.400849094049688e-13, + -1.122435026096556e-12, + -1.183840321267481e-12, + -1.122435026096556e-12, + -9.400849094049688e-13, + -6.423305872147841e-13, + -2.382191739347918e-13, + } }; #define tantab_l (win[SHORT_TYPE]+3) @@ -422,22 +459,21 @@ static const FLOAT win[4][NL] = { * new IDCT routine written by Takehiro TOMINAGA */ static const int order[] = { - 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29, - 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31 + 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29, + 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31 }; /* returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32 */ inline static void -window_subband(const sample_t * x1, FLOAT a[SBLIMIT]) -{ - int i; +window_subband(const sample_t *x1, FLOAT a[SBLIMIT]) { + int i; FLOAT const *wp = enwindow + 10; const sample_t *x2 = &x1[238 - 14 - 286]; for (i = -15; i < 0; i++) { - FLOAT w, s, t; + FLOAT w, s, t; w = wp[-10]; s = x2[-224] * w; @@ -503,7 +539,7 @@ window_subband(const sample_t * x1, FLOAT a[SBLIMIT]) x2++; } { - FLOAT s, t, u, v; + FLOAT s, t, u, v; t = x1[-16] * wp[-10]; s = x1[-32] * wp[-2]; t += (x1[-48] - x1[16]) * wp[-9]; @@ -533,7 +569,7 @@ window_subband(const sample_t * x1, FLOAT a[SBLIMIT]) a[14] = v - t; /* A3 */ } { - FLOAT xr; + FLOAT xr; xr = a[28] - a[0]; a[0] += a[28]; a[28] = xr * wp[-2 * 18 + 7]; @@ -831,11 +867,10 @@ window_subband(const sample_t * x1, FLOAT a[SBLIMIT]) /*-------------------------------------------------------------------*/ inline static void -mdct_short(FLOAT * inout) -{ - int l; +mdct_short(FLOAT *inout) { + int l; for (l = 0; l < 3; l++) { - FLOAT tc0, tc1, tc2, ts0, ts1, ts2; + FLOAT tc0, tc1, tc2, ts0, ts1, ts2; ts0 = inout[2 * 3] * win[SHORT_TYPE][0] - inout[5 * 3]; tc0 = inout[0 * 3] * win[SHORT_TYPE][2] - inout[3 * 3]; @@ -847,8 +882,10 @@ mdct_short(FLOAT * inout) ts1 = ts0 + tc0; ts2 = -ts0 + tc0; - tc0 = (inout[1 * 3] * win[SHORT_TYPE][1] - inout[4 * 3]) * 2.069978111953089e-11; /* tritab_s[1] */ - ts0 = (inout[4 * 3] * win[SHORT_TYPE][1] + inout[1 * 3]) * 2.069978111953089e-11; /* tritab_s[1] */ + tc0 = (inout[1 * 3] * win[SHORT_TYPE][1] - inout[4 * 3]) * + 2.069978111953089e-11; /* tritab_s[1] */ + ts0 = (inout[4 * 3] * win[SHORT_TYPE][1] + inout[1 * 3]) * + 2.069978111953089e-11; /* tritab_s[1] */ inout[3 * 0] = tc1 * 1.907525191737280e-11 /* tritab_s[2] */ + tc0; inout[3 * 5] = -ts1 * 1.907525191737280e-11 /* tritab_s[0] */ + ts0; @@ -868,11 +905,10 @@ mdct_short(FLOAT * inout) } inline static void -mdct_long(FLOAT * out, FLOAT const *in) -{ - FLOAT ct, st; +mdct_long(FLOAT *out, FLOAT const *in) { + FLOAT ct, st; { - FLOAT tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8; + FLOAT tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8; /* 1,2, 5,6, 9,10, 13,14, 17 */ tc1 = in[17] - in[9]; tc3 = in[15] - in[11]; @@ -906,7 +942,7 @@ mdct_long(FLOAT * out, FLOAT const *in) out[14] = ct - st; } { - FLOAT ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8; + FLOAT ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8; ts1 = in[8] - in[0]; ts3 = in[6] - in[2]; @@ -943,21 +979,20 @@ mdct_long(FLOAT * out, FLOAT const *in) void -mdct_sub48(lame_internal_flags * gfc, const sample_t * w0, const sample_t * w1) -{ +mdct_sub48(lame_internal_flags *gfc, const sample_t *w0, const sample_t *w1) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - int gr, k, ch; + int gr, k, ch; const sample_t *wk; wk = w0 + 286; /* thinking cache performance, ch->gr loop is better than gr->ch loop */ for (ch = 0; ch < cfg->channels_out; ch++) { for (gr = 0; gr < cfg->mode_gr; gr++) { - int band; + int band; gr_info *const gi = &(gfc->l3_side.tt[gr][ch]); - FLOAT *mdct_enc = gi->xr; - FLOAT *samp = esv->sb_sample[ch][1 - gr][0]; + FLOAT *mdct_enc = gi->xr; + FLOAT *samp = esv->sb_sample[ch][1 - gr][0]; for (k = 0; k < 18 / 2; k++) { window_subband(wk, samp); @@ -977,15 +1012,14 @@ mdct_sub48(lame_internal_flags * gfc, const sample_t * w0, const sample_t * w1) * + 18 current subband samples */ for (band = 0; band < 32; band++, mdct_enc += 18) { - int type = gi->block_type; + int type = gi->block_type; FLOAT const *const band0 = esv->sb_sample[ch][gr][0] + order[band]; - FLOAT *const band1 = esv->sb_sample[ch][1 - gr][0] + order[band]; + FLOAT *const band1 = esv->sb_sample[ch][1 - gr][0] + order[band]; if (gi->mixed_block_flag && band < 2) type = 0; if (esv->amp_filter[band] < 1e-12) { memset(mdct_enc, 0, 18 * sizeof(FLOAT)); - } - else { + } else { if (esv->amp_filter[band] < 1.0) { for (k = 0; k < 18; k++) band1[k * 32] *= esv->amp_filter[band]; @@ -1001,11 +1035,10 @@ mdct_sub48(lame_internal_flags * gfc, const sample_t * w0, const sample_t * w1) mdct_enc[k * 3 + 20] = band1[(8 - k) * 32] * w + band1[(9 + k) * 32]; } mdct_short(mdct_enc); - } - else { - FLOAT work[18]; + } else { + FLOAT work[18]; for (k = -NL / 4; k < 0; k++) { - FLOAT a, b; + FLOAT a, b; a = win[type][k + 27] * band1[(k + 9) * 32] + win[type][k + 36] * band1[(8 - k) * 32]; b = win[type][k + 9] * band0[(k + 9) * 32] @@ -1022,7 +1055,7 @@ mdct_sub48(lame_internal_flags * gfc, const sample_t * w0, const sample_t * w1) */ if (type != SHORT_TYPE && band != 0) { for (k = 7; k >= 0; --k) { - FLOAT bu, bd; + FLOAT bu, bd; bu = mdct_enc[k] * ca[k] + mdct_enc[-1 - k] * cs[k]; bd = mdct_enc[k] * cs[k] - mdct_enc[-1 - k] * ca[k]; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.h new file mode 100644 index 0000000..0d4a5fd --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/newmdct.h @@ -0,0 +1,27 @@ +/* + * New Modified DCT include file + * + * Copyright (c) 1999 Takehiro TOMINAGA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_NEWMDCT_H +#define LAME_NEWMDCT_H + +void mdct_sub48(lame_internal_flags *gfc, const sample_t *w0, const sample_t *w1); + +#endif /* LAME_NEWMDCT_H */ diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/presets.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/presets.c new file mode 100644 index 0000000..a852a7e --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/presets.c @@ -0,0 +1,391 @@ +/* + * presets.c -- Apply presets + * + * Copyright (c) 2002-2008 Gabriel Bouvigne + * Copyright (c) 2007-2012 Robert Hegemann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "lame.h" +#include "machine.h" +#include "set_get.h" +#include "encoder.h" +#include "util.h" +#include "lame_global_flags.h" + +#define SET_OPTION(opt, val, def) if (enforce) \ + (void) lame_set_##opt(gfp, val); \ + else if (!(abs(lame_get_##opt(gfp) - def) > 0)) \ + (void) lame_set_##opt(gfp, val); + +#define SET__OPTION(opt, val, def) if (enforce) \ + lame_set_##opt(gfp, val); \ + else if (!(abs(lame_get_##opt(gfp) - def) > 0)) \ + lame_set_##opt(gfp, val); + +#undef Min +#undef Max + +static inline int +min_int(int a, int b) { + if (a < b) { + return a; + } + return b; +} + +static inline int +max_int(int a, int b) { + if (a > b) { + return a; + } + return b; +} + + +typedef struct { + int vbr_q; + int quant_comp; + int quant_comp_s; + int expY; + FLOAT st_lrm; /*short threshold */ + FLOAT st_s; + FLOAT masking_adj; + FLOAT masking_adj_short; + FLOAT ath_lower; + FLOAT ath_curve; + FLOAT ath_sensitivity; + FLOAT interch; + int safejoint; + int sfb21mod; + FLOAT msfix; + FLOAT minval; + FLOAT ath_fixpoint; +} vbr_presets_t; + +/* *INDENT-OFF* */ + +/* Switch mappings for VBR mode VBR_RH */ +static const vbr_presets_t vbr_old_switch_map[] = { + /*vbr_q qcomp_l qcomp_s expY st_lrm st_s mask adj_l adj_s ath_lower ath_curve ath_sens interChR safejoint sfb21mod msfix */ + {0, 9, 9, 0, 5.20, 125.0, -4.2, -6.3, 4.8, 1, 0, 0, 2, 21, 0.97, 5, 100}, + {1, 9, 9, 0, 5.30, 125.0, -3.6, -5.6, 4.5, 1.5, 0, 0, 2, 21, 1.35, 5, 100}, + {2, 9, 9, 0, 5.60, 125.0, -2.2, -3.5, 2.8, 2, 0, 0, 2, 21, 1.49, 5, 100}, + {3, 9, 9, 1, 5.80, 130.0, -1.8, -2.8, 2.6, 3, -4, 0, 2, 20, 1.64, 5, 100}, + {4, 9, 9, 1, 6.00, 135.0, -0.7, -1.1, 1.1, 3.5, -8, 0, 2, 0, 1.79, 5, 100}, + {5, 9, 9, 1, 6.40, 140.0, 0.5, 0.4, -7.5, 4, -12, 0.0002, 0, 0, 1.95, 5, 100}, + {6, 9, 9, 1, 6.60, 145.0, 0.67, 0.65, -14.7, 6.5, -19, 0.0004, 0, 0, 2.30, 5, 100}, + {7, 9, 9, 1, 6.60, 145.0, 0.8, 0.75, -19.7, 8, -22, 0.0006, 0, 0, 2.70, 5, 100}, + {8, 9, 9, 1, 6.60, 145.0, 1.2, 1.15, -27.5, 10, -23, 0.0007, 0, 0, 0, 5, 100}, + {9, 9, 9, 1, 6.60, 145.0, 1.6, 1.6, -36, 11, -25, 0.0008, 0, 0, 0, 5, 100}, + {10, 9, 9, 1, 6.60, 145.0, 2.0, 2.0, -36, 12, -25, 0.0008, 0, 0, 0, 5, 100} +}; + +static const vbr_presets_t vbr_mt_psy_switch_map[] = { + /*vbr_q qcomp_l qcomp_s expY st_lrm st_s mask adj_l adj_s ath_lower ath_curve ath_sens --- safejoint sfb21mod msfix */ + {0, 9, 9, 0, 4.20, 25.0, -6.8, -6.8, 7.1, 1, 0, 0, 2, 31, 1.000, 5, 100}, + {1, 9, 9, 0, 4.20, 25.0, -4.8, -4.8, 5.4, 1.4, -1, 0, 2, 27, 1.122, 5, 98}, + {2, 9, 9, 0, 4.20, 25.0, -2.6, -2.6, 3.7, 2.0, -3, 0, 2, 23, 1.288, 5, 97}, + {3, 9, 9, 1, 4.20, 25.0, -1.6, -1.6, 2.0, 2.0, -5, 0, 2, 18, 1.479, 5, 96}, + {4, 9, 9, 1, 4.20, 25.0, -0.0, -0.0, 0.0, 2.0, -8, 0, 2, 12, 1.698, 5, 95}, + {5, 9, 9, 1, 4.20, 25.0, 1.3, 1.3, -6, 3.5, -11, 0, 2, 8, 1.950, 5, 94.2}, +#if 0 +{6, 9, 9, 1, 4.50, 100.0, 1.5, 1.5, -24.0, 6.0, -14, 0, 2, 4, 2.239, 3, 93.9}, +{7, 9, 9, 1, 4.80, 200.0, 1.7, 1.7, -28.0, 9.0, -20, 0, 2, 0, 2.570, 1, 93.6}, +#else + {6, 9, 9, 1, 4.50, 100.0, 2.2, 2.3, -12.0, 6.0, -14, 0, 2, 4, 2.239, 3, 93.9}, + {7, 9, 9, 1, 4.80, 200.0, 2.7, 2.7, -18.0, 9.0, -17, 0, 2, 0, 2.570, 1, 93.6}, +#endif + {8, 9, 9, 1, 5.30, 300.0, 2.8, 2.8, -21.0, 10.0, -23, 0.0002, 0, 0, 2.951, 0, 93.3}, + {9, 9, 9, 1, 6.60, 300.0, 2.8, 2.8, -23.0, 11.0, -25, 0.0006, 0, 0, 3.388, 0, 93.3}, + {10, 9, 9, 1, 25.00, 300.0, 2.8, 2.8, -25.0, 12.0, -27, 0.0025, 0, 0, 3.500, 0, 93.3} +}; + +/* *INDENT-ON* */ + +static vbr_presets_t const * +get_vbr_preset(int v) { + switch (v) { + case vbr_mtrh: + case vbr_mt: + return &vbr_mt_psy_switch_map[0]; + default: + return &vbr_old_switch_map[0]; + } +} + +#define NOOP(m) (void)p.m +#define LERP(m) (p.m = p.m + x * (q.m - p.m)) + +static void +apply_vbr_preset(lame_global_flags *gfp, int a, int enforce) { + vbr_presets_t const *vbr_preset = get_vbr_preset(lame_get_VBR(gfp)); + float x = gfp->VBR_q_frac; + vbr_presets_t p = vbr_preset[a]; + vbr_presets_t q = vbr_preset[a + 1]; + vbr_presets_t const *set = &p; + + NOOP(vbr_q); + NOOP(quant_comp); + NOOP(quant_comp_s); + NOOP(expY); + LERP(st_lrm); + LERP(st_s); + LERP(masking_adj); + LERP(masking_adj_short); + LERP(ath_lower); + LERP(ath_curve); + LERP(ath_sensitivity); + LERP(interch); + NOOP(safejoint); + LERP(sfb21mod); + LERP(msfix); + LERP(minval); + LERP(ath_fixpoint); + + (void) lame_set_VBR_q(gfp, set->vbr_q); + SET_OPTION(quant_comp, set->quant_comp, -1); + SET_OPTION(quant_comp_short, set->quant_comp_s, -1); + if (set->expY) { + (void) lame_set_experimentalY(gfp, set->expY); + } + SET_OPTION(short_threshold_lrm, set->st_lrm, -1); + SET_OPTION(short_threshold_s, set->st_s, -1); + SET_OPTION(maskingadjust, set->masking_adj, 0); + SET_OPTION(maskingadjust_short, set->masking_adj_short, 0); + if (lame_get_VBR(gfp) == vbr_mt || lame_get_VBR(gfp) == vbr_mtrh) { + lame_set_ATHtype(gfp, 5); + } + SET_OPTION(ATHlower, set->ath_lower, 0); + SET_OPTION(ATHcurve, set->ath_curve, -1); + SET_OPTION(athaa_sensitivity, set->ath_sensitivity, 0); + if (set->interch > 0) { + SET_OPTION(interChRatio, set->interch, -1); + } + + /* parameters for which there is no proper set/get interface */ + if (set->safejoint > 0) { + (void) lame_set_exp_nspsytune(gfp, lame_get_exp_nspsytune(gfp) | 2); + } + if (set->sfb21mod > 0) { + int const nsp = lame_get_exp_nspsytune(gfp); + int const val = (nsp >> 20) & 63; + if (val == 0) { + int const sf21mod = (set->sfb21mod << 20) | nsp; + (void) lame_set_exp_nspsytune(gfp, sf21mod); + } + } + SET__OPTION(msfix, set->msfix, -1); + + if (enforce == 0) { + gfp->VBR_q = a; + gfp->VBR_q_frac = x; + } + gfp->internal_flags->cfg.minval = set->minval; + { /* take care of gain adjustments */ + double const x = abs(gfp->scale); + double const y = (x > 0.f) ? (10.f * log10(x)) : 0.f; + gfp->internal_flags->cfg.ATHfixpoint = set->ath_fixpoint - y; + } +} + +static int +apply_abr_preset(lame_global_flags *gfp, int preset, int enforce) { + typedef struct { + int abr_kbps; + int quant_comp; + int quant_comp_s; + int safejoint; + FLOAT nsmsfix; + FLOAT st_lrm; /*short threshold */ + FLOAT st_s; + FLOAT scale; + FLOAT masking_adj; + FLOAT ath_lower; + FLOAT ath_curve; + FLOAT interch; + int sfscale; + } abr_presets_t; + + + /* *INDENT-OFF* */ + + /* + * Switch mappings for ABR mode + */ + const abr_presets_t abr_switch_map[] = { + /* kbps quant q_s safejoint nsmsfix st_lrm st_s scale msk ath_lwr ath_curve interch , sfscale */ + {8, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -30.0, 11, 0.0012, 1}, /* 8, impossible to use in stereo */ + {16, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -25.0, 11, 0.0010, 1}, /* 16 */ + {24, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -20.0, 11, 0.0010, 1}, /* 24 */ + {32, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -15.0, 11, 0.0010, 1}, /* 32 */ + {40, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -10.0, 11, 0.0009, 1}, /* 40 */ + {48, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -10.0, 11, 0.0009, 1}, /* 48 */ + {56, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -6.0, 11, 0.0008, 1}, /* 56 */ + {64, 9, 9, 0, 0, 6.60, 145, 0.95, 0, -2.0, 11, 0.0008, 1}, /* 64 */ + {80, 9, 9, 0, 0, 6.60, 145, 0.95, 0, .0, 8, 0.0007, 1}, /* 80 */ + {96, 9, 9, 0, 2.50, 6.60, 145, 0.95, 0, 1.0, 5.5, 0.0006, 1}, /* 96 */ + {112, 9, 9, 0, 2.25, 6.60, 145, 0.95, 0, 2.0, 4.5, 0.0005, 1}, /* 112 */ + {128, 9, 9, 0, 1.95, 6.40, 140, 0.95, 0, 3.0, 4, 0.0002, 1}, /* 128 */ + {160, 9, 9, 1, 1.79, 6.00, 135, 0.95, -2, 5.0, 3.5, 0, 1}, /* 160 */ + {192, 9, 9, 1, 1.49, 5.60, 125, 0.97, -4, 7.0, 3, 0, 0}, /* 192 */ + {224, 9, 9, 1, 1.25, 5.20, 125, 0.98, -6, 9.0, 2, 0, 0}, /* 224 */ + {256, 9, 9, 1, 0.97, 5.20, 125, 1.00, -8, 10.0, 1, 0, 0}, /* 256 */ + {320, 9, 9, 1, 0.90, 5.20, 125, 1.00, -10, 12.0, 0, 0, 0} /* 320 */ + }; + + /* *INDENT-ON* */ + + /* Variables for the ABR stuff */ + int r; + int actual_bitrate = preset; + + r = nearestBitrateFullIndex(preset); + + (void) lame_set_VBR(gfp, vbr_abr); + (void) lame_set_VBR_mean_bitrate_kbps(gfp, (actual_bitrate)); + (void) lame_set_VBR_mean_bitrate_kbps(gfp, min_int(lame_get_VBR_mean_bitrate_kbps(gfp), 320)); + (void) lame_set_VBR_mean_bitrate_kbps(gfp, max_int(lame_get_VBR_mean_bitrate_kbps(gfp), 8)); + (void) lame_set_brate(gfp, lame_get_VBR_mean_bitrate_kbps(gfp)); + + + /* parameters for which there is no proper set/get interface */ + if (abr_switch_map[r].safejoint > 0) + (void) lame_set_exp_nspsytune(gfp, lame_get_exp_nspsytune(gfp) | 2); /* safejoint */ + + if (abr_switch_map[r].sfscale > 0) + (void) lame_set_sfscale(gfp, 1); + + + SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1); + SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1); + + SET__OPTION(msfix, abr_switch_map[r].nsmsfix, -1); + + SET_OPTION(short_threshold_lrm, abr_switch_map[r].st_lrm, -1); + SET_OPTION(short_threshold_s, abr_switch_map[r].st_s, -1); + + /* ABR seems to have big problems with clipping, especially at low bitrates */ + /* so we compensate for that here by using a scale value depending on bitrate */ + lame_set_scale(gfp, lame_get_scale(gfp) * abr_switch_map[r].scale); + + SET_OPTION(maskingadjust, abr_switch_map[r].masking_adj, 0); + if (abr_switch_map[r].masking_adj > 0) { + SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj * .9, 0); + } else { + SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj * 1.1, 0); + } + + + SET_OPTION(ATHlower, abr_switch_map[r].ath_lower, 0); + SET_OPTION(ATHcurve, abr_switch_map[r].ath_curve, -1); + + SET_OPTION(interChRatio, abr_switch_map[r].interch, -1); + + (void) abr_switch_map[r].abr_kbps; + + gfp->internal_flags->cfg.minval = 5. * (abr_switch_map[r].abr_kbps / 320.); + + return preset; +} + + +int +apply_preset(lame_global_flags *gfp, int preset, int enforce) { + /*translate legacy presets */ + switch (preset) { + case R3MIX: { + preset = V3; + (void) lame_set_VBR(gfp, vbr_mtrh); + break; + } + case MEDIUM: + case MEDIUM_FAST: { + preset = V4; + (void) lame_set_VBR(gfp, vbr_mtrh); + break; + } + case STANDARD: + case STANDARD_FAST: { + preset = V2; + (void) lame_set_VBR(gfp, vbr_mtrh); + break; + } + case EXTREME: + case EXTREME_FAST: { + preset = V0; + (void) lame_set_VBR(gfp, vbr_mtrh); + break; + } + case INSANE: { + preset = 320; + gfp->preset = preset; + (void) apply_abr_preset(gfp, preset, enforce); + lame_set_VBR(gfp, vbr_off); + return preset; + } + } + + gfp->preset = preset; + { + switch (preset) { + case V9: + apply_vbr_preset(gfp, 9, enforce); + return preset; + case V8: + apply_vbr_preset(gfp, 8, enforce); + return preset; + case V7: + apply_vbr_preset(gfp, 7, enforce); + return preset; + case V6: + apply_vbr_preset(gfp, 6, enforce); + return preset; + case V5: + apply_vbr_preset(gfp, 5, enforce); + return preset; + case V4: + apply_vbr_preset(gfp, 4, enforce); + return preset; + case V3: + apply_vbr_preset(gfp, 3, enforce); + return preset; + case V2: + apply_vbr_preset(gfp, 2, enforce); + return preset; + case V1: + apply_vbr_preset(gfp, 1, enforce); + return preset; + case V0: + apply_vbr_preset(gfp, 0, enforce); + return preset; + default: + break; + } + } + if (8 <= preset && preset <= 320) { + return apply_abr_preset(gfp, preset, enforce); + } + + gfp->preset = 0; /*no corresponding preset found */ + return preset; +} diff --git a/library/src/main/cpp/lamemp3/psymodel.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.c similarity index 84% rename from library/src/main/cpp/lamemp3/psymodel.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.c index 4652596..eb6f9c6 100644 --- a/library/src/main/cpp/lamemp3/psymodel.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.c @@ -215,11 +215,10 @@ future: Data indicates that the shape of the equal loudness curve varies simply bend the existing ATH curve to achieve the desired shape. However, the potential gain may not be enough to justify an effort. */ -static FLOAT -psycho_loudness_approx(FLOAT const *energy, FLOAT const *eql_w) -{ - int i; - FLOAT loudness_power; +static FLOAT +psycho_loudness_approx(FLOAT const *energy, FLOAT const *eql_w) { + int i; + FLOAT loudness_power; loudness_power = 0.0; /* apply weights to power in freq. bands */ @@ -255,48 +254,46 @@ static const FLOAT ma_max_i1 = 3.6517412725483771; /* pow(10, (I2LIMIT + 1) / 16.0); */ static const FLOAT ma_max_i2 = 31.622776601683793; /* pow(10, (MLIMIT) / 10.0); */ -static const FLOAT ma_max_m = 31.622776601683793; +static const FLOAT ma_max_m = 31.622776601683793; - /*This is the masking table: - According to tonality, values are going from 0dB (TMN) - to 9.3dB (NMT). - After additive masking computation, 8dB are added, so - final values are going from 8dB to 17.3dB - */ +/*This is the masking table: + According to tonality, values are going from 0dB (TMN) + to 9.3dB (NMT). + After additive masking computation, 8dB are added, so + final values are going from 8dB to 17.3dB + */ static const FLOAT tab[] = { - 1.0 /*pow(10, -0) */ , - 0.79433 /*pow(10, -0.1) */ , - 0.63096 /*pow(10, -0.2) */ , - 0.63096 /*pow(10, -0.2) */ , - 0.63096 /*pow(10, -0.2) */ , - 0.63096 /*pow(10, -0.2) */ , - 0.63096 /*pow(10, -0.2) */ , - 0.25119 /*pow(10, -0.6) */ , - 0.11749 /*pow(10, -0.93) */ + 1.0 /*pow(10, -0) */ , + 0.79433 /*pow(10, -0.1) */ , + 0.63096 /*pow(10, -0.2) */ , + 0.63096 /*pow(10, -0.2) */ , + 0.63096 /*pow(10, -0.2) */ , + 0.63096 /*pow(10, -0.2) */ , + 0.63096 /*pow(10, -0.2) */ , + 0.25119 /*pow(10, -0.6) */ , + 0.11749 /*pow(10, -0.93) */ }; -static const int tab_mask_add_delta[] = { 2, 2, 2, 1, 1, 1, 0, 0, -1 }; -#define STATIC_ASSERT_EQUAL_DIMENSION(A,B) enum{static_assert_##A=1/((dimension_of(A) == dimension_of(B))?1:0)} +static const int tab_mask_add_delta[] = {2, 2, 2, 1, 1, 1, 0, 0, -1}; +#define STATIC_ASSERT_EQUAL_DIMENSION(A, B) enum{static_assert_##A=1/((dimension_of(A) == dimension_of(B))?1:0)} inline static int -mask_add_delta(int i) -{ - STATIC_ASSERT_EQUAL_DIMENSION(tab_mask_add_delta,tab); - assert(i < (int)dimension_of(tab)); +mask_add_delta(int i) { + STATIC_ASSERT_EQUAL_DIMENSION(tab_mask_add_delta, tab); + assert(i < (int) dimension_of(tab)); return tab_mask_add_delta[i]; } static void -init_mask_add_max_values(void) -{ +init_mask_add_max_values(void) { #ifndef NDEBUG FLOAT const _ma_max_i1 = pow(10, (I1LIMIT + 1) / 16.0); FLOAT const _ma_max_i2 = pow(10, (I2LIMIT + 1) / 16.0); FLOAT const _ma_max_m = pow(10, (MLIMIT) / 10.0); assert(fabs(ma_max_i1 - _ma_max_i1) <= FLT_EPSILON); assert(fabs(ma_max_i2 - _ma_max_i2) <= FLT_EPSILON); - assert(fabs(ma_max_m - _ma_max_m ) <= FLT_EPSILON); + assert(fabs(ma_max_m - _ma_max_m) <= FLT_EPSILON); #endif } @@ -305,16 +302,15 @@ init_mask_add_max_values(void) /* addition of simultaneous masking Naoki Shibata 2000/7 */ inline static FLOAT -vbrpsy_mask_add(FLOAT m1, FLOAT m2, int b, int delta) -{ +vbrpsy_mask_add(FLOAT m1, FLOAT m2, int b, int delta) { static const FLOAT table2[] = { - 1.33352 * 1.33352, 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497, - 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382, 1.22321 * 1.22321, - 1.14758 * 1.14758, - 1 + 1.33352 * 1.33352, 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497, + 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382, 1.22321 * 1.22321, + 1.14758 * 1.14758, + 1 }; - FLOAT ratio; + FLOAT ratio; if (m1 < 0) { m1 = 0; @@ -330,17 +326,15 @@ vbrpsy_mask_add(FLOAT m1, FLOAT m2, int b, int delta) } if (m2 > m1) { ratio = m2 / m1; - } - else { + } else { ratio = m1 / m2; } if (abs(b) <= delta) { /* approximately, 1 bark = 3 partitions */ /* originally 'if(i > 8)' */ if (ratio >= ma_max_i1) { return m1 + m2; - } - else { - int i = (int) (FAST_LOG10_X(ratio, 16.0f)); + } else { + int i = (int) (FAST_LOG10_X(ratio, 16.0f)); return (m1 + m2) * table2[i]; } } @@ -362,10 +356,9 @@ vbrpsy_mask_add(FLOAT m1, FLOAT m2, int b, int delta) */ static void convert_partition2scalefac(PsyConst_CB2SB_t const *const gd, FLOAT const *eb, FLOAT const *thr, - FLOAT enn_out[], FLOAT thm_out[]) -{ - FLOAT enn, thmm; - int sb, b, n = gd->n_sb; + FLOAT enn_out[], FLOAT thm_out[]) { + FLOAT enn, thmm; + int sb, b, n = gd->n_sb; enn = thmm = 0.0f; for (sb = b = 0; sb < n; ++b, ++sb) { int const bo_sb = gd->bo[sb]; @@ -406,13 +399,12 @@ convert_partition2scalefac(PsyConst_CB2SB_t const *const gd, FLOAT const *eb, FL } static void -convert_partition2scalefac_s(lame_internal_flags * gfc, FLOAT const *eb, FLOAT const *thr, int chn, - int sblock) -{ +convert_partition2scalefac_s(lame_internal_flags *gfc, FLOAT const *eb, FLOAT const *thr, int chn, + int sblock) { PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_CB2SB_t const *const gds = &gfc->cd_psy->s; - FLOAT enn[SBMAX_s], thm[SBMAX_s]; - int sb; + FLOAT enn[SBMAX_s], thm[SBMAX_s]; + int sb; convert_partition2scalefac(gds, eb, thr, enn, thm); for (sb = 0; sb < SBMAX_s; ++sb) { psv->en[chn].s[sb][sblock] = enn[sb]; @@ -422,23 +414,21 @@ convert_partition2scalefac_s(lame_internal_flags * gfc, FLOAT const *eb, FLOAT c /* longblock threshold calculation (part 2) */ static void -convert_partition2scalefac_l(lame_internal_flags * gfc, FLOAT const *eb, FLOAT const *thr, int chn) -{ +convert_partition2scalefac_l(lame_internal_flags *gfc, FLOAT const *eb, FLOAT const *thr, int chn) { PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_CB2SB_t const *const gdl = &gfc->cd_psy->l; - FLOAT *enn = &psv->en[chn].l[0]; - FLOAT *thm = &psv->thm[chn].l[0]; + FLOAT *enn = &psv->en[chn].l[0]; + FLOAT *thm = &psv->thm[chn].l[0]; convert_partition2scalefac(gdl, eb, thr, enn, thm); } static void -convert_partition2scalefac_l_to_s(lame_internal_flags * gfc, FLOAT const *eb, FLOAT const *thr, - int chn) -{ +convert_partition2scalefac_l_to_s(lame_internal_flags *gfc, FLOAT const *eb, FLOAT const *thr, + int chn) { PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_CB2SB_t const *const gds = &gfc->cd_psy->l_to_s; - FLOAT enn[SBMAX_s], thm[SBMAX_s]; - int sb, sblock; + FLOAT enn[SBMAX_s], thm[SBMAX_s]; + int sb, sblock; convert_partition2scalefac(gds, eb, thr, enn, thm); for (sb = 0; sb < SBMAX_s; ++sb) { FLOAT const scale = 1. / 64.f; @@ -452,10 +442,8 @@ convert_partition2scalefac_l_to_s(lame_internal_flags * gfc, FLOAT const *eb, FL } - static inline FLOAT -NS_INTERP(FLOAT x, FLOAT y, FLOAT r) -{ +NS_INTERP(FLOAT x, FLOAT y, FLOAT r) { /* was pow((x),(r))*pow((y),1-(r)) */ if (r >= 1.0f) return x; /* 99.7% of the time */ @@ -467,24 +455,22 @@ NS_INTERP(FLOAT x, FLOAT y, FLOAT r) } - -static FLOAT -pecalc_s(III_psy_ratio const *mr, FLOAT masking_lower) -{ - FLOAT pe_s; +static FLOAT +pecalc_s(III_psy_ratio const *mr, FLOAT masking_lower) { + FLOAT pe_s; static const FLOAT regcoef_s[] = { - 11.8, /* these values are tuned only for 44.1kHz... */ - 13.6, - 17.2, - 32, - 46.5, - 51.3, - 57.5, - 67.1, - 71.5, - 84.6, - 97.6, - 130, + 11.8, /* these values are tuned only for 44.1kHz... */ + 13.6, + 17.2, + 32, + 46.5, + 51.3, + 57.5, + 67.1, + 71.5, + 84.6, + 97.6, + 130, /* 255.8 */ }; unsigned int sb, sblock; @@ -500,8 +486,7 @@ pecalc_s(III_psy_ratio const *mr, FLOAT masking_lower) if (en > x) { if (en > x * 1e10f) { pe_s += regcoef_s[sb] * (10.0f * LOG10); - } - else { + } else { assert(x > 0); pe_s += regcoef_s[sb] * FAST_LOG10(en / x); } @@ -513,32 +498,31 @@ pecalc_s(III_psy_ratio const *mr, FLOAT masking_lower) return pe_s; } -static FLOAT -pecalc_l(III_psy_ratio const *mr, FLOAT masking_lower) -{ - FLOAT pe_l; +static FLOAT +pecalc_l(III_psy_ratio const *mr, FLOAT masking_lower) { + FLOAT pe_l; static const FLOAT regcoef_l[] = { - 6.8, /* these values are tuned only for 44.1kHz... */ - 5.8, - 5.8, - 6.4, - 6.5, - 9.9, - 12.1, - 14.4, - 15, - 18.9, - 21.6, - 26.9, - 34.2, - 40.2, - 46.8, - 56.5, - 60.7, - 73.9, - 85.7, - 93.4, - 126.1, + 6.8, /* these values are tuned only for 44.1kHz... */ + 5.8, + 5.8, + 6.4, + 6.5, + 9.9, + 12.1, + 14.4, + 15, + 18.9, + 21.6, + 26.9, + 34.2, + 40.2, + 46.8, + 56.5, + 60.7, + 73.9, + 85.7, + 93.4, + 126.1, /* 241.3 */ }; unsigned int sb; @@ -553,8 +537,7 @@ pecalc_l(III_psy_ratio const *mr, FLOAT masking_lower) if (en > x) { if (en > x * 1e10f) { pe_l += regcoef_l[sb] * (10.0f * LOG10); - } - else { + } else { assert(x > 0); pe_l += regcoef_l[sb] * FAST_LOG10(en / x); } @@ -567,13 +550,12 @@ pecalc_l(III_psy_ratio const *mr, FLOAT masking_lower) static void -calc_energy(PsyConst_CB2SB_t const *l, FLOAT const *fftenergy, FLOAT * eb, FLOAT * max, FLOAT * avg) -{ - int b, j; +calc_energy(PsyConst_CB2SB_t const *l, FLOAT const *fftenergy, FLOAT *eb, FLOAT *max, FLOAT *avg) { + int b, j; for (b = j = 0; b < l->npart; ++b) { - FLOAT ebb = 0, m = 0; - int i; + FLOAT ebb = 0, m = 0; + int i; for (i = 0; i < l->numlines[b]; ++i, ++j) { FLOAT const el = fftenergy[j]; assert(el >= 0); @@ -595,11 +577,10 @@ calc_energy(PsyConst_CB2SB_t const *l, FLOAT const *fftenergy, FLOAT * eb, FLOAT static void calc_mask_index_l(lame_internal_flags const *gfc, FLOAT const *max, - FLOAT const *avg, unsigned char *mask_idx) -{ + FLOAT const *avg, unsigned char *mask_idx) { PsyConst_CB2SB_t const *const gdl = &gfc->cd_psy->l; - FLOAT m, a; - int b, k; + FLOAT m, a; + int b, k; int const last_tab_entry = sizeof(tab) / sizeof(tab[0]) - 1; b = 0; a = avg[b] + avg[b + 1]; @@ -615,8 +596,7 @@ calc_mask_index_l(lame_internal_flags const *gfc, FLOAT const *max, if (k > last_tab_entry) k = last_tab_entry; mask_idx[b] = k; - } - else { + } else { mask_idx[b] = 0; } @@ -636,8 +616,7 @@ calc_mask_index_l(lame_internal_flags const *gfc, FLOAT const *max, if (k > last_tab_entry) k = last_tab_entry; mask_idx[b] = k; - } - else { + } else { mask_idx[b] = 0; } } @@ -657,8 +636,7 @@ calc_mask_index_l(lame_internal_flags const *gfc, FLOAT const *max, if (k > last_tab_entry) k = last_tab_entry; mask_idx[b] = k; - } - else { + } else { mask_idx[b] = 0; } assert(b == (gdl->npart - 1)); @@ -666,18 +644,16 @@ calc_mask_index_l(lame_internal_flags const *gfc, FLOAT const *max, static void -vbrpsy_compute_fft_l(lame_internal_flags * gfc, const sample_t * const buffer[2], int chn, - int gr_out, FLOAT fftenergy[HBLKSIZE], FLOAT(*wsamp_l)[BLKSIZE]) -{ +vbrpsy_compute_fft_l(lame_internal_flags *gfc, const sample_t *const buffer[2], int chn, + int gr_out, FLOAT fftenergy[HBLKSIZE], FLOAT(*wsamp_l)[BLKSIZE]) { SessionConfig_t const *const cfg = &gfc->cfg; PsyStateVar_t *psv = &gfc->sv_psy; plotting_data *plt = cfg->analysis ? gfc->pinfo : 0; - int j; + int j; if (chn < 2) { fft_long(gfc, *wsamp_l, chn, buffer); - } - else if (chn == 2) { + } else if (chn == 2) { FLOAT const sqrt2_half = SQRT2 * 0.5f; /* FFT data for mid and side channel is derived from L & R */ for (j = BLKSIZE - 1; j >= 0; --j) { @@ -701,7 +677,7 @@ vbrpsy_compute_fft_l(lame_internal_flags * gfc, const sample_t * const buffer[2] } /* total energy */ { - FLOAT totalenergy = 0.0f; + FLOAT totalenergy = 0.0f; for (j = 11; j < HBLKSIZE; j++) totalenergy += fftenergy[j]; @@ -718,10 +694,9 @@ vbrpsy_compute_fft_l(lame_internal_flags * gfc, const sample_t * const buffer[2] static void -vbrpsy_compute_fft_s(lame_internal_flags const *gfc, const sample_t * const buffer[2], int chn, - int sblock, FLOAT(*fftenergy_s)[HBLKSIZE_s], FLOAT(*wsamp_s)[3][BLKSIZE_s]) -{ - int j; +vbrpsy_compute_fft_s(lame_internal_flags const *gfc, const sample_t *const buffer[2], int chn, + int sblock, FLOAT(*fftenergy_s)[HBLKSIZE_s], FLOAT(*wsamp_s)[3][BLKSIZE_s]) { + int j; if (sblock == 0 && chn < 2) { fft_short(gfc, *wsamp_s, chn, buffer); @@ -750,13 +725,12 @@ vbrpsy_compute_fft_s(lame_internal_flags const *gfc, const sample_t * const buff } - /********************************************************************* - * compute loudness approximation (used for ATH auto-level adjustment) - *********************************************************************/ +/********************************************************************* +* compute loudness approximation (used for ATH auto-level adjustment) +*********************************************************************/ static void -vbrpsy_compute_loudness_approximation_l(lame_internal_flags * gfc, int gr_out, int chn, - const FLOAT fftenergy[HBLKSIZE]) -{ +vbrpsy_compute_loudness_approximation_l(lame_internal_flags *gfc, int gr_out, int chn, + const FLOAT fftenergy[HBLKSIZE]) { PsyStateVar_t *psv = &gfc->sv_psy; if (chn < 2) { /*no loudness for mid/side ch */ gfc->ov_psy.loudness_sq[gr_out][chn] = psv->loudness_sq_save[chn]; @@ -765,39 +739,38 @@ vbrpsy_compute_loudness_approximation_l(lame_internal_flags * gfc, int gr_out, i } - /********************************************************************** - * Apply HPF of fs/4 to the input signal. - * This is used for attack detection / handling. - **********************************************************************/ +/********************************************************************** +* Apply HPF of fs/4 to the input signal. +* This is used for attack detection / handling. +**********************************************************************/ static void -vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer[2], int gr_out, +vbrpsy_attack_detection(lame_internal_flags *gfc, const sample_t *const buffer[2], int gr_out, III_psy_ratio masking_ratio[2][2], III_psy_ratio masking_MS_ratio[2][2], FLOAT energy[4], FLOAT sub_short_factor[4][3], int ns_attacks[4][4], - int uselongblock[2]) -{ - FLOAT ns_hpfsmpl[2][576]; + int uselongblock[2]) { + FLOAT ns_hpfsmpl[2][576]; SessionConfig_t const *const cfg = &gfc->cfg; PsyStateVar_t *const psv = &gfc->sv_psy; plotting_data *plt = cfg->analysis ? gfc->pinfo : 0; int const n_chn_out = cfg->channels_out; /* chn=2 and 3 = Mid and Side channels */ int const n_chn_psy = (cfg->mode == JOINT_STEREO) ? 4 : n_chn_out; - int chn, i, j; + int chn, i, j; memset(&ns_hpfsmpl[0][0], 0, sizeof(ns_hpfsmpl)); /* Don't copy the input buffer into a temporary buffer */ /* unroll the loop 2 times */ for (chn = 0; chn < n_chn_out; chn++) { static const FLOAT fircoef[] = { - -8.65163e-18 * 2, -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2, - -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2, 0.0931738 * 2, - -5.52212e-17 * 2, -0.313819 * 2 + -8.65163e-18 * 2, -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2, + -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2, 0.0931738 * 2, + -5.52212e-17 * 2, -0.313819 * 2 }; /* apply high pass filter of fs/4 */ const sample_t *const firbuf = &buffer[chn][576 - 350 - NSFIRLEN + 192]; assert(dimension_of(fircoef) == ((NSFIRLEN - 1) / 2)); for (i = 0; i < 576; i++) { - FLOAT sum1, sum2; + FLOAT sum1, sum2; sum1 = firbuf[i + 10]; sum2 = 0.0; for (j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) { @@ -816,11 +789,11 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer } } for (chn = 0; chn < n_chn_psy; chn++) { - FLOAT attack_intensity[12]; - FLOAT en_subshort[12]; - FLOAT en_short[4] = { 0, 0, 0, 0 }; + FLOAT attack_intensity[12]; + FLOAT en_subshort[12]; + FLOAT en_short[4] = {0, 0, 0, 0}; FLOAT const *pf = ns_hpfsmpl[chn & 1]; - int ns_uselongblock = 1; + int ns_uselongblock = 1; if (chn == 2) { for (i = 0, j = 576; j > 0; ++i, --j) { @@ -843,7 +816,7 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer for (i = 0; i < 9; i++) { FLOAT const *const pfe = pf + 576 / 9; - FLOAT p = 1.; + FLOAT p = 1.; for (; pf < pfe; pf++) if (p < fabs(*pf)) p = fabs(*pf); @@ -852,12 +825,10 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer if (p > en_subshort[i + 3 - 2]) { assert(en_subshort[i + 3 - 2] > 0); p = p / en_subshort[i + 3 - 2]; - } - else if (en_subshort[i + 3 - 2] > p * 10.0f) { + } else if (en_subshort[i + 3 - 2] > p * 10.0f) { assert(p > 0); p = en_subshort[i + 3 - 2] / (p * 10.0f); - } - else { + } else { p = 0.0; } attack_intensity[i + 3] = p; @@ -866,8 +837,8 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer /* pulse like signal detection for fatboy.wav and so on */ for (i = 0; i < 3; ++i) { FLOAT const enn = - en_subshort[i * 3 + 3] + en_subshort[i * 3 + 4] + en_subshort[i * 3 + 5]; - FLOAT factor = 1.f; + en_subshort[i * 3 + 3] + en_subshort[i * 3 + 4] + en_subshort[i * 3 + 5]; + FLOAT factor = 1.f; if (en_subshort[i * 3 + 5] * 6 < enn) { factor *= 0.5f; if (en_subshort[i * 3 + 4] * 6 < enn) { @@ -878,7 +849,7 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer } if (plt) { - FLOAT x = attack_intensity[0]; + FLOAT x = attack_intensity[0]; for (i = 1; i < 12; i++) { if (x < attack_intensity[i]) { x = attack_intensity[i]; @@ -890,7 +861,7 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer /* compare energies between sub-shortblocks */ { - FLOAT x = gfc->cd_psy->attack_threshold[chn]; + FLOAT x = gfc->cd_psy->attack_threshold[chn]; for (i = 0; i < 12; i++) { if (ns_attacks[chn][i / 3] == 0) { if (attack_intensity[i] > x) { @@ -938,8 +909,7 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer if (chn < 2) { uselongblock[chn] = ns_uselongblock; - } - else { + } else { if (ns_uselongblock == 0) { uselongblock[0] = uselongblock[1] = 0; } @@ -954,13 +924,12 @@ vbrpsy_attack_detection(lame_internal_flags * gfc, const sample_t * const buffer static void -vbrpsy_skip_masking_s(lame_internal_flags * gfc, int chn, int sblock) -{ +vbrpsy_skip_masking_s(lame_internal_flags *gfc, int chn, int sblock) { if (sblock == 0) { - FLOAT *nbs2 = &gfc->sv_psy.nb_s2[chn][0]; - FLOAT *nbs1 = &gfc->sv_psy.nb_s1[chn][0]; + FLOAT *nbs2 = &gfc->sv_psy.nb_s2[chn][0]; + FLOAT *nbs1 = &gfc->sv_psy.nb_s1[chn][0]; int const n = gfc->cd_psy->s.npart; - int b; + int b; for (b = 0; b < n; b++) { nbs2[b] = nbs1[b]; } @@ -970,11 +939,10 @@ vbrpsy_skip_masking_s(lame_internal_flags * gfc, int chn, int sblock) static void vbrpsy_calc_mask_index_s(lame_internal_flags const *gfc, FLOAT const *max, - FLOAT const *avg, unsigned char *mask_idx) -{ + FLOAT const *avg, unsigned char *mask_idx) { PsyConst_CB2SB_t const *const gds = &gfc->cd_psy->s; - FLOAT m, a; - int b, k; + FLOAT m, a; + int b, k; int const last_tab_entry = dimension_of(tab) - 1; b = 0; a = avg[b] + avg[b + 1]; @@ -990,8 +958,7 @@ vbrpsy_calc_mask_index_s(lame_internal_flags const *gfc, FLOAT const *max, if (k > last_tab_entry) k = last_tab_entry; mask_idx[b] = k; - } - else { + } else { mask_idx[b] = 0; } @@ -1012,8 +979,7 @@ vbrpsy_calc_mask_index_s(lame_internal_flags const *gfc, FLOAT const *max, if (k > last_tab_entry) k = last_tab_entry; mask_idx[b] = k; - } - else { + } else { mask_idx[b] = 0; } } @@ -1033,8 +999,7 @@ vbrpsy_calc_mask_index_s(lame_internal_flags const *gfc, FLOAT const *max, if (k > last_tab_entry) k = last_tab_entry; mask_idx[b] = k; - } - else { + } else { mask_idx[b] = 0; } assert(b == (gds->npart - 1)); @@ -1042,20 +1007,19 @@ vbrpsy_calc_mask_index_s(lame_internal_flags const *gfc, FLOAT const *max, static void -vbrpsy_compute_masking_s(lame_internal_flags * gfc, const FLOAT(*fftenergy_s)[HBLKSIZE_s], - FLOAT * eb, FLOAT * thr, int chn, int sblock) -{ +vbrpsy_compute_masking_s(lame_internal_flags *gfc, const FLOAT(*fftenergy_s)[HBLKSIZE_s], + FLOAT *eb, FLOAT *thr, int chn, int sblock) { PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_CB2SB_t const *const gds = &gfc->cd_psy->s; - FLOAT max[CBANDS], avg[CBANDS]; - int i, j, b; + FLOAT max[CBANDS], avg[CBANDS]; + int i, j, b; unsigned char mask_idx_s[CBANDS]; memset(max, 0, sizeof(max)); memset(avg, 0, sizeof(avg)); for (b = j = 0; b < gds->npart; ++b) { - FLOAT ebb = 0, m = 0; + FLOAT ebb = 0, m = 0; int const n = gds->numlines[b]; for (i = 0; i < n; ++i, ++j) { FLOAT const el = fftenergy_s[sblock][j]; @@ -1074,11 +1038,11 @@ vbrpsy_compute_masking_s(lame_internal_flags * gfc, const FLOAT(*fftenergy_s)[HB assert(j == 129); vbrpsy_calc_mask_index_s(gfc, max, avg, mask_idx_s); for (j = b = 0; b < gds->npart; b++) { - int kk = gds->s3ind[b][0]; + int kk = gds->s3ind[b][0]; int const last = gds->s3ind[b][1]; int const delta = mask_add_delta(mask_idx_s[b]); - int dd, dd_n; - FLOAT x, ecb, avg_mask; + int dd, dd_n; + FLOAT x, ecb, avg_mask; FLOAT const masking_lower = gds->masking_lower[b] * gfc->sv_qnt.masking_lower; dd = mask_idx_s[kk]; @@ -1145,34 +1109,33 @@ vbrpsy_compute_masking_s(lame_internal_flags * gfc, const FLOAT(*fftenergy_s)[HB static void -vbrpsy_compute_masking_l(lame_internal_flags * gfc, const FLOAT fftenergy[HBLKSIZE], - FLOAT eb_l[CBANDS], FLOAT thr[CBANDS], int chn) -{ +vbrpsy_compute_masking_l(lame_internal_flags *gfc, const FLOAT fftenergy[HBLKSIZE], + FLOAT eb_l[CBANDS], FLOAT thr[CBANDS], int chn) { PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_CB2SB_t const *const gdl = &gfc->cd_psy->l; - FLOAT max[CBANDS], avg[CBANDS]; + FLOAT max[CBANDS], avg[CBANDS]; unsigned char mask_idx_l[CBANDS + 2]; - int k, b; + int k, b; - /********************************************************************* - * Calculate the energy and the tonality of each partition. - *********************************************************************/ + /********************************************************************* + * Calculate the energy and the tonality of each partition. + *********************************************************************/ calc_energy(gdl, fftenergy, eb_l, max, avg); calc_mask_index_l(gfc, max, avg, mask_idx_l); - /********************************************************************* - * convolve the partitioned energy and unpredictability - * with the spreading function, s3_l[b][k] - ********************************************************************/ + /********************************************************************* + * convolve the partitioned energy and unpredictability + * with the spreading function, s3_l[b][k] + ********************************************************************/ k = 0; for (b = 0; b < gdl->npart; b++) { - FLOAT x, ecb, avg_mask, t; + FLOAT x, ecb, avg_mask, t; FLOAT const masking_lower = gdl->masking_lower[b] * gfc->sv_qnt.masking_lower; /* convolve the partitioned energy with the spreading function */ - int kk = gdl->s3ind[b][0]; + int kk = gdl->s3ind[b][0]; int const last = gdl->s3ind[b][1]; int const delta = mask_add_delta(mask_idx_l[b]); - int dd = 0, dd_n = 0; + int dd = 0, dd_n = 0; dd = mask_idx_l[kk]; dd_n += 1; @@ -1212,8 +1175,7 @@ vbrpsy_compute_masking_l(lame_internal_flags * gfc, const FLOAT fftenergy[HBLKSI FLOAT const ecb_limit = rpelev * psv->nb_l1[chn][b]; if (ecb_limit > 0) { thr[b] = Min(ecb, ecb_limit); - } - else { + } else { /* Robert 071209: Because we don't calculate long block psy when we know a granule should be of short blocks, we don't have any clue how the granule @@ -1224,11 +1186,10 @@ vbrpsy_compute_masking_l(lame_internal_flags * gfc, const FLOAT fftenergy[HBLKSI */ thr[b] = Min(ecb, eb_l[b] * NS_PREECHO_ATT2); } - } - else { - FLOAT ecb_limit_2 = rpelev2 * psv->nb_l2[chn][b]; - FLOAT ecb_limit_1 = rpelev * psv->nb_l1[chn][b]; - FLOAT ecb_limit; + } else { + FLOAT ecb_limit_2 = rpelev2 * psv->nb_l2[chn][b]; + FLOAT ecb_limit_1 = rpelev * psv->nb_l1[chn][b]; + FLOAT ecb_limit; if (ecb_limit_2 <= 0) { ecb_limit_2 = ecb; } @@ -1237,8 +1198,7 @@ vbrpsy_compute_masking_l(lame_internal_flags * gfc, const FLOAT fftenergy[HBLKSI } if (psv->blocktype_old[chn & 0x01] == NORM_TYPE) { ecb_limit = Min(ecb_limit_1, ecb_limit_2); - } - else { + } else { ecb_limit = ecb_limit_1; } thr[b] = Min(ecb, ecb_limit); @@ -1276,9 +1236,8 @@ vbrpsy_compute_masking_l(lame_internal_flags * gfc, const FLOAT fftenergy[HBLKSI static void -vbrpsy_compute_block_type(SessionConfig_t const *cfg, int *uselongblock) -{ - int chn; +vbrpsy_compute_block_type(SessionConfig_t const *cfg, int *uselongblock) { + int chn; if (cfg->short_blocks == short_block_coupled /* force both channels to use the same block type */ @@ -1300,14 +1259,13 @@ vbrpsy_compute_block_type(SessionConfig_t const *cfg, int *uselongblock) static void -vbrpsy_apply_block_type(PsyStateVar_t * psv, int nch, int const *uselongblock, int *blocktype_d) -{ - int chn; +vbrpsy_apply_block_type(PsyStateVar_t *psv, int nch, int const *uselongblock, int *blocktype_d) { + int chn; /* update the blocktype of the previous granule, since it depends on what * happend in this granule */ for (chn = 0; chn < nch; chn++) { - int blocktype = NORM_TYPE; + int blocktype = NORM_TYPE; /* disable short blocks */ if (uselongblock[chn]) { @@ -1315,8 +1273,7 @@ vbrpsy_apply_block_type(PsyStateVar_t * psv, int nch, int const *uselongblock, i assert(psv->blocktype_old[chn] != START_TYPE); if (psv->blocktype_old[chn] == SHORT_TYPE) blocktype = STOP_TYPE; - } - else { + } else { /* attack : use short blocks */ blocktype = SHORT_TYPE; if (psv->blocktype_old[chn] == NORM_TYPE) { @@ -1339,18 +1296,17 @@ vbrpsy_apply_block_type(PsyStateVar_t * psv, int nch, int const *uselongblock, i static void vbrpsy_compute_MS_thresholds(const FLOAT eb[4][CBANDS], FLOAT thr[4][CBANDS], const FLOAT cb_mld[CBANDS], const FLOAT ath_cb[CBANDS], FLOAT athlower, - FLOAT msfix, int n) -{ + FLOAT msfix, int n) { FLOAT const msfix2 = msfix * 2.f; - FLOAT rside, rmid; - int b; + FLOAT rside, rmid; + int b; for (b = 0; b < n; ++b) { FLOAT const ebM = eb[2][b]; FLOAT const ebS = eb[3][b]; FLOAT const thmL = thr[0][b]; FLOAT const thmR = thr[1][b]; - FLOAT thmM = thr[2][b]; - FLOAT thmS = thr[3][b]; + FLOAT thmM = thr[2][b]; + FLOAT thmS = thr[3][b]; /* use this fix if L & R masking differs by 2db or less */ /* if db = 10*log10(x2/x1) < 2 */ @@ -1362,8 +1318,7 @@ vbrpsy_compute_MS_thresholds(const FLOAT eb[4][CBANDS], FLOAT thr[4][CBANDS], FLOAT const tmp_s = Min(thmM, mld_s); rmid = Max(thmM, tmp_m); rside = Max(thmS, tmp_s); - } - else { + } else { rmid = thmM; rside = thmS; } @@ -1372,7 +1327,7 @@ vbrpsy_compute_MS_thresholds(const FLOAT eb[4][CBANDS], FLOAT thr[4][CBANDS], /* Adjust M/S maskings if user set "msfix" */ /***************************************************************/ /* Naoki Shibata 2000 */ - FLOAT thmLR, thmMS; + FLOAT thmLR, thmMS; FLOAT const ath = ath_cb[b] * athlower; FLOAT const tmp_l = Max(thmL, ath); FLOAT const tmp_r = Max(thmR, ath); @@ -1408,13 +1363,12 @@ vbrpsy_compute_MS_thresholds(const FLOAT eb[4][CBANDS], FLOAT thr[4][CBANDS], */ int -L3psycho_anal_vbr(lame_internal_flags * gfc, - const sample_t * const buffer[2], int gr_out, +L3psycho_anal_vbr(lame_internal_flags *gfc, + const sample_t *const buffer[2], int gr_out, III_psy_ratio masking_ratio[2][2], III_psy_ratio masking_MS_ratio[2][2], FLOAT percep_entropy[2], FLOAT percep_MS_entropy[2], - FLOAT energy[4], int blocktype_d[2]) -{ + FLOAT energy[4], int blocktype_d[2]) { SessionConfig_t const *const cfg = &gfc->cfg; PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_CB2SB_t const *const gdl = &gfc->cd_psy->l; @@ -1426,27 +1380,30 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, /* fft and energy calculation */ FLOAT(*wsamp_l)[BLKSIZE]; FLOAT(*wsamp_s)[3][BLKSIZE_s]; - FLOAT fftenergy[HBLKSIZE]; - FLOAT fftenergy_s[3][HBLKSIZE_s]; - FLOAT wsamp_L[2][BLKSIZE]; - FLOAT wsamp_S[2][3][BLKSIZE_s]; - FLOAT eb[4][CBANDS], thr[4][CBANDS]; - - FLOAT sub_short_factor[4][3]; - FLOAT thmm; + FLOAT fftenergy[HBLKSIZE]; + FLOAT fftenergy_s[3][HBLKSIZE_s]; + FLOAT wsamp_L[2][BLKSIZE]; + FLOAT wsamp_S[2][3][BLKSIZE_s]; + FLOAT eb[4][CBANDS], thr[4][CBANDS]; + + FLOAT sub_short_factor[4][3]; + FLOAT thmm; FLOAT const pcfact = 0.6f; FLOAT const ath_factor = - (cfg->msfix > 0.f) ? (cfg->ATH_offset_factor * gfc->ATH->adjust_factor) : 1.f; + (cfg->msfix > 0.f) ? (cfg->ATH_offset_factor * gfc->ATH->adjust_factor) : 1.f; - const FLOAT(*const_eb)[CBANDS] = (const FLOAT(*)[CBANDS]) eb; - const FLOAT(*const_fftenergy_s)[HBLKSIZE_s] = (const FLOAT(*)[HBLKSIZE_s]) fftenergy_s; + const FLOAT(*const_eb)[CBANDS] = (const FLOAT(*)[CBANDS]) eb; + const FLOAT(*const_fftenergy_s)[HBLKSIZE_s] = (const FLOAT(*)[HBLKSIZE_s]) fftenergy_s; /* block type */ - int ns_attacks[4][4] = { {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} }; - int uselongblock[2]; + int ns_attacks[4][4] = {{0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}}; + int uselongblock[2]; /* usual variables like loop indices, etc.. */ - int chn, sb, sblock; + int chn, sb, sblock; /* chn=2 and 3 = Mid and Side channels */ int const n_chn_psy = (cfg->mode == JOINT_STEREO) ? 4 : cfg->channels_out; @@ -1488,8 +1445,7 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, int const ch01 = chn & 0x01; if (uselongblock[ch01] && !force_short_block_calc) { vbrpsy_skip_masking_s(gfc, chn, sblock); - } - else { + } else { /* compute masking thresholds for short blocks */ wsamp_s = wsamp_S + ch01; vbrpsy_compute_fft_s(gfc, buffer, chn, sblock, fftenergy_s, wsamp_s); @@ -1515,7 +1471,7 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, /**** short block pre-echo control ****/ for (chn = 0; chn < n_chn_psy; chn++) { for (sb = 0; sb < SBMAX_s; sb++) { - FLOAT new_thmm[3], prev_thm, t1, t2; + FLOAT new_thmm[3], prev_thm, t1, t2; for (sblock = 0; sblock < 3; sblock++) { thmm = psv->thm[chn].s[sb][sblock]; thmm *= NS_PREECHO_ATT0; @@ -1524,8 +1480,7 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, if (sblock > 0) { prev_thm = new_thmm[sblock - 1]; - } - else { + } else { prev_thm = last_thm[chn].s[sb][2]; } if (ns_attacks[chn][sblock] >= 2 || ns_attacks[chn][sblock + 1] == 1) { @@ -1534,19 +1489,19 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, thmm = Min(t1, thmm); if (ns_attacks[chn][sblock] == 1) { t2 = NS_INTERP(prev_thm, thmm, NS_PREECHO_ATT2 * pcfact); - } - else if ((sblock == 0 && psv->last_attacks[chn] == 3) - || (sblock > 0 && ns_attacks[chn][sblock - 1] == 3)) { /* 2nd preceeding block */ + } else if ((sblock == 0 && psv->last_attacks[chn] == 3) + || (sblock > 0 && + ns_attacks[chn][sblock - 1] == 3)) { /* 2nd preceeding block */ switch (sblock) { - case 0: - prev_thm = last_thm[chn].s[sb][1]; - break; - case 1: - prev_thm = last_thm[chn].s[sb][2]; - break; - case 2: - prev_thm = new_thmm[0]; - break; + case 0: + prev_thm = last_thm[chn].s[sb][1]; + break; + case 1: + prev_thm = last_thm[chn].s[sb][2]; + break; + case 2: + prev_thm = new_thmm[0]; + break; } t2 = NS_INTERP(prev_thm, thmm, NS_PREECHO_ATT2 * pcfact); } @@ -1579,8 +1534,8 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, * compute the value of PE to return ... no delay and advance *********************************************************************/ for (chn = 0; chn < n_chn_psy; chn++) { - FLOAT *ppe; - int type; + FLOAT *ppe; + int type; III_psy_ratio const *mr; if (chn > 1) { @@ -1589,16 +1544,14 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, if (blocktype_d[0] == SHORT_TYPE || blocktype_d[1] == SHORT_TYPE) type = SHORT_TYPE; mr = &masking_MS_ratio[gr_out][chn - 2]; - } - else { + } else { ppe = percep_entropy; type = blocktype_d[chn]; mr = &masking_ratio[gr_out][chn]; } if (type == SHORT_TYPE) { ppe[chn] = pecalc_s(mr, gfc->sv_qnt.masking_lower); - } - else { + } else { ppe[chn] = pecalc_l(mr, gfc->sv_qnt.masking_lower); } @@ -1610,15 +1563,12 @@ L3psycho_anal_vbr(lame_internal_flags * gfc, } - - -/* +/* * The spreading function. Values returned in units of energy */ -static FLOAT -s3_func(FLOAT bark) -{ - FLOAT tempx, x, tempy, temp; +static FLOAT +s3_func(FLOAT bark) { + FLOAT tempx, x, tempy, temp; tempx = bark; if (tempx >= 0) tempx *= 3; @@ -1628,8 +1578,7 @@ s3_func(FLOAT bark) if (tempx >= 0.5 && tempx <= 2.5) { temp = tempx - 0.5; x = 8.0 * (temp * temp - 2.0 * temp); - } - else + } else x = 0.0; tempx += 0.474; tempy = 15.811389 + 7.5 * tempx - 17.5 * sqrt(1.0 + tempx * tempx); @@ -1700,35 +1649,33 @@ norm_s3_func(void) } #endif -static FLOAT -stereo_demask(double f) -{ +static FLOAT +stereo_demask(double f) { /* setup stereo demasking thresholds */ /* formula reverse enginerred from plot in paper */ - double arg = freq2bark(f); + double arg = freq2bark(f); arg = (Min(arg, 15.5) / 15.5); return pow(10.0, 1.25 * (1 - cos(PI * arg)) - 2.5); } static void -init_numline(PsyConst_CB2SB_t * gd, FLOAT sfreq, int fft_size, - int mdct_size, int sbmax, int const *scalepos) -{ - FLOAT b_frq[CBANDS + 1]; +init_numline(PsyConst_CB2SB_t *gd, FLOAT sfreq, int fft_size, + int mdct_size, int sbmax, int const *scalepos) { + FLOAT b_frq[CBANDS + 1]; FLOAT const mdct_freq_frac = sfreq / (2.0f * mdct_size); FLOAT const deltafreq = fft_size / (2.0f * mdct_size); - int partition[HBLKSIZE] = { 0 }; - int i, j, ni; - int sfb; + int partition[HBLKSIZE] = {0}; + int i, j, ni; + int sfb; sfreq /= fft_size; j = 0; ni = 0; /* compute numlines, the number of spectral lines in each partition band */ /* each partition band should be about DELBARK wide. */ for (i = 0; i < CBANDS; i++) { - FLOAT bark1; - int j2, nl; + FLOAT bark1; + int j2, nl; bark1 = freq2bark(sfreq * j); b_frq[i] = sfreq * j; @@ -1770,9 +1717,9 @@ init_numline(PsyConst_CB2SB_t * gd, FLOAT sfreq, int fft_size, } } for (sfb = 0; sfb < sbmax; sfb++) { - int i1, i2, bo; - int start = scalepos[sfb]; - int end = scalepos[sfb + 1]; + int i1, i2, bo; + int start = scalepos[sfb]; + int end = scalepos[sfb + 1]; i1 = floor(.5 + deltafreq * (start - .5)); if (i1 < 0) @@ -1789,11 +1736,10 @@ init_numline(PsyConst_CB2SB_t * gd, FLOAT sfreq, int fft_size, /* calculate how much of this band belongs to current scalefactor band */ { FLOAT const f_tmp = mdct_freq_frac * end; - FLOAT bo_w = (f_tmp - b_frq[bo]) / (b_frq[bo + 1] - b_frq[bo]); + FLOAT bo_w = (f_tmp - b_frq[bo]) / (b_frq[bo + 1] - b_frq[bo]); if (bo_w < 0) { bo_w = 0; - } - else { + } else { if (bo_w > 1) { bo_w = 1; } @@ -1806,14 +1752,13 @@ init_numline(PsyConst_CB2SB_t * gd, FLOAT sfreq, int fft_size, static void compute_bark_values(PsyConst_CB2SB_t const *gd, FLOAT sfreq, int fft_size, - FLOAT * bval, FLOAT * bval_width) -{ + FLOAT *bval, FLOAT *bval_width) { /* compute bark values of each critical band */ - int k, j = 0, ni = gd->npart; + int k, j = 0, ni = gd->npart; sfreq /= fft_size; for (k = 0; k < ni; k++) { int const w = gd->numlines[k]; - FLOAT bark1, bark2; + FLOAT bark1, bark2; bark1 = freq2bark(sfreq * (j)); bark2 = freq2bark(sfreq * (j + w - 1)); @@ -1827,15 +1772,14 @@ compute_bark_values(PsyConst_CB2SB_t const *gd, FLOAT sfreq, int fft_size, } static int -init_s3_values(FLOAT ** p, int (*s3ind)[2], int npart, - FLOAT const *bval, FLOAT const *bval_width, FLOAT const *norm) -{ - FLOAT s3[CBANDS][CBANDS]; +init_s3_values(FLOAT **p, int (*s3ind)[2], int npart, + FLOAT const *bval, FLOAT const *bval_width, FLOAT const *norm) { + FLOAT s3[CBANDS][CBANDS]; /* The s3 array is not linear in the bark scale. * bval[x] should be used to get the bark value. */ - int i, j, k; - int numberOfNoneZero = 0; + int i, j, k; + int numberOfNoneZero = 0; memset(&s3[0][0], 0, sizeof(s3)); @@ -1847,7 +1791,7 @@ init_s3_values(FLOAT ** p, int (*s3ind)[2], int npart, */ for (i = 0; i < npart; i++) { for (j = 0; j < npart; j++) { - FLOAT v = s3_func(bval[i] - bval[j]) * bval_width[j]; + FLOAT v = s3_func(bval[i] - bval[j]) * bval_width[j]; s3[i][j] = v * norm[i]; } } @@ -1878,23 +1822,22 @@ init_s3_values(FLOAT ** p, int (*s3ind)[2], int npart, } int -psymodel_init(lame_global_flags const *gfp) -{ +psymodel_init(lame_global_flags const *gfp) { lame_internal_flags *const gfc = gfp->internal_flags; SessionConfig_t *const cfg = &gfc->cfg; PsyStateVar_t *const psv = &gfc->sv_psy; PsyConst_t *gd; - int i, j, b, sb, k; - FLOAT bvl_a = 13, bvl_b = 24; - FLOAT snr_l_a = 0, snr_l_b = 0; - FLOAT snr_s_a = -8.25, snr_s_b = -4.5; - - FLOAT bval[CBANDS]; - FLOAT bval_width[CBANDS]; - FLOAT norm[CBANDS]; + int i, j, b, sb, k; + FLOAT bvl_a = 13, bvl_b = 24; + FLOAT snr_l_a = 0, snr_l_b = 0; + FLOAT snr_s_a = -8.25, snr_s_b = -4.5; + + FLOAT bval[CBANDS]; + FLOAT bval_width[CBANDS]; + FLOAT norm[CBANDS]; FLOAT const sfreq = cfg->samplerate_out; - FLOAT xav = 10, xbv = 12; + FLOAT xav = 10, xbv = 12; FLOAT const minval_low = (0.f - cfg->minval); if (gfc->cd_psy != 0) { @@ -1946,10 +1889,10 @@ psymodel_init(lame_global_flags const *gfp) /* compute the spreading function */ for (i = 0; i < gd->l.npart; i++) { - double snr = snr_l_a; + double snr = snr_l_a; if (bval[i] >= bvl_a) { snr = snr_l_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) - + snr_l_a * (bvl_b - bval[i]) / (bvl_b - bvl_a); + + snr_l_a * (bvl_b - bval[i]) / (bvl_b - bvl_a); } norm[i] = pow(10.0, snr / 10.0); } @@ -1960,15 +1903,16 @@ psymodel_init(lame_global_flags const *gfp) /* compute long block specific values, ATH and MINVAL */ j = 0; for (i = 0; i < gd->l.npart; i++) { - double x; + double x; /* ATH */ x = FLOAT_MAX; for (k = 0; k < gd->l.numlines[i]; k++, j++) { FLOAT const freq = sfreq * j / (1000.0 * BLKSIZE); - FLOAT level; + FLOAT level; /* freq = Min(.1,freq); *//* ATH below 100 Hz constant, not further climbing */ - level = ATHformula(cfg, freq * 1000) - 20; /* scale to FFT units; returned value is in dB */ + level = ATHformula(cfg, freq * 1000) - + 20; /* scale to FFT units; returned value is in dB */ level = pow(10., 0.1 * level); /* convert from dB -> energy */ level *= gd->l.numlines[i]; if (x > level) @@ -2007,11 +1951,11 @@ psymodel_init(lame_global_flags const *gfp) /* SNR formula. short block is normalized by SNR. is it still right ? */ j = 0; for (i = 0; i < gd->s.npart; i++) { - double x; - double snr = snr_s_a; + double x; + double snr = snr_s_a; if (bval[i] >= bvl_a) { snr = snr_s_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) - + snr_s_a * (bvl_b - bval[i]) / (bvl_b - bvl_a); + + snr_s_a * (bvl_b - bval[i]) / (bvl_b - bvl_a); } norm[i] = pow(10.0, snr / 10.0); @@ -2019,9 +1963,10 @@ psymodel_init(lame_global_flags const *gfp) x = FLOAT_MAX; for (k = 0; k < gd->s.numlines[i]; k++, j++) { FLOAT const freq = sfreq * j / (1000.0 * BLKSIZE_s); - FLOAT level; + FLOAT level; /* freq = Min(.1,freq); *//* ATH below 100 Hz constant, not further climbing */ - level = ATHformula(cfg, freq * 1000) - 20; /* scale to FFT units; returned value is in dB */ + level = ATHformula(cfg, freq * 1000) - + 20; /* scale to FFT units; returned value is in dB */ level = pow(10., 0.1 * level); /* convert from dB -> energy */ level *= gd->s.numlines[i]; if (x > level) @@ -2064,7 +2009,7 @@ psymodel_init(lame_global_flags const *gfp) gd->decay = exp(-1.0 * LOG10 / (temporalmask_sustain_sec * sfreq / 192.0)); { - FLOAT msfix; + FLOAT msfix; msfix = NS_MSFIX; if (cfg->use_safe_joint_stereo) msfix = 1.0; @@ -2094,9 +2039,9 @@ psymodel_init(lame_global_flags const *gfp) if (cfg->ATHtype != -1) { /* compute equal loudness weights (eql_w) */ - FLOAT freq; + FLOAT freq; FLOAT const freq_inc = (FLOAT) cfg->samplerate_out / (FLOAT) (BLKSIZE); - FLOAT eql_balance = 0.0; + FLOAT eql_balance = 0.0; freq = 0.0; for (i = 0; i < BLKSIZE / 2; ++i) { /* convert ATH dB to relative power (not dB) */ @@ -2126,8 +2071,8 @@ psymodel_init(lame_global_flags const *gfp) } /* short block attack threshold */ { - float x = gfp->attackthre; - float y = gfp->attackthre_s; + float x = gfp->attackthre; + float y = gfp->attackthre_s; if (x < 0) { x = NSATTACKTHRE; } @@ -2138,18 +2083,17 @@ psymodel_init(lame_global_flags const *gfp) gd->attack_threshold[3] = y; } { - float sk_s = -10.f, sk_l = -4.7f; + float sk_s = -10.f, sk_l = -4.7f; static float const sk[] = - { -7.4, -7.4, -7.4, -9.5, -7.4, -6.1, -5.5, -4.7, -4.7, -4.7, -4.7 }; + {-7.4, -7.4, -7.4, -9.5, -7.4, -6.1, -5.5, -4.7, -4.7, -4.7, -4.7}; if (gfp->VBR_q < 4) { sk_l = sk_s = sk[0]; - } - else { + } else { sk_l = sk_s = sk[gfp->VBR_q] + gfp->VBR_q_frac * (sk[gfp->VBR_q] - sk[gfp->VBR_q + 1]); } b = 0; for (; b < gd->s.npart; b++) { - float m = (float) (gd->s.npart - b) / gd->s.npart; + float m = (float) (gd->s.npart - b) / gd->s.npart; gd->s.masking_lower[b] = powf(10.f, sk_s * m * 0.1f); } for (; b < CBANDS; ++b) { @@ -2157,7 +2101,7 @@ psymodel_init(lame_global_flags const *gfp) } b = 0; for (; b < gd->l.npart; b++) { - float m = (float) (gd->l.npart - b) / gd->l.npart; + float m = (float) (gd->l.npart - b) / gd->l.npart; gd->l.masking_lower[b] = powf(10.f, sk_l * m * 0.1f); } for (; b < CBANDS; ++b) { diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.h new file mode 100644 index 0000000..e47103a --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/psymodel.h @@ -0,0 +1,64 @@ +/* + * psymodel.h + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_PSYMODEL_H +#define LAME_PSYMODEL_H + + +int L3psycho_anal_ns(lame_internal_flags *gfc, + const sample_t *const buffer[2], int gr, + III_psy_ratio ratio[2][2], + III_psy_ratio MS_ratio[2][2], + FLOAT pe[2], FLOAT pe_MS[2], FLOAT ener[2], int blocktype_d[2]); + +int L3psycho_anal_vbr(lame_internal_flags *gfc, + const sample_t *const buffer[2], int gr, + III_psy_ratio ratio[2][2], + III_psy_ratio MS_ratio[2][2], + FLOAT pe[2], FLOAT pe_MS[2], FLOAT ener[2], int blocktype_d[2]); + + +int psymodel_init(lame_global_flags const *gfp); + + +#define rpelev 2 +#define rpelev2 16 +#define rpelev_s 2 +#define rpelev2_s 16 + +/* size of each partition band, in barks: */ +#define DELBARK .34 + + +/* tuned for output level (sensitive to energy scale) */ +#define VO_SCALE (1./( 14752*14752 )/(BLKSIZE/2)) + +#define temporalmask_sustain_sec 0.01 + +#define NS_PREECHO_ATT0 0.8 +#define NS_PREECHO_ATT1 0.6 +#define NS_PREECHO_ATT2 0.3 + +#define NS_MSFIX 3.5 +#define NSATTACKTHRE 4.4 +#define NSATTACKTHRE_S 25 + +#endif /* LAME_PSYMODEL_H */ diff --git a/library/src/main/cpp/lamemp3/quantize.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.c similarity index 83% rename from library/src/main/cpp/lamemp3/quantize.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.c index c96293c..7a8b083 100644 --- a/library/src/main/cpp/lamemp3/quantize.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.c @@ -40,20 +40,18 @@ #include "bitstream.h" #include "vbrquantize.h" #include "quantize.h" + #ifdef HAVE_XMMINTRIN_H #include "vector/lame_intrin.h" #endif - - /* convert from L/R <-> Mid/Side */ static void -ms_convert(III_side_info_t * l3_side, int gr) -{ - int i; +ms_convert(III_side_info_t *l3_side, int gr) { + int i; for (i = 0; i < 576; ++i) { - FLOAT l, r; + FLOAT l, r; l = l3_side->tt[gr][0].xr[i]; r = l3_side->tt[gr][1].xr[i]; l3_side->tt[gr][0].xr[i] = (l + r) * (FLOAT) (SQRT2 * 0.5); @@ -73,10 +71,9 @@ ms_convert(III_side_info_t * l3_side, int gr) ************************************************************************/ static void -init_xrpow_core_c(gr_info * const cod_info, FLOAT xrpow[576], int upper, FLOAT * sum) -{ - int i; - FLOAT tmp; +init_xrpow_core_c(gr_info *const cod_info, FLOAT xrpow[576], int upper, FLOAT *sum) { + int i; + FLOAT tmp; *sum = 0; for (i = 0; i <= upper; ++i) { tmp = fabs(cod_info->xr[i]); @@ -89,12 +86,8 @@ init_xrpow_core_c(gr_info * const cod_info, FLOAT xrpow[576], int upper, FLOAT * } - - - void -init_xrpow_core_init(lame_internal_flags * const gfc) -{ +init_xrpow_core_init(lame_internal_flags *const gfc) { gfc->init_xrpow_core = init_xrpow_core_c; #if defined(HAVE_XMMINTRIN_H) @@ -109,12 +102,10 @@ init_xrpow_core_init(lame_internal_flags * const gfc) } - static int -init_xrpow(lame_internal_flags * gfc, gr_info * const cod_info, FLOAT xrpow[576]) -{ - FLOAT sum = 0; - int i; +init_xrpow(lame_internal_flags *gfc, gr_info *const cod_info, FLOAT xrpow[576]) { + FLOAT sum = 0; + int i; int const upper = cod_info->max_nonzero_coeff; assert(xrpow != NULL); @@ -132,7 +123,7 @@ init_xrpow(lame_internal_flags * gfc, gr_info * const cod_info, FLOAT xrpow[576] /* return 1 if we have something to quantize, else 0 */ if (sum > (FLOAT) 1E-20) { - int j = 0; + int j = 0; if (gfc->sv_qnt.substep_shaping & 2) j = 1; @@ -147,9 +138,6 @@ init_xrpow(lame_internal_flags * gfc, gr_info * const cod_info, FLOAT xrpow[576] } - - - /* Gabriel Bouvigne feb/apr 2003 Analog silence detection in partitionned sfb21 @@ -160,19 +148,18 @@ coeffs which are below ath. It stops on the first coeff higher than ath. */ static void -psfb21_analogsilence(lame_internal_flags const *gfc, gr_info * const cod_info) -{ +psfb21_analogsilence(lame_internal_flags const *gfc, gr_info *const cod_info) { ATH_t const *const ATH = gfc->ATH; - FLOAT *const xr = cod_info->xr; + FLOAT *const xr = cod_info->xr; if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type, but not SHORT blocks */ - int gsfb; - int stop = 0; + int gsfb; + int stop = 0; for (gsfb = PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) { int const start = gfc->scalefac_band.psfb21[gsfb]; int const end = gfc->scalefac_band.psfb21[gsfb + 1]; - int j; - FLOAT ath21; + int j; + FLOAT ath21; ath21 = athAdjust(ATH->adjust_factor, ATH->psfb21[gsfb], ATH->floor, 0); if (gfc->sv_qnt.longfact[21] > 1e-12f) @@ -187,22 +174,22 @@ psfb21_analogsilence(lame_internal_flags const *gfc, gr_info * const cod_info) } } } - } - else { + } else { /*note: short blocks coeffs are reordered */ - int block; + int block; for (block = 0; block < 3; block++) { - int gsfb; - int stop = 0; + int gsfb; + int stop = 0; for (gsfb = PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) { int const start = gfc->scalefac_band.s[12] * 3 + - (gfc->scalefac_band.s[13] - gfc->scalefac_band.s[12]) * block + - (gfc->scalefac_band.psfb12[gsfb] - gfc->scalefac_band.psfb12[0]); + (gfc->scalefac_band.s[13] - gfc->scalefac_band.s[12]) * block + + (gfc->scalefac_band.psfb12[gsfb] - gfc->scalefac_band.psfb12[0]); int const end = - start + (gfc->scalefac_band.psfb12[gsfb + 1] - gfc->scalefac_band.psfb12[gsfb]); - int j; - FLOAT ath12; + start + + (gfc->scalefac_band.psfb12[gsfb + 1] - gfc->scalefac_band.psfb12[gsfb]); + int j; + FLOAT ath12; ath12 = athAdjust(ATH->adjust_factor, ATH->psfb12[gsfb], ATH->floor, 0); if (gfc->sv_qnt.shortfact[12] > 1e-12f) @@ -223,14 +210,10 @@ psfb21_analogsilence(lame_internal_flags const *gfc, gr_info * const cod_info) } - - - static void -init_outer_loop(lame_internal_flags const *gfc, gr_info * const cod_info) -{ +init_outer_loop(lame_internal_flags const *gfc, gr_info *const cod_info) { SessionConfig_t const *const cfg = &gfc->cfg; - int sfb, j; + int sfb, j; /* initialize fresh cod_info */ cod_info->part2_3_length = 0; @@ -253,26 +236,25 @@ init_outer_loop(lame_internal_flags const *gfc, gr_info * const cod_info) cod_info->count1table_select = 0; cod_info->part2_length = 0; if (cfg->samplerate_out <= 8000) { - cod_info->sfb_lmax = 17; - cod_info->sfb_smin = 9; - cod_info->psy_lmax = 17; - } - else { - cod_info->sfb_lmax = SBPSY_l; - cod_info->sfb_smin = SBPSY_s; - cod_info->psy_lmax = gfc->sv_qnt.sfb21_extra ? SBMAX_l : SBPSY_l; + cod_info->sfb_lmax = 17; + cod_info->sfb_smin = 9; + cod_info->psy_lmax = 17; + } else { + cod_info->sfb_lmax = SBPSY_l; + cod_info->sfb_smin = SBPSY_s; + cod_info->psy_lmax = gfc->sv_qnt.sfb21_extra ? SBMAX_l : SBPSY_l; } cod_info->psymax = cod_info->psy_lmax; cod_info->sfbmax = cod_info->sfb_lmax; cod_info->sfbdivide = 11; for (sfb = 0; sfb < SBMAX_l; sfb++) { cod_info->width[sfb] - = gfc->scalefac_band.l[sfb + 1] - gfc->scalefac_band.l[sfb]; + = gfc->scalefac_band.l[sfb + 1] - gfc->scalefac_band.l[sfb]; cod_info->window[sfb] = 3; /* which is always 0. */ } if (cod_info->block_type == SHORT_TYPE) { - FLOAT ixwork[576]; - FLOAT *ix; + FLOAT ixwork[576]; + FLOAT *ix; cod_info->sfb_smin = 0; cod_info->sfb_lmax = 0; @@ -286,14 +268,13 @@ init_outer_loop(lame_internal_flags const *gfc, gr_info * const cod_info) } if (cfg->samplerate_out <= 8000) { cod_info->psymax - = cod_info->sfb_lmax - + 3 * (9 - cod_info->sfb_smin); + = cod_info->sfb_lmax + + 3 * (9 - cod_info->sfb_smin); cod_info->sfbmax = cod_info->sfb_lmax + 3 * (9 - cod_info->sfb_smin); - } - else { + } else { cod_info->psymax - = cod_info->sfb_lmax - + 3 * ((gfc->sv_qnt.sfb21_extra ? SBMAX_s : SBPSY_s) - cod_info->sfb_smin); + = cod_info->sfb_lmax + + 3 * ((gfc->sv_qnt.sfb21_extra ? SBMAX_s : SBPSY_s) - cod_info->sfb_smin); cod_info->sfbmax = cod_info->sfb_lmax + 3 * (SBPSY_s - cod_info->sfb_smin); } cod_info->sfbdivide = cod_info->sfbmax - 18; @@ -311,7 +292,7 @@ init_outer_loop(lame_internal_flags const *gfc, gr_info * const cod_info) for (sfb = cod_info->sfb_smin; sfb < SBMAX_s; sfb++) { int const start = gfc->scalefac_band.s[sfb]; int const end = gfc->scalefac_band.s[sfb + 1]; - int window, l; + int window, l; for (window = 0; window < 3; window++) { for (l = start; l < end; l++) { *ix++ = ixwork[3 * l + window]; @@ -322,7 +303,7 @@ init_outer_loop(lame_internal_flags const *gfc, gr_info * const cod_info) j = cod_info->sfb_lmax; for (sfb = cod_info->sfb_smin; sfb < SBMAX_s; sfb++) { cod_info->width[j] = cod_info->width[j + 1] = cod_info->width[j + 2] - = gfc->scalefac_band.s[sfb + 1] - gfc->scalefac_band.s[sfb]; + = gfc->scalefac_band.s[sfb + 1] - gfc->scalefac_band.s[sfb]; cod_info->window[j] = 0; cod_info->window[j + 1] = 1; cod_info->window[j + 2] = 2; @@ -349,7 +330,6 @@ init_outer_loop(lame_internal_flags const *gfc, gr_info * const cod_info) } - /************************************************************************ * * bin_search_StepSize() @@ -368,12 +348,11 @@ typedef enum { } binsearchDirection_t; static int -bin_search_StepSize(lame_internal_flags * const gfc, gr_info * const cod_info, - int desired_rate, const int ch, const FLOAT xrpow[576]) -{ - int nBits; - int CurrentStep = gfc->sv_qnt.CurrentStep[ch]; - int flag_GoneOver = 0; +bin_search_StepSize(lame_internal_flags *const gfc, gr_info *const cod_info, + int desired_rate, const int ch, const FLOAT xrpow[576]) { + int nBits; + int CurrentStep = gfc->sv_qnt.CurrentStep[ch]; + int flag_GoneOver = 0; int const start = gfc->sv_qnt.OldValue[ch]; binsearchDirection_t Direction = BINSEARCH_NONE; cod_info->global_gain = start; @@ -381,7 +360,7 @@ bin_search_StepSize(lame_internal_flags * const gfc, gr_info * const cod_info, assert(CurrentStep); for (;;) { - int step; + int step; nBits = count_bits(gfc, xrpow, cod_info, 0); if (CurrentStep == 1 || nBits == desired_rate) @@ -396,8 +375,7 @@ bin_search_StepSize(lame_internal_flags * const gfc, gr_info * const cod_info, CurrentStep /= 2; Direction = BINSEARCH_UP; step = CurrentStep; - } - else { + } else { /* decrease Quantize_StepSize */ if (Direction == BINSEARCH_UP) flag_GoneOver = 1; @@ -432,8 +410,6 @@ bin_search_StepSize(lame_internal_flags * const gfc, gr_info * const cod_info, } - - /************************************************************************ * * trancate_smallspectrums() @@ -444,8 +420,7 @@ bin_search_StepSize(lame_internal_flags * const gfc, gr_info * const cod_info, * ************************************************************************/ static int -floatcompare(const void *v1, const void *v2) -{ +floatcompare(const void *v1, const void *v2) { const FLOAT *const a = v1, *const b = v2; if (*a > *b) return 1; @@ -456,10 +431,9 @@ floatcompare(const void *v1, const void *v2) static void trancate_smallspectrums(lame_internal_flags const *gfc, - gr_info * const gi, const FLOAT * const l3_xmin, FLOAT * const work) -{ - int sfb, j, width; - FLOAT distort[SFBMAX]; + gr_info *const gi, const FLOAT *const l3_xmin, FLOAT *const work) { + int sfb, j, width; + FLOAT distort[SFBMAX]; calc_noise_result dummy; if ((!(gfc->sv_qnt.substep_shaping & 4) && gi->block_type == SHORT_TYPE) @@ -467,7 +441,7 @@ trancate_smallspectrums(lame_internal_flags const *gfc, return; (void) calc_noise(gi, l3_xmin, distort, &dummy, 0); for (j = 0; j < 576; j++) { - FLOAT xr = 0.0; + FLOAT xr = 0.0; if (gi->l3_enc[j] != 0) xr = fabs(gi->xr[j]); work[j] = xr; @@ -478,8 +452,8 @@ trancate_smallspectrums(lame_internal_flags const *gfc, if (gi->block_type == SHORT_TYPE) sfb = 6; do { - FLOAT allowedNoise, trancateThreshold; - int nsame, start; + FLOAT allowedNoise, trancateThreshold; + int nsame, start; width = gi->width[sfb]; j += width; @@ -494,7 +468,7 @@ trancate_smallspectrums(lame_internal_flags const *gfc, trancateThreshold = 0.0; start = 0; do { - FLOAT noise; + FLOAT noise; for (nsame = 1; start + nsame < width; nsame++) if (NEQ(work[start + j - width], work[start + j + nsame - width])) break; @@ -541,9 +515,8 @@ trancate_smallspectrums(lame_internal_flags const *gfc, *************************************************************************/ inline static int -loop_break(const gr_info * const cod_info) -{ - int sfb; +loop_break(const gr_info *const cod_info) { + int sfb; for (sfb = 0; sfb < cod_info->sfbmax; sfb++) if (cod_info->scalefac[sfb] @@ -569,16 +542,14 @@ loop_break(const gr_info * const cod_info) *************************************************************************/ static double -penalties(double noise) -{ +penalties(double noise) { return FAST_LOG10(0.368 + 0.632 * noise * noise * noise); } static double -get_klemm_noise(const FLOAT * distort, const gr_info * const gi) -{ - int sfb; - double klemm_noise = 1E-37; +get_klemm_noise(const FLOAT *distort, const gr_info *const gi) { + int sfb; + double klemm_noise = 1E-37; for (sfb = 0; sfb < gi->psymax; sfb++) klemm_noise += penalties(distort[sfb]); @@ -587,9 +558,8 @@ get_klemm_noise(const FLOAT * distort, const gr_info * const gi) inline static int quant_compare(const int quant_comp, - const calc_noise_result * const best, - calc_noise_result * const calc, const gr_info * const gi, const FLOAT * distort) -{ + const calc_noise_result *const best, + calc_noise_result *const calc, const gr_info *const gi, const FLOAT *distort) { /* noise is given in decibels (dB) relative to masking thesholds. @@ -598,18 +568,17 @@ quant_compare(const int quant_comp, max_noise: max quantization noise */ - int better; + int better; switch (quant_comp) { - default: - case 9:{ + default: + case 9: { if (best->over_count > 0) { /* there are distorted sfb */ better = calc->over_SSD <= best->over_SSD; if (calc->over_SSD == best->over_SSD) better = calc->bits < best->bits; - } - else { + } else { /* no distorted sfb */ better = ((calc->max_noise < 0) && ((calc->max_noise * 10 + calc->bits) <= @@ -618,59 +587,64 @@ quant_compare(const int quant_comp, break; } - case 0: - better = calc->over_count < best->over_count - || (calc->over_count == best->over_count && calc->over_noise < best->over_noise) - || (calc->over_count == best->over_count && - EQ(calc->over_noise, best->over_noise) && calc->tot_noise < best->tot_noise); - break; - - case 8: - calc->max_noise = get_klemm_noise(distort, gi); - /*lint --fallthrough */ - case 1: - better = calc->max_noise < best->max_noise; - break; - case 2: - better = calc->tot_noise < best->tot_noise; - break; - case 3: - better = (calc->tot_noise < best->tot_noise) - && (calc->max_noise < best->max_noise); - break; - case 4: - better = (calc->max_noise <= 0.0 && best->max_noise > 0.2) - || (calc->max_noise <= 0.0 && - best->max_noise < 0.0 && - best->max_noise > calc->max_noise - 0.2 && calc->tot_noise < best->tot_noise) - || (calc->max_noise <= 0.0 && - best->max_noise > 0.0 && - best->max_noise > calc->max_noise - 0.2 && - calc->tot_noise < best->tot_noise + best->over_noise) - || (calc->max_noise > 0.0 && - best->max_noise > -0.05 && - best->max_noise > calc->max_noise - 0.1 && - calc->tot_noise + calc->over_noise < best->tot_noise + best->over_noise) - || (calc->max_noise > 0.0 && - best->max_noise > -0.1 && - best->max_noise > calc->max_noise - 0.15 && - calc->tot_noise + calc->over_noise + calc->over_noise < - best->tot_noise + best->over_noise + best->over_noise); - break; - case 5: - better = calc->over_noise < best->over_noise - || (EQ(calc->over_noise, best->over_noise) && calc->tot_noise < best->tot_noise); - break; - case 6: - better = calc->over_noise < best->over_noise - || (EQ(calc->over_noise, best->over_noise) && - (calc->max_noise < best->max_noise - || (EQ(calc->max_noise, best->max_noise) && calc->tot_noise <= best->tot_noise) - )); - break; - case 7: - better = calc->over_count < best->over_count || calc->over_noise < best->over_noise; - break; + case 0: + better = calc->over_count < best->over_count + || + (calc->over_count == best->over_count && calc->over_noise < best->over_noise) + || (calc->over_count == best->over_count && + EQ(calc->over_noise, best->over_noise) && + calc->tot_noise < best->tot_noise); + break; + + case 8: + calc->max_noise = get_klemm_noise(distort, gi); + /*lint --fallthrough */ + case 1: + better = calc->max_noise < best->max_noise; + break; + case 2: + better = calc->tot_noise < best->tot_noise; + break; + case 3: + better = (calc->tot_noise < best->tot_noise) + && (calc->max_noise < best->max_noise); + break; + case 4: + better = (calc->max_noise <= 0.0 && best->max_noise > 0.2) + || (calc->max_noise <= 0.0 && + best->max_noise < 0.0 && + best->max_noise > calc->max_noise - 0.2 && + calc->tot_noise < best->tot_noise) + || (calc->max_noise <= 0.0 && + best->max_noise > 0.0 && + best->max_noise > calc->max_noise - 0.2 && + calc->tot_noise < best->tot_noise + best->over_noise) + || (calc->max_noise > 0.0 && + best->max_noise > -0.05 && + best->max_noise > calc->max_noise - 0.1 && + calc->tot_noise + calc->over_noise < best->tot_noise + best->over_noise) + || (calc->max_noise > 0.0 && + best->max_noise > -0.1 && + best->max_noise > calc->max_noise - 0.15 && + calc->tot_noise + calc->over_noise + calc->over_noise < + best->tot_noise + best->over_noise + best->over_noise); + break; + case 5: + better = calc->over_noise < best->over_noise + || + (EQ(calc->over_noise, best->over_noise) && calc->tot_noise < best->tot_noise); + break; + case 6: + better = calc->over_noise < best->over_noise + || (EQ(calc->over_noise, best->over_noise) && + (calc->max_noise < best->max_noise + || (EQ(calc->max_noise, best->max_noise) && + calc->tot_noise <= best->tot_noise) + )); + break; + case 7: + better = calc->over_count < best->over_count || calc->over_noise < best->over_noise; + break; } @@ -689,7 +663,6 @@ quant_compare(const int quant_comp, } - /************************************************************************* * * amp_scalefac_bands() @@ -721,18 +694,16 @@ quant_compare(const int quant_comp, * *************************************************************************/ static void -amp_scalefac_bands(lame_internal_flags * gfc, - gr_info * const cod_info, FLOAT const *distort, FLOAT xrpow[576], int bRefine) -{ +amp_scalefac_bands(lame_internal_flags *gfc, + gr_info *const cod_info, FLOAT const *distort, FLOAT xrpow[576], int bRefine) { SessionConfig_t const *const cfg = &gfc->cfg; - int j, sfb; - FLOAT ifqstep34, trigger; - int noise_shaping_amp; + int j, sfb; + FLOAT ifqstep34, trigger; + int noise_shaping_amp; if (cod_info->scalefac_scale == 0) { ifqstep34 = 1.29683955465100964055; /* 2**(.75*.5) */ - } - else { + } else { ifqstep34 = 1.68179283050742922612; /* 2**(.75*1) */ } @@ -751,32 +722,32 @@ amp_scalefac_bands(lame_internal_flags * gfc, noise_shaping_amp = 1; } switch (noise_shaping_amp) { - case 2: - /* amplify exactly 1 band */ - break; - - case 1: - /* amplify bands within 50% of max (on db scale) */ - if (trigger > 1.0) - trigger = pow(trigger, .5); - else - trigger *= .95; - break; - - case 0: - default: - /* ISO algorithm. amplify all bands with distort>1 */ - if (trigger > 1.0) - trigger = 1.0; - else - trigger *= .95; - break; + case 2: + /* amplify exactly 1 band */ + break; + + case 1: + /* amplify bands within 50% of max (on db scale) */ + if (trigger > 1.0) + trigger = pow(trigger, .5); + else + trigger *= .95; + break; + + case 0: + default: + /* ISO algorithm. amplify all bands with distort>1 */ + if (trigger > 1.0) + trigger = 1.0; + else + trigger *= .95; + break; } j = 0; for (sfb = 0; sfb < cod_info->sfbmax; sfb++) { int const width = cod_info->width[sfb]; - int l; + int l; j += width; if (distort[sfb] < trigger) continue; @@ -809,15 +780,14 @@ amp_scalefac_bands(lame_internal_flags * gfc, *************************************************************************/ static void -inc_scalefac_scale(gr_info * const cod_info, FLOAT xrpow[576]) -{ - int l, j, sfb; +inc_scalefac_scale(gr_info *const cod_info, FLOAT xrpow[576]) { + int l, j, sfb; const FLOAT ifqstep34 = 1.29683955465100964055; j = 0; for (sfb = 0; sfb < cod_info->sfbmax; sfb++) { int const width = cod_info->width[sfb]; - int s = cod_info->scalefac[sfb]; + int s = cod_info->scalefac[sfb]; if (cod_info->preflag) s += pretab[sfb]; j += width; @@ -836,7 +806,6 @@ inc_scalefac_scale(gr_info * const cod_info, FLOAT xrpow[576]) } - /************************************************************************* * * inc_subblock_gain() @@ -848,10 +817,9 @@ inc_scalefac_scale(gr_info * const cod_info, FLOAT xrpow[576]) *************************************************************************/ static int -inc_subblock_gain(const lame_internal_flags * const gfc, gr_info * const cod_info, FLOAT xrpow[576]) -{ - int sfb, window; - int *const scalefac = cod_info->scalefac; +inc_subblock_gain(const lame_internal_flags *const gfc, gr_info *const cod_info, FLOAT xrpow[576]) { + int sfb, window; + int *const scalefac = cod_info->scalefac; /* subbloc_gain can't do anything in the long block region */ for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++) { @@ -860,7 +828,7 @@ inc_subblock_gain(const lame_internal_flags * const gfc, gr_info * const cod_inf } for (window = 0; window < 3; window++) { - int s1, s2, l, j; + int s1, s2, l, j; s1 = s2 = 0; for (sfb = cod_info->sfb_lmax + window; sfb < cod_info->sfbdivide; sfb += 3) { @@ -885,9 +853,9 @@ inc_subblock_gain(const lame_internal_flags * const gfc, gr_info * const cod_inf cod_info->subblock_gain[window]++; j = gfc->scalefac_band.l[cod_info->sfb_lmax]; for (sfb = cod_info->sfb_lmax + window; sfb < cod_info->sfbmax; sfb += 3) { - FLOAT amp; + FLOAT amp; int const width = cod_info->width[sfb]; - int s = scalefac[sfb]; + int s = scalefac[sfb]; assert(s >= 0); s = s - (4 >> cod_info->scalefac_scale); if (s >= 0) { @@ -941,11 +909,10 @@ inc_subblock_gain(const lame_internal_flags * const gfc, gr_info * const cod_inf * ********************************************************************/ inline static int -balance_noise(lame_internal_flags * gfc, - gr_info * const cod_info, FLOAT const *distort, FLOAT xrpow[576], int bRefine) -{ +balance_noise(lame_internal_flags *gfc, + gr_info *const cod_info, FLOAT const *distort, FLOAT xrpow[576], int bRefine) { SessionConfig_t const *const cfg = &gfc->cfg; - int status; + int status; amp_scalefac_bands(gfc, cod_info, distort, xrpow, bRefine); @@ -975,11 +942,10 @@ balance_noise(lame_internal_flags * gfc, if (!cod_info->scalefac_scale) { inc_scalefac_scale(cod_info, xrpow); status = 0; - } - else { + } else { if (cod_info->block_type == SHORT_TYPE && cfg->subblock_gain > 0) { status = inc_subblock_gain(gfc, cod_info, xrpow) - || loop_break(cod_info); + || loop_break(cod_info); } } } @@ -991,7 +957,6 @@ balance_noise(lame_internal_flags * gfc, } - /************************************************************************ * * outer_loop () @@ -1011,23 +976,23 @@ balance_noise(lame_internal_flags * gfc, ************************************************************************/ static int -outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * const l3_xmin, /* allowed distortion */ +outer_loop(lame_internal_flags *gfc, gr_info *const cod_info, + const FLOAT *const l3_xmin, /* allowed distortion */ FLOAT xrpow[576], /* coloured magnitudes of spectral */ - const int ch, const int targ_bits) -{ /* maximum allowed bits */ + const int ch, const int targ_bits) { /* maximum allowed bits */ SessionConfig_t const *const cfg = &gfc->cfg; gr_info cod_info_w; - FLOAT save_xrpow[576]; - FLOAT distort[SFBMAX]; + FLOAT save_xrpow[576]; + FLOAT distort[SFBMAX]; calc_noise_result best_noise_info; - int huff_bits; - int better; - int age; + int huff_bits; + int better; + int age; calc_noise_data prev_noise; - int best_part2_3_length = 9999999; - int bEndOfSearch = 0; - int bRefine = 0; - int best_ggain_pass1 = 0; + int best_part2_3_length = 9999999; + int bEndOfSearch = 0; + int bRefine = 0; + int best_ggain_pass1 = 0; (void) bin_search_StepSize(gfc, cod_info, targ_bits, ch, xrpow); @@ -1052,8 +1017,8 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co /* BEGIN MAIN LOOP */ do { calc_noise_result noise_info; - int search_limit; - int maxggain = 255; + int search_limit; + int maxggain = 255; /* When quantization with no distorted bands is found, * allow up to X new unsuccesful tries in serial. This @@ -1063,8 +1028,7 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co if (gfc->sv_qnt.substep_shaping & 2) { search_limit = 20; - } - else { + } else { search_limit = 3; } @@ -1104,7 +1068,7 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co /* increase quantizer stepsize until needed bits are below maximum */ while ((cod_info_w.part2_3_length - = count_bits(gfc, xrpow, &cod_info_w, &prev_noise)) > huff_bits + = count_bits(gfc, xrpow, &cod_info_w, &prev_noise)) > huff_bits && cod_info_w.global_gain <= maxggain) cod_info_w.global_gain++; @@ -1114,7 +1078,8 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co if (best_noise_info.over_count == 0) { while ((cod_info_w.part2_3_length - = count_bits(gfc, xrpow, &cod_info_w, &prev_noise)) > best_part2_3_length + = count_bits(gfc, xrpow, &cod_info_w, &prev_noise)) > + best_part2_3_length && cod_info_w.global_gain <= maxggain) cod_info_w.global_gain++; @@ -1148,8 +1113,7 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co /* store for later reuse */ memcpy(save_xrpow, xrpow, sizeof(FLOAT) * 576); } - } - else { + } else { /* early stop? */ if (cfg->full_outer_loop == 0) { if (++age > search_limit && best_noise_info.over_count == 0) @@ -1161,8 +1125,7 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co break; } } - } - while ((cod_info_w.global_gain + cod_info_w.scalefac_scale) < 255); + } while ((cod_info_w.global_gain + cod_info_w.scalefac_scale) < 255); if (cfg->noise_shaping_amp == 3) { if (!bRefine) { @@ -1173,14 +1136,12 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co best_ggain_pass1 = cod_info_w.global_gain; bRefine = 1; - } - else { + } else { /* search already refined, stop */ bEndOfSearch = 1; } - } - else { + } else { bEndOfSearch = 1; } } @@ -1191,8 +1152,8 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co if (cfg->vbr == vbr_rh || cfg->vbr == vbr_mtrh || cfg->vbr == vbr_mt) /* restore for reuse on next try */ memcpy(xrpow, save_xrpow, sizeof(FLOAT) * 576); - /* do the 'substep shaping' - */ + /* do the 'substep shaping' + */ else if (gfc->sv_qnt.substep_shaping & 1) trancate_smallspectrums(gfc, cod_info, l3_xmin, xrpow); @@ -1200,9 +1161,6 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co } - - - /************************************************************************ * * iteration_finish_one() @@ -1214,8 +1172,7 @@ outer_loop(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * co ************************************************************************/ static void -iteration_finish_one(lame_internal_flags * gfc, int gr, int ch) -{ +iteration_finish_one(lame_internal_flags *gfc, int gr, int ch) { SessionConfig_t const *const cfg = &gfc->cfg; III_side_info_t *const l3_side = &gfc->l3_side; gr_info *const cod_info = &l3_side->tt[gr][ch]; @@ -1235,7 +1192,6 @@ iteration_finish_one(lame_internal_flags * gfc, int gr, int ch) } - /********************************************************************* * * VBR_encode_granule() @@ -1245,16 +1201,16 @@ iteration_finish_one(lame_internal_flags * gfc, int gr, int ch) *********************************************************************/ static void -VBR_encode_granule(lame_internal_flags * gfc, gr_info * const cod_info, const FLOAT * const l3_xmin, /* allowed distortion of the scalefactor */ +VBR_encode_granule(lame_internal_flags *gfc, gr_info *const cod_info, + const FLOAT *const l3_xmin, /* allowed distortion of the scalefactor */ FLOAT xrpow[576], /* coloured magnitudes of spectral values */ - const int ch, int min_bits, int max_bits) -{ + const int ch, int min_bits, int max_bits) { gr_info bst_cod_info; - FLOAT bst_xrpow[576]; + FLOAT bst_xrpow[576]; int const Max_bits = max_bits; - int real_bits = max_bits + 1; - int this_bits = (max_bits + min_bits) / 2; - int dbits, over, found = 0; + int real_bits = max_bits + 1; + int this_bits = (max_bits + min_bits) / 2; + int dbits, over, found = 0; int const sfb21_extra = gfc->sv_qnt.sfb21_extra; assert(Max_bits <= MAX_BITS_PER_CHANNEL); @@ -1294,8 +1250,7 @@ VBR_encode_granule(lame_internal_flags * gfc, gr_info * const cod_info, const FL max_bits = real_bits - 32; dbits = max_bits - min_bits; this_bits = (max_bits + min_bits) / 2; - } - else { + } else { /* try with more bits */ min_bits = this_bits + 32; @@ -1326,7 +1281,6 @@ VBR_encode_granule(lame_internal_flags * gfc, gr_info * const cod_info, const FL } - /************************************************************************ * * get_framebits() @@ -1341,11 +1295,10 @@ VBR_encode_granule(lame_internal_flags * gfc, gr_info * const cod_info, const FL ************************************************************************/ static void -get_framebits(lame_internal_flags * gfc, int frameBits[15]) -{ +get_framebits(lame_internal_flags *gfc, int frameBits[15]) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; - int bitsPerFrame, i; + int bitsPerFrame, i; /* always use at least this many bits per granule per channel * unless we detect analog silence, see below @@ -1390,19 +1343,18 @@ get_framebits(lame_internal_flags * gfc, int frameBits[15]) /* RH: this one needs to be overhauled sometime */ static int -VBR_old_prepare(lame_internal_flags * gfc, +VBR_old_prepare(lame_internal_flags *gfc, const FLOAT pe[2][2], FLOAT const ms_ener_ratio[2], const III_psy_ratio ratio[2][2], FLOAT l3_xmin[2][2][SFBMAX], - int frameBits[16], int min_bits[2][2], int max_bits[2][2], int bands[2][2]) -{ + int frameBits[16], int min_bits[2][2], int max_bits[2][2], int bands[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; - FLOAT masking_lower_db, adjust = 0.0; - int gr, ch; - int analog_silence = 1; - int avg, mxb, bits = 0; + FLOAT masking_lower_db, adjust = 0.0; + int gr, ch; + int analog_silence = 1; + int avg, mxb, bits = 0; eov->bitrate_index = cfg->vbr_max_bitrate_index; avg = ResvFrameBegin(gfc, &avg) / cfg->mode_gr; @@ -1421,8 +1373,7 @@ VBR_old_prepare(lame_internal_flags * gfc, if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type */ adjust = 1.28 / (1 + exp(3.5 - pe[gr][ch] / 300.)) - 0.05; masking_lower_db = gfc->sv_qnt.mask_adjust - adjust; - } - else { + } else { adjust = 2.56 / (1 + exp(3.5 - pe[gr][ch] / 300.)) - 0.14; masking_lower_db = gfc->sv_qnt.mask_adjust_short - adjust; } @@ -1455,14 +1406,13 @@ VBR_old_prepare(lame_internal_flags * gfc, static void bitpressure_strategy(lame_internal_flags const *gfc, - FLOAT l3_xmin[2][2][SFBMAX], const int min_bits[2][2], int max_bits[2][2]) -{ + FLOAT l3_xmin[2][2][SFBMAX], const int min_bits[2][2], int max_bits[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; - int gr, ch, sfb; + int gr, ch, sfb; for (gr = 0; gr < cfg->mode_gr; gr++) { for (ch = 0; ch < cfg->channels_out; ch++) { gr_info const *const gi = &gfc->l3_side.tt[gr][ch]; - FLOAT *pxmin = l3_xmin[gr][ch]; + FLOAT *pxmin = l3_xmin[gr][ch]; for (sfb = 0; sfb < gi->psy_lmax; sfb++) *pxmin++ *= 1. + .029 * sfb * sfb / SBMAX_l / SBMAX_l; @@ -1491,21 +1441,20 @@ bitpressure_strategy(lame_internal_flags const *gfc, ************************************************************************/ void -VBR_old_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], - const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) -{ +VBR_old_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; - FLOAT l3_xmin[2][2][SFBMAX]; - - FLOAT xrpow[576]; - int bands[2][2]; - int frameBits[15]; - int used_bits; - int bits; - int min_bits[2][2], max_bits[2][2]; - int mean_bits; - int ch, gr, analog_silence; + FLOAT l3_xmin[2][2][SFBMAX]; + + FLOAT xrpow[576]; + int bands[2][2]; + int frameBits[15]; + int used_bits; + int bits; + int min_bits[2][2], max_bits[2][2]; + int mean_bits; + int ch, gr, analog_silence; III_side_info_t *const l3_side = &gfc->l3_side; analog_silence = VBR_old_prepare(gfc, pe, ms_ener_ratio, ratio, @@ -1521,7 +1470,7 @@ VBR_old_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], for (gr = 0; gr < cfg->mode_gr; gr++) { for (ch = 0; ch < cfg->channels_out; ch++) { - int ret; + int ret; gr_info *const cod_info = &l3_side->tt[gr][ch]; /* init_outer_loop sets up cod_info, scalefac and xrpow @@ -1567,7 +1516,7 @@ VBR_old_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], if (used_bits <= bits) break; - bitpressure_strategy(gfc, l3_xmin, (const int (*)[2])min_bits, max_bits); + bitpressure_strategy(gfc, l3_xmin, (const int (*)[2]) min_bits, max_bits); } /* breaks adjusted */ /*--------------------------------------*/ @@ -1581,20 +1530,18 @@ VBR_old_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], } - static int -VBR_new_prepare(lame_internal_flags * gfc, +VBR_new_prepare(lame_internal_flags *gfc, const FLOAT pe[2][2], const III_psy_ratio ratio[2][2], FLOAT l3_xmin[2][2][SFBMAX], int frameBits[16], int max_bits[2][2], - int* max_resv) -{ + int *max_resv) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; - int gr, ch; - int analog_silence = 1; - int avg, bits = 0; - int maximum_framebits; + int gr, ch; + int analog_silence = 1; + int avg, bits = 0; + int maximum_framebits; if (!cfg->free_format) { eov->bitrate_index = cfg->vbr_max_bitrate_index; @@ -1603,8 +1550,7 @@ VBR_new_prepare(lame_internal_flags * gfc, get_framebits(gfc, frameBits); maximum_framebits = frameBits[cfg->vbr_max_bitrate_index]; - } - else { + } else { eov->bitrate_index = 0; maximum_framebits = ResvFrameBegin(gfc, &avg); frameBits[0] = maximum_framebits; @@ -1644,26 +1590,24 @@ VBR_new_prepare(lame_internal_flags * gfc, } - void -VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], - const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) -{ +VBR_new_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; - FLOAT l3_xmin[2][2][SFBMAX]; + FLOAT l3_xmin[2][2][SFBMAX]; - FLOAT xrpow[2][2][576]; - int frameBits[15]; - int used_bits; - int max_bits[2][2]; - int ch, gr, analog_silence, pad; + FLOAT xrpow[2][2][576]; + int frameBits[15]; + int used_bits; + int max_bits[2][2]; + int ch, gr, analog_silence, pad; III_side_info_t *const l3_side = &gfc->l3_side; - const FLOAT (*const_l3_xmin)[2][SFBMAX] = (const FLOAT (*)[2][SFBMAX])l3_xmin; - const FLOAT (*const_xrpow)[2][576] = (const FLOAT (*)[2][576])xrpow; - const int (*const_max_bits)[2] = (const int (*)[2])max_bits; - + const FLOAT (*const_l3_xmin)[2][SFBMAX] = (const FLOAT (*)[2][SFBMAX]) l3_xmin; + const FLOAT (*const_xrpow)[2][576] = (const FLOAT (*)[2][576]) xrpow; + const int (*const_max_bits)[2] = (const int (*)[2]) max_bits; + (void) ms_ener_ratio; /* not used */ memset(xrpow, 0, sizeof(xrpow)); @@ -1688,7 +1632,7 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], used_bits = VBR_encode_frame(gfc, const_xrpow, const_l3_xmin, const_max_bits); if (!cfg->free_format) { - int i, j; + int i, j; /* find lowest bitrate able to hold used bits */ @@ -1697,13 +1641,12 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], * any hard framesize limit, so start with smallest possible frame */ i = 1; - } - else { + } else { i = cfg->vbr_min_bitrate_index; } for (; i < cfg->vbr_max_bitrate_index; i++) { - if (used_bits <= frameBits[i]) + if (used_bits <= frameBits[i]) break; } if (i > cfg->vbr_max_bitrate_index) { @@ -1712,16 +1655,14 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], if (pad > 0) { for (j = cfg->vbr_max_bitrate_index; j > i; --j) { int const unused = frameBits[j] - used_bits; - if (unused <= pad) + if (unused <= pad) break; } eov->bitrate_index = j; - } - else { + } else { eov->bitrate_index = i; } - } - else { + } else { #if 0 static int mmm = 0; int fff = getFramesize_kbps(gfc, used_bits); @@ -1734,7 +1675,7 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], } if (used_bits <= frameBits[eov->bitrate_index]) { /* update Reservoire status */ - int mean_bits, fullframebits; + int mean_bits, fullframebits; fullframebits = ResvFrameBegin(gfc, &mean_bits); assert(used_bits <= fullframebits); for (gr = 0; gr < cfg->mode_gr; gr++) { @@ -1744,8 +1685,7 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], } } ResvFrameEnd(gfc, mean_bits); - } - else { + } else { /* SHOULD NOT HAPPEN INTERNAL ERROR */ ERRORF(gfc, "INTERNAL ERROR IN VBR NEW CODE, please send bug report\n"); @@ -1754,9 +1694,6 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], } - - - /******************************************************************** * * calc_target_bits() @@ -1768,17 +1705,16 @@ VBR_new_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], ********************************************************************/ static void -calc_target_bits(lame_internal_flags * gfc, +calc_target_bits(lame_internal_flags *gfc, const FLOAT pe[2][2], FLOAT const ms_ener_ratio[2], - int targ_bits[2][2], int *analog_silence_bits, int *max_frame_bits) -{ + int targ_bits[2][2], int *analog_silence_bits, int *max_frame_bits) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; III_side_info_t const *const l3_side = &gfc->l3_side; - FLOAT res_factor; - int gr, ch, totbits, mean_bits; - int framesize = 576 * cfg->mode_gr; + FLOAT res_factor; + int gr, ch, totbits, mean_bits; + int framesize = 576 * cfg->mode_gr; eov->bitrate_index = cfg->vbr_max_bitrate_index; *max_frame_bits = ResvFrameBegin(gfc, &mean_bits); @@ -1820,12 +1756,12 @@ calc_target_bits(lame_internal_flags * gfc, res_factor = 1.00; for (gr = 0; gr < cfg->mode_gr; gr++) { - int sum = 0; + int sum = 0; for (ch = 0; ch < cfg->channels_out; ch++) { targ_bits[gr][ch] = res_factor * mean_bits; if (pe[gr][ch] > 700) { - int add_bits = (pe[gr][ch] - 700) / 1.4; + int add_bits = (pe[gr][ch] - 700) / 1.4; gr_info const *const cod_info = &l3_side->tt[gr][ch]; targ_bits[gr][ch] = res_factor * mean_bits; @@ -1886,10 +1822,6 @@ calc_target_bits(lame_internal_flags * gfc, } - - - - /******************************************************************** * * ABR_iteration_loop() @@ -1901,17 +1833,16 @@ calc_target_bits(lame_internal_flags * gfc, ********************************************************************/ void -ABR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], - const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) -{ +ABR_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; EncResult_t *const eov = &gfc->ov_enc; - FLOAT l3_xmin[SFBMAX]; - FLOAT xrpow[576]; - int targ_bits[2][2]; - int mean_bits, max_frame_bits; - int ch, gr, ath_over; - int analog_silence_bits; + FLOAT l3_xmin[SFBMAX]; + FLOAT xrpow[576]; + int targ_bits[2][2]; + int mean_bits, max_frame_bits; + int ch, gr, ath_over; + int analog_silence_bits; gr_info *cod_info; III_side_info_t *const l3_side = &gfc->l3_side; @@ -1927,15 +1858,14 @@ ABR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], ms_convert(&gfc->l3_side, gr); } for (ch = 0; ch < cfg->channels_out; ch++) { - FLOAT adjust, masking_lower_db; + FLOAT adjust, masking_lower_db; cod_info = &l3_side->tt[gr][ch]; if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type */ /* adjust = 1.28/(1+exp(3.5-pe[gr][ch]/300.))-0.05; */ adjust = 0; masking_lower_db = gfc->sv_qnt.mask_adjust - adjust; - } - else { + } else { /* adjust = 2.56/(1+exp(3.5-pe[gr][ch]/300.))-0.14; */ adjust = 0; masking_lower_db = gfc->sv_qnt.mask_adjust_short - adjust; @@ -1974,10 +1904,6 @@ ABR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], } - - - - /************************************************************************ * * CBR_iteration_loop() @@ -1989,15 +1915,14 @@ ABR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], ************************************************************************/ void -CBR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], - const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) -{ +CBR_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ener_ratio[2], const III_psy_ratio ratio[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; - FLOAT l3_xmin[SFBMAX]; - FLOAT xrpow[576]; - int targ_bits[2]; - int mean_bits, max_bits; - int gr, ch; + FLOAT l3_xmin[SFBMAX]; + FLOAT xrpow[576]; + int targ_bits[2]; + int mean_bits, max_bits; + int gr, ch; III_side_info_t *const l3_side = &gfc->l3_side; gr_info *cod_info; @@ -2016,15 +1941,14 @@ CBR_iteration_loop(lame_internal_flags * gfc, const FLOAT pe[2][2], } for (ch = 0; ch < cfg->channels_out; ch++) { - FLOAT adjust, masking_lower_db; + FLOAT adjust, masking_lower_db; cod_info = &l3_side->tt[gr][ch]; if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type */ /* adjust = 1.28/(1+exp(3.5-pe[gr][ch]/300.))-0.05; */ adjust = 0; masking_lower_db = gfc->sv_qnt.mask_adjust - adjust; - } - else { + } else { /* adjust = 2.56/(1+exp(3.5-pe[gr][ch]/300.))-0.14; */ adjust = 0; masking_lower_db = gfc->sv_qnt.mask_adjust_short - adjust; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.h new file mode 100644 index 0000000..4d4f882 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize.h @@ -0,0 +1,38 @@ +/* + * MP3 quantization + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_QUANTIZE_H +#define LAME_QUANTIZE_H + +void CBR_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); + +void VBR_old_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); + +void VBR_new_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); + +void ABR_iteration_loop(lame_internal_flags *gfc, const FLOAT pe[2][2], + const FLOAT ms_ratio[2], const III_psy_ratio ratio[2][2]); + + +#endif /* LAME_QUANTIZE_H */ diff --git a/library/src/main/cpp/lamemp3/quantize_pvt.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.c similarity index 69% rename from library/src/main/cpp/lamemp3/quantize_pvt.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.c index 5b7805e..5d202f7 100644 --- a/library/src/main/cpp/lamemp3/quantize_pvt.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.c @@ -50,43 +50,43 @@ [table_number][row_in_table][column of nr_of_sfb] */ const int nr_of_sfb_block[6][3][4] = { - { - {6, 5, 5, 5}, - {9, 9, 9, 9}, - {6, 9, 9, 9} - }, - { - {6, 5, 7, 3}, - {9, 9, 12, 6}, - {6, 9, 12, 6} - }, - { - {11, 10, 0, 0}, - {18, 18, 0, 0}, - {15, 18, 0, 0} - }, - { - {7, 7, 7, 0}, - {12, 12, 12, 0}, - {6, 15, 12, 0} - }, - { - {6, 6, 6, 3}, - {12, 9, 9, 6}, - {6, 12, 9, 6} - }, - { - {8, 8, 5, 0}, - {15, 12, 9, 0}, - {6, 18, 9, 0} - } + { + {6, 5, 5, 5}, + {9, 9, 9, 9}, + {6, 9, 9, 9} + }, + { + {6, 5, 7, 3}, + {9, 9, 12, 6}, + {6, 9, 12, 6} + }, + { + {11, 10, 0, 0}, + {18, 18, 0, 0}, + {15, 18, 0, 0} + }, + { + {7, 7, 7, 0}, + {12, 12, 12, 0}, + {6, 15, 12, 0} + }, + { + {6, 6, 6, 3}, + {12, 9, 9, 6}, + {6, 12, 9, 6} + }, + { + {8, 8, 5, 0}, + {15, 12, 9, 0}, + {6, 18, 9, 0} + } }; /* Table B.6: layer3 preemphasis */ const int pretab[SBMAX_l] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 }; /* @@ -99,85 +99,91 @@ const int pretab[SBMAX_l] = { const scalefac_struct sfBandIndex[9] = { - { /* Table B.2.b: 22.05 kHz */ - {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, - 522, 576}, - {0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* Table B.2.c: 24 kHz */ /* docs: 332. mpg123(broken): 330 */ - {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464, - 540, 576}, - {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* Table B.2.a: 16 kHz */ - {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, - 522, 576}, - {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* Table B.8.b: 44.1 kHz */ - {0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418, - 576}, - {0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* Table B.8.c: 48 kHz */ - {0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384, - 576}, - {0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* Table B.8.a: 32 kHz */ - {0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550, - 576}, - {0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* MPEG-2.5 11.025 kHz */ - {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, - 522, 576}, - {0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3, - 402 / 3, 522 / 3, 576 / 3} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* MPEG-2.5 12 kHz */ - {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, - 522, 576}, - {0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3, - 402 / 3, 522 / 3, 576 / 3} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - }, - { /* MPEG-2.5 8 kHz */ - {0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570, - 572, 574, 576}, - {0 / 3, 24 / 3, 48 / 3, 72 / 3, 108 / 3, 156 / 3, 216 / 3, 288 / 3, 372 / 3, 480 / 3, 486 / 3, - 492 / 3, 498 / 3, 576 / 3} - , {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ - , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ - } + { /* Table B.2.b: 22.05 kHz */ + {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, + 522, 576}, + {0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* Table B.2.c: 24 kHz */ /* docs: 332. mpg123(broken): 330 */ + {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464, + 540, 576}, + {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* Table B.2.a: 16 kHz */ + {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, + 522, 576}, + {0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* Table B.8.b: 44.1 kHz */ + {0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418, + 576}, + {0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* Table B.8.c: 48 kHz */ + {0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384, + 576}, + {0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* Table B.8.a: 32 kHz */ + {0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550, + 576}, + {0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* MPEG-2.5 11.025 kHz */ + {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, + 522, 576}, + {0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / + 3, 312 / + 3, + 402 / + 3, 522 / + 3, 576 / + 3}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* MPEG-2.5 12 kHz */ + {0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, + 522, 576}, + {0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / + 3, 312 / + 3, + 402 / + 3, 522 / + 3, 576 / + 3}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + }, + { /* MPEG-2.5 8 kHz */ + {0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570, + 572, 574, 576}, + {0 / 3, 24 / 3, 48 / 3, 72 / 3, 108 / 3, 156 / 3, 216 / 3, 288 / 3, 372 / 3, 480 / + 3, 486 / + 3, + 492 / + 3, 498 / + 3, 576 / + 3}, {0, 0, 0, 0, 0, 0, 0} /* sfb21 pseudo sub bands */ + , {0, 0, 0, 0, 0, 0, 0} /* sfb12 pseudo sub bands */ + } }; /* FIXME: move global variables in some struct */ -FLOAT pow20[Q_MAX + Q_MAX2 + 1]; -FLOAT ipow20[Q_MAX]; -FLOAT pow43[PRECALC_SIZE]; +FLOAT pow20[Q_MAX + Q_MAX2 + 1]; +FLOAT ipow20[Q_MAX]; +FLOAT pow43[PRECALC_SIZE]; /* initialized in first call to iteration_init */ #ifdef TAKEHIRO_IEEE754_HACK FLOAT adj43asm[PRECALC_SIZE]; #else -FLOAT adj43[PRECALC_SIZE]; +FLOAT adj43[PRECALC_SIZE]; #endif /* @@ -209,17 +215,15 @@ ATH = ATH * 2.5e-10 (ener) */ -static FLOAT -ATHmdct(SessionConfig_t const *cfg, FLOAT f) -{ - FLOAT ath; +static FLOAT +ATHmdct(SessionConfig_t const *cfg, FLOAT f) { + FLOAT ath; ath = ATHformula(cfg, f); if (cfg->ATHfixpoint > 0) { ath -= cfg->ATHfixpoint; - } - else { + } else { ath -= NSATHSCALE; } ath += cfg->ATH_offset_db; @@ -230,15 +234,14 @@ ATHmdct(SessionConfig_t const *cfg, FLOAT f) } static void -compute_ath(lame_internal_flags const* gfc) -{ +compute_ath(lame_internal_flags const *gfc) { SessionConfig_t const *const cfg = &gfc->cfg; - FLOAT *const ATH_l = gfc->ATH->l; - FLOAT *const ATH_psfb21 = gfc->ATH->psfb21; - FLOAT *const ATH_s = gfc->ATH->s; - FLOAT *const ATH_psfb12 = gfc->ATH->psfb12; - int sfb, i, start, end; - FLOAT ATH_f; + FLOAT *const ATH_l = gfc->ATH->l; + FLOAT *const ATH_psfb21 = gfc->ATH->psfb21; + FLOAT *const ATH_s = gfc->ATH->s; + FLOAT *const ATH_psfb12 = gfc->ATH->psfb12; + int sfb, i, start, end; + FLOAT ATH_f; FLOAT const samp_freq = cfg->samplerate_out; for (sfb = 0; sfb < SBMAX_l; sfb++) { @@ -323,25 +326,24 @@ compute_ath(lame_internal_flags const* gfc) } -static float const payload_long[2][4] = -{ {-0.000f, -0.000f, -0.000f, +0.000f} -, {-0.500f, -0.250f, -0.025f, +0.500f} -}; -static float const payload_short[2][4] = -{ {-0.000f, -0.000f, -0.000f, +0.000f} -, {-2.000f, -1.000f, -0.050f, +0.500f} -}; +static float const payload_long[2][4] = + {{-0.000f, -0.000f, -0.000f, +0.000f}, + {-0.500f, -0.250f, -0.025f, +0.500f} + }; +static float const payload_short[2][4] = + {{-0.000f, -0.000f, -0.000f, +0.000f}, + {-2.000f, -1.000f, -0.050f, +0.500f} + }; /************************************************************************/ /* initialization for iteration_loop */ /************************************************************************/ void -iteration_init(lame_internal_flags * gfc) -{ +iteration_init(lame_internal_flags *gfc) { SessionConfig_t const *const cfg = &gfc->cfg; III_side_info_t *const l3_side = &gfc->l3_side; - FLOAT adjust, db; - int i, sel; + FLOAT adjust, db; + int i, sel; if (gfc->iteration_init_init == 0) { gfc->iteration_init_init = 1; @@ -419,22 +421,19 @@ iteration_init(lame_internal_flags * gfc) } - - - /************************************************************************ * allocate bits among 2 channels based on PE * mt 6/99 * bugfixes rh 8/01: often allocated more than the allowed 4095 bits ************************************************************************/ int -on_pe(lame_internal_flags * gfc, const FLOAT pe[][2], int targ_bits[2], int mean_bits, int gr, int cbr) -{ +on_pe(lame_internal_flags *gfc, const FLOAT pe[][2], int targ_bits[2], int mean_bits, int gr, + int cbr) { SessionConfig_t const *const cfg = &gfc->cfg; - int extra_bits = 0, tbits, bits; - int add_bits[2] = {0, 0}; - int max_bits; /* maximum allowed bits for this granule */ - int ch; + int extra_bits = 0, tbits, bits; + int add_bits[2] = {0, 0}; + int max_bits; /* maximum allowed bits for this granule */ + int ch; /* allocate targ_bits for granule */ ResvMaxBits(gfc, mean_bits, &tbits, &extra_bits, cbr); @@ -476,7 +475,7 @@ on_pe(lame_internal_flags * gfc, const FLOAT pe[][2], int targ_bits[2], int mean bits += targ_bits[ch]; } if (bits > MAX_BITS_PER_GRANULE) { - int sum = 0; + int sum = 0; for (ch = 0; ch < cfg->channels_out; ++ch) { targ_bits[ch] *= MAX_BITS_PER_GRANULE; targ_bits[ch] /= bits; @@ -489,13 +488,10 @@ on_pe(lame_internal_flags * gfc, const FLOAT pe[][2], int targ_bits[2], int mean } - - void -reduce_side(int targ_bits[2], FLOAT ms_ener_ratio, int mean_bits, int max_bits) -{ - int move_bits; - FLOAT fac; +reduce_side(int targ_bits[2], FLOAT ms_ener_ratio, int mean_bits, int max_bits) { + int move_bits; + FLOAT fac; assert(max_bits <= MAX_BITS_PER_GRANULE); assert(targ_bits[0] + targ_bits[1] <= MAX_BITS_PER_GRANULE); @@ -529,8 +525,7 @@ reduce_side(int targ_bits[2], FLOAT ms_ener_ratio, int mean_bits, int max_bits) if (targ_bits[0] < mean_bits) targ_bits[0] += move_bits; targ_bits[1] -= move_bits; - } - else { + } else { targ_bits[0] += targ_bits[1] - 125; targ_bits[1] = 125; } @@ -554,15 +549,14 @@ reduce_side(int targ_bits[2], FLOAT ms_ener_ratio, int mean_bits, int max_bits) */ FLOAT -athAdjust(FLOAT a, FLOAT x, FLOAT athFloor, float ATHfixpoint) -{ +athAdjust(FLOAT a, FLOAT x, FLOAT athFloor, float ATHfixpoint) { /* work in progress */ FLOAT const o = 90.30873362f; FLOAT const p = (ATHfixpoint < 1.f) ? 94.82444863f : ATHfixpoint; - FLOAT u = FAST_LOG10_X(x, 10.0f); + FLOAT u = FAST_LOG10_X(x, 10.0f); FLOAT const v = a * a; - FLOAT w = 0.0f; + FLOAT w = 0.0f; u -= athFloor; /* undo scaling */ if (v > 1E-20f) w = 1.f + FAST_LOG10_X(v, 10.0f / o); @@ -590,18 +584,17 @@ athAdjust(FLOAT a, FLOAT x, FLOAT athFloor, float ATHfixpoint) int calc_xmin(lame_internal_flags const *gfc, - III_psy_ratio const *const ratio, gr_info * const cod_info, FLOAT * pxmin) -{ + III_psy_ratio const *const ratio, gr_info *const cod_info, FLOAT *pxmin) { SessionConfig_t const *const cfg = &gfc->cfg; - int sfb, gsfb, j = 0, ath_over = 0, k; + int sfb, gsfb, j = 0, ath_over = 0, k; ATH_t const *const ATH = gfc->ATH; const FLOAT *const xr = cod_info->xr; - int max_nonzero; + int max_nonzero; for (gsfb = 0; gsfb < cod_info->psy_lmax; gsfb++) { - FLOAT en0, xmin; - FLOAT rh1, rh2, rh3; - int width, l; + FLOAT en0, xmin; + FLOAT rh1, rh2, rh3; + int width, l; xmin = athAdjust(ATH->adjust_factor, ATH->l[gsfb], ATH->floor, cfg->ATHfixpoint); xmin *= gfc->sv_qnt.longfact[gsfb]; @@ -625,18 +618,16 @@ calc_xmin(lame_internal_flags const *gfc, if (en0 < xmin) { rh3 = en0; - } - else if (rh2 < xmin) { + } else if (rh2 < xmin) { rh3 = xmin; - } - else { + } else { rh3 = rh2; } xmin = rh3; { FLOAT const e = ratio->en.l[gsfb]; if (e > 1e-12f) { - FLOAT x; + FLOAT x; x = en0 * ratio->thm.l[gsfb] / e; x *= gfc->sv_qnt.longfact[gsfb]; if (xmin < x) @@ -644,7 +635,7 @@ calc_xmin(lame_internal_flags const *gfc, } } xmin = Max(xmin, DBL_EPSILON); - cod_info->energy_above_cutoff[gsfb] = (en0 > xmin+1e-14f) ? 1 : 0; + cod_info->energy_above_cutoff[gsfb] = (en0 > xmin + 1e-14f) ? 1 : 0; *pxmin++ = xmin; } /* end of long block loop */ @@ -661,42 +652,39 @@ calc_xmin(lame_internal_flags const *gfc, } if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type, but not SHORT */ max_nonzero |= 1; /* only odd numbers */ - } - else { + } else { max_nonzero /= 6; /* 3 short blocks */ max_nonzero *= 6; max_nonzero += 5; } if (gfc->sv_qnt.sfb21_extra == 0 && cfg->samplerate_out < 44000) { - int const sfb_l = (cfg->samplerate_out <= 8000) ? 17 : 21; - int const sfb_s = (cfg->samplerate_out <= 8000) ? 9 : 12; - int limit = 575; - if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type, but not SHORT */ - limit = gfc->scalefac_band.l[sfb_l]-1; - } - else { - limit = 3*gfc->scalefac_band.s[sfb_s]-1; - } - if (max_nonzero > limit) { - max_nonzero = limit; - } + int const sfb_l = (cfg->samplerate_out <= 8000) ? 17 : 21; + int const sfb_s = (cfg->samplerate_out <= 8000) ? 9 : 12; + int limit = 575; + if (cod_info->block_type != SHORT_TYPE) { /* NORM, START or STOP type, but not SHORT */ + limit = gfc->scalefac_band.l[sfb_l] - 1; + } else { + limit = 3 * gfc->scalefac_band.s[sfb_s] - 1; + } + if (max_nonzero > limit) { + max_nonzero = limit; + } } cod_info->max_nonzero_coeff = max_nonzero; - for (sfb = cod_info->sfb_smin; gsfb < cod_info->psymax; sfb++, gsfb += 3) { - int width, b, l; - FLOAT tmpATH; + int width, b, l; + FLOAT tmpATH; tmpATH = athAdjust(ATH->adjust_factor, ATH->s[sfb], ATH->floor, cfg->ATHfixpoint); tmpATH *= gfc->sv_qnt.shortfact[sfb]; - + width = cod_info->width[gsfb]; for (b = 0; b < 3; b++) { - FLOAT en0 = 0.0, xmin = tmpATH; - FLOAT rh1, rh2, rh3; + FLOAT en0 = 0.0, xmin = tmpATH; + FLOAT rh1, rh2, rh3; rh1 = tmpATH / width; #ifdef DBL_EPSILON @@ -712,21 +700,19 @@ calc_xmin(lame_internal_flags const *gfc, } if (en0 > tmpATH) ath_over++; - + if (en0 < tmpATH) { rh3 = en0; - } - else if (rh2 < tmpATH) { + } else if (rh2 < tmpATH) { rh3 = tmpATH; - } - else { + } else { rh3 = rh2; } xmin = rh3; { FLOAT const e = ratio->en.s[sfb][b]; if (e > 1e-12f) { - FLOAT x; + FLOAT x; x = en0 * ratio->thm.s[sfb][b] / e; x *= gfc->sv_qnt.shortfact[sfb]; if (xmin < x) @@ -734,7 +720,7 @@ calc_xmin(lame_internal_flags const *gfc, } } xmin = Max(xmin, DBL_EPSILON); - cod_info->energy_above_cutoff[gsfb+b] = (en0 > xmin+1e-14f) ? 1 : 0; + cod_info->energy_above_cutoff[gsfb + b] = (en0 > xmin + 1e-14f) ? 1 : 0; *pxmin++ = xmin; } /* b */ if (cfg->use_temporal_masking_effect) { @@ -749,16 +735,15 @@ calc_xmin(lame_internal_flags const *gfc, } -static FLOAT -calc_noise_core_c(const gr_info * const cod_info, int *startline, int l, FLOAT step) -{ - FLOAT noise = 0; - int j = *startline; +static FLOAT +calc_noise_core_c(const gr_info *const cod_info, int *startline, int l, FLOAT step) { + FLOAT noise = 0; + int j = *startline; const int *const ix = cod_info->l3_enc; if (j > cod_info->count1) { while (l--) { - FLOAT temp; + FLOAT temp; temp = cod_info->xr[j]; j++; noise += temp * temp; @@ -766,13 +751,12 @@ calc_noise_core_c(const gr_info * const cod_info, int *startline, int l, FLOAT s j++; noise += temp * temp; } - } - else if (j > cod_info->big_values) { - FLOAT ix01[2]; + } else if (j > cod_info->big_values) { + FLOAT ix01[2]; ix01[0] = 0; ix01[1] = step; while (l--) { - FLOAT temp; + FLOAT temp; temp = fabs(cod_info->xr[j]) - ix01[ix[j]]; j++; noise += temp * temp; @@ -780,10 +764,9 @@ calc_noise_core_c(const gr_info * const cod_info, int *startline, int l, FLOAT s j++; noise += temp * temp; } - } - else { + } else { while (l--) { - FLOAT temp; + FLOAT temp; temp = fabs(cod_info->xr[j]) - pow43[ix[j]] * step; j++; noise += temp * temp; @@ -817,13 +800,12 @@ calc_noise_core_c(const gr_info * const cod_info, int *startline, int l, FLOAT s int calc_noise(gr_info const *const cod_info, FLOAT const *l3_xmin, - FLOAT * distort, calc_noise_result * const res, calc_noise_data * prev_noise) -{ - int sfb, l, over = 0; - FLOAT over_noise_db = 0; - FLOAT tot_noise_db = 0; /* 0 dB relative to masking */ - FLOAT max_noise = -20.0; /* -200 dB relative to masking */ - int j = 0; + FLOAT *distort, calc_noise_result *const res, calc_noise_data *prev_noise) { + int sfb, l, over = 0; + FLOAT over_noise_db = 0; + FLOAT tot_noise_db = 0; /* 0 dB relative to masking */ + FLOAT max_noise = -20.0; /* -200 dB relative to masking */ + int j = 0; const int *scalefac = cod_info->scalefac; res->over_SSD = 0; @@ -831,12 +813,12 @@ calc_noise(gr_info const *const cod_info, for (sfb = 0; sfb < cod_info->psymax; sfb++) { int const s = - cod_info->global_gain - (((*scalefac++) + (cod_info->preflag ? pretab[sfb] : 0)) - << (cod_info->scalefac_scale + 1)) - - cod_info->subblock_gain[cod_info->window[sfb]] * 8; + cod_info->global_gain - (((*scalefac++) + (cod_info->preflag ? pretab[sfb] : 0)) + << (cod_info->scalefac_scale + 1)) + - cod_info->subblock_gain[cod_info->window[sfb]] * 8; FLOAT const r_l3_xmin = 1.f / *l3_xmin++; - FLOAT distort_ = 0.0f; - FLOAT noise = 0.0f; + FLOAT distort_ = 0.0f; + FLOAT noise = 0.0f; if (prev_noise && (prev_noise->step[sfb] == s)) { @@ -846,13 +828,12 @@ calc_noise(gr_info const *const cod_info, noise = prev_noise->noise_log[sfb]; - } - else { + } else { FLOAT const step = POW20(s); l = cod_info->width[sfb] >> 1; if ((j + cod_info->width[sfb]) > cod_info->max_nonzero_coeff) { - int usefullsize; + int usefullsize; usefullsize = cod_info->max_nonzero_coeff - j + 1; if (usefullsize > 0) @@ -892,7 +873,7 @@ calc_noise(gr_info const *const cod_info, tot_noise_db += noise; if (noise > 0.0) { - int tmp; + int tmp; tmp = Max((int) (noise * 10 + .5), 1); res->over_SSD += tmp * tmp; @@ -915,12 +896,6 @@ calc_noise(gr_info const *const cod_info, } - - - - - - /************************************************************************ * * set_pinfo() @@ -935,16 +910,15 @@ calc_noise(gr_info const *const cod_info, static void set_pinfo(lame_internal_flags const *gfc, - gr_info * const cod_info, const III_psy_ratio * const ratio, const int gr, const int ch) -{ + gr_info *const cod_info, const III_psy_ratio *const ratio, const int gr, const int ch) { SessionConfig_t const *const cfg = &gfc->cfg; - int sfb, sfb2; - int j, i, l, start, end, bw; - FLOAT en0, en1; + int sfb, sfb2; + int j, i, l, start, end, bw; + FLOAT en0, en1; FLOAT const ifqstep = (cod_info->scalefac_scale == 0) ? .5 : 1.0; int const *const scalefac = cod_info->scalefac; - FLOAT l3_xmin[SFBMAX], xfsf[SFBMAX]; + FLOAT l3_xmin[SFBMAX], xfsf[SFBMAX]; calc_noise_result noise; (void) calc_xmin(gfc, ratio, cod_info, l3_xmin); @@ -1009,11 +983,11 @@ set_pinfo(lame_internal_flags const *gfc, en0 = 0; gfc->pinfo->thr_s[gr][ch][3 * sfb + i] = - en1 * Max(en0 * ratio->thm.s[sfb][i], gfc->ATH->s[sfb]); + en1 * Max(en0 * ratio->thm.s[sfb][i], gfc->ATH->s[sfb]); /* there is no scalefactor bands >= SBPSY_s */ gfc->pinfo->LAMEsfb_s[gr][ch][3 * sfb + i] - = -2.0 * cod_info->subblock_gain[i]; + = -2.0 * cod_info->subblock_gain[i]; if (sfb < SBPSY_s) { gfc->pinfo->LAMEsfb_s[gr][ch][3 * sfb + i] -= ifqstep * scalefac[sfb2]; } @@ -1044,24 +1018,23 @@ set_pinfo(lame_internal_flags const *gfc, ************************************************************************/ void -set_frame_pinfo(lame_internal_flags * gfc, const III_psy_ratio ratio[2][2]) -{ +set_frame_pinfo(lame_internal_flags *gfc, const III_psy_ratio ratio[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; - int ch; - int gr; + int ch; + int gr; /* for every granule and channel patch l3_enc and set info */ for (gr = 0; gr < cfg->mode_gr; gr++) { for (ch = 0; ch < cfg->channels_out; ch++) { gr_info *const cod_info = &gfc->l3_side.tt[gr][ch]; - int scalefac_sav[SFBMAX]; + int scalefac_sav[SFBMAX]; memcpy(scalefac_sav, cod_info->scalefac, sizeof(scalefac_sav)); /* reconstruct the scalefactors in case SCFSI was used */ if (gr == 1) { - int sfb; + int sfb; for (sfb = 0; sfb < cod_info->sfb_lmax; sfb++) { if (cod_info->scalefac[sfb] < 0) /* scfsi */ cod_info->scalefac[sfb] = gfc->l3_side.tt[0][ch].scalefac[sfb]; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.h new file mode 100644 index 0000000..df579c2 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/quantize_pvt.h @@ -0,0 +1,127 @@ +/* + * quantize_pvt include file + * + * Copyright (c) 1999 Takehiro TOMINAGA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_QUANTIZE_PVT_H +#define LAME_QUANTIZE_PVT_H + +#define IXMAX_VAL 8206 /* ix always <= 8191+15. see count_bits() */ + +/* buggy Winamp decoder cannot handle values > 8191 */ +/* #define IXMAX_VAL 8191 */ + +#define PRECALC_SIZE (IXMAX_VAL+2) + + +extern const int nr_of_sfb_block[6][3][4]; +extern const int pretab[SBMAX_l]; +extern const int slen1_tab[16]; +extern const int slen2_tab[16]; + +extern const scalefac_struct sfBandIndex[9]; + +extern FLOAT pow43[PRECALC_SIZE]; +#ifdef TAKEHIRO_IEEE754_HACK +extern FLOAT adj43asm[PRECALC_SIZE]; +#else +extern FLOAT adj43[PRECALC_SIZE]; +#endif + +#define Q_MAX (256+1) +#define Q_MAX2 116 /* minimum possible number of + -cod_info->global_gain + + ((scalefac[] + (cod_info->preflag ? pretab[sfb] : 0)) + << (cod_info->scalefac_scale + 1)) + + cod_info->subblock_gain[cod_info->window[sfb]] * 8; + + for long block, 0+((15+3)<<2) = 18*4 = 72 + for short block, 0+(15<<2)+7*8 = 15*4+56 = 116 + */ + +extern FLOAT pow20[Q_MAX + Q_MAX2 + 1]; +extern FLOAT ipow20[Q_MAX]; + +typedef struct calc_noise_result_t { + FLOAT over_noise; /* sum of quantization noise > masking */ + FLOAT tot_noise; /* sum of all quantization noise */ + FLOAT max_noise; /* max quantization noise */ + int over_count; /* number of quantization noise > masking */ + int over_SSD; /* SSD-like cost of distorted bands */ + int bits; +} calc_noise_result; + + +/** +* allows re-use of previously +* computed noise values +*/ +typedef struct calc_noise_data_t { + int global_gain; + int sfb_count1; + int step[39]; + FLOAT noise[39]; + FLOAT noise_log[39]; +} calc_noise_data; + + +int on_pe(lame_internal_flags *gfc, const FLOAT pe[2][2], + int targ_bits[2], int mean_bits, int gr, int cbr); + +void reduce_side(int targ_bits[2], FLOAT ms_ener_ratio, int mean_bits, int max_bits); + + +void iteration_init(lame_internal_flags *gfc); + + +int calc_xmin(lame_internal_flags const *gfc, + III_psy_ratio const *const ratio, gr_info *const cod_info, FLOAT *l3_xmin); + +int calc_noise(const gr_info *const cod_info, + const FLOAT *l3_xmin, + FLOAT *distort, calc_noise_result *const res, calc_noise_data *prev_noise); + +void set_frame_pinfo(lame_internal_flags *gfc, const III_psy_ratio ratio[2][2]); + + +/* takehiro.c */ + +int count_bits(lame_internal_flags const *const gfc, const FLOAT *const xr, + gr_info *const cod_info, calc_noise_data *prev_noise); + +int noquant_count_bits(lame_internal_flags const *const gfc, + gr_info *const cod_info, calc_noise_data *prev_noise); + + +void best_huffman_divide(const lame_internal_flags *const gfc, gr_info *const cod_info); + +void best_scalefac_store(const lame_internal_flags *gfc, const int gr, const int ch, + III_side_info_t *const l3_side); + +int scale_bitcount(const lame_internal_flags *gfc, gr_info *cod_info); + +void huffman_init(lame_internal_flags *const gfc); + +void init_xrpow_core_init(lame_internal_flags *const gfc); + +FLOAT athAdjust(FLOAT a, FLOAT x, FLOAT athFloor, float ATHfixpoint); + +#define LARGE_BITS 100000 + +#endif /* LAME_QUANTIZE_PVT_H */ diff --git a/library/src/main/cpp/lamemp3/reservoir.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.c similarity index 92% rename from library/src/main/cpp/lamemp3/reservoir.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.c index 4fdaa8d..a5a0e17 100644 --- a/library/src/main/cpp/lamemp3/reservoir.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.c @@ -34,7 +34,6 @@ #include "bitstream.h" #include "lame-analysis.h" -#include "lame_global_flags.h" /* @@ -80,16 +79,15 @@ */ int -ResvFrameBegin(lame_internal_flags * gfc, int *mean_bits) -{ +ResvFrameBegin(lame_internal_flags *gfc, int *mean_bits) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - int fullFrameBits; - int resvLimit; - int maxmp3buf; + int fullFrameBits; + int resvLimit; + int maxmp3buf; III_side_info_t *const l3_side = &gfc->l3_side; - int frameLength; - int meanBits; + int frameLength; + int meanBits; frameLength = getframebits(gfc); meanBits = (frameLength - cfg->sideinfo_len * 8) / cfg->mode_gr; @@ -145,7 +143,7 @@ ResvFrameBegin(lame_internal_flags * gfc, int *mean_bits) esv->ResvMax = resvLimit; if (esv->ResvMax < 0 || cfg->disable_reservoir) esv->ResvMax = 0; - + fullFrameBits = meanBits * cfg->mode_gr + Min(esv->ResvSize, esv->ResvMax); if (fullFrameBits > maxmp3buf) @@ -157,7 +155,8 @@ ResvFrameBegin(lame_internal_flags * gfc, int *mean_bits) l3_side->resvDrain_pre = 0; if (gfc->pinfo != NULL) { - gfc->pinfo->mean_bits = meanBits / 2; /* expected bits per channel per granule [is this also right for mono/stereo, MPEG-1/2 ?] */ + gfc->pinfo->mean_bits = meanBits / + 2; /* expected bits per channel per granule [is this also right for mono/stereo, MPEG-1/2 ?] */ gfc->pinfo->resvsize = esv->ResvSize; } *mean_bits = meanBits; @@ -172,12 +171,11 @@ ResvFrameBegin(lame_internal_flags * gfc, int *mean_bits) Mark Taylor 4/99 */ void -ResvMaxBits(lame_internal_flags * gfc, int mean_bits, int *targ_bits, int *extra_bits, int cbr) -{ +ResvMaxBits(lame_internal_flags *gfc, int mean_bits, int *targ_bits, int *extra_bits, int cbr) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; - int add_bits, targBits, extraBits; - int ResvSize = esv->ResvSize, ResvMax = esv->ResvMax; + int add_bits, targBits, extraBits; + int ResvSize = esv->ResvSize, ResvMax = esv->ResvMax; /* conpensate the saved bits used in the 1st granule */ if (cbr) @@ -193,8 +191,7 @@ ResvMaxBits(lame_internal_flags * gfc, int mean_bits, int *targ_bits, int *extra add_bits = ResvSize - (ResvMax * 9) / 10; targBits += add_bits; gfc->sv_qnt.substep_shaping |= 0x80; - } - else { + } else { add_bits = 0; gfc->sv_qnt.substep_shaping &= 0x7f; /* build up reservoir. this builds the reservoir a little slower @@ -223,8 +220,7 @@ ResvMaxBits(lame_internal_flags * gfc, int mean_bits, int *targ_bits, int *extra the reservoir to reflect the granule's usage. */ void -ResvAdjust(lame_internal_flags * gfc, gr_info const *gi) -{ +ResvAdjust(lame_internal_flags *gfc, gr_info const *gi) { gfc->sv_enc.ResvSize -= gi->part2_3_length + gi->part2_length; } @@ -236,13 +232,12 @@ ResvAdjust(lame_internal_flags * gfc, gr_info const *gi) bits. */ void -ResvFrameEnd(lame_internal_flags * gfc, int mean_bits) -{ +ResvFrameEnd(lame_internal_flags *gfc, int mean_bits) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *const esv = &gfc->sv_enc; III_side_info_t *const l3_side = &gfc->l3_side; - int stuffingBits; - int over_bits; + int stuffingBits; + int over_bits; esv->ResvSize += mean_bits * cfg->mode_gr; stuffingBits = 0; @@ -281,7 +276,7 @@ ResvFrameEnd(lame_internal_flags * gfc, int mean_bits) * to make sure main_data_begin does not create a reservoir bigger * than ResvMax mt 4/00*/ { - int mdb_bytes = Min(l3_side->main_data_begin * 8, stuffingBits) / 8; + int mdb_bytes = Min(l3_side->main_data_begin * 8, stuffingBits) / 8; l3_side->resvDrain_pre += 8 * mdb_bytes; stuffingBits -= 8 * mdb_bytes; esv->ResvSize -= 8 * mdb_bytes; diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.h new file mode 100644 index 0000000..2b9a4d2 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/reservoir.h @@ -0,0 +1,34 @@ +/* + * bit reservoir include file + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_RESERVOIR_H +#define LAME_RESERVOIR_H + +int ResvFrameBegin(lame_internal_flags *gfc, int *mean_bits); + +void ResvMaxBits(lame_internal_flags *gfc, int mean_bits, int *targ_bits, int *max_bits, + int cbr); + +void ResvAdjust(lame_internal_flags *gfc, gr_info const *gi); + +void ResvFrameEnd(lame_internal_flags *gfc, int mean_bits); + +#endif /* LAME_RESERVOIR_H */ diff --git a/library/src/main/cpp/lamemp3/set_get.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.c similarity index 78% rename from library/src/main/cpp/lamemp3/set_get.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.c index 0e0ddf5..f4b2089 100644 --- a/library/src/main/cpp/lamemp3/set_get.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.c @@ -44,8 +44,7 @@ /* number of samples */ /* it's unlikely for this function to return an error */ int -lame_set_num_samples(lame_global_flags * gfp, unsigned long num_samples) -{ +lame_set_num_samples(lame_global_flags *gfp, unsigned long num_samples) { if (is_lame_global_flags_valid(gfp)) { /* default = 2^32-1 */ gfp->num_samples = num_samples; @@ -55,8 +54,7 @@ lame_set_num_samples(lame_global_flags * gfp, unsigned long num_samples) } unsigned long -lame_get_num_samples(const lame_global_flags * gfp) -{ +lame_get_num_samples(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->num_samples; } @@ -66,8 +64,7 @@ lame_get_num_samples(const lame_global_flags * gfp) /* input samplerate */ int -lame_set_in_samplerate(lame_global_flags * gfp, int in_samplerate) -{ +lame_set_in_samplerate(lame_global_flags *gfp, int in_samplerate) { if (is_lame_global_flags_valid(gfp)) { if (in_samplerate < 1) return -1; @@ -79,8 +76,7 @@ lame_set_in_samplerate(lame_global_flags * gfp, int in_samplerate) } int -lame_get_in_samplerate(const lame_global_flags * gfp) -{ +lame_get_in_samplerate(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->samplerate_in; } @@ -90,8 +86,7 @@ lame_get_in_samplerate(const lame_global_flags * gfp) /* number of channels in input stream */ int -lame_set_num_channels(lame_global_flags * gfp, int num_channels) -{ +lame_set_num_channels(lame_global_flags *gfp, int num_channels) { if (is_lame_global_flags_valid(gfp)) { /* default = 2 */ if (2 < num_channels || 0 >= num_channels) { @@ -104,8 +99,7 @@ lame_set_num_channels(lame_global_flags * gfp, int num_channels) } int -lame_get_num_channels(const lame_global_flags * gfp) -{ +lame_get_num_channels(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->num_channels; } @@ -115,8 +109,7 @@ lame_get_num_channels(const lame_global_flags * gfp) /* scale the input by this amount before encoding (not used for decoding) */ int -lame_set_scale(lame_global_flags * gfp, float scale) -{ +lame_set_scale(lame_global_flags *gfp, float scale) { if (is_lame_global_flags_valid(gfp)) { /* default = 1 */ gfp->scale = scale; @@ -126,8 +119,7 @@ lame_set_scale(lame_global_flags * gfp, float scale) } float -lame_get_scale(const lame_global_flags * gfp) -{ +lame_get_scale(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->scale; } @@ -138,8 +130,7 @@ lame_get_scale(const lame_global_flags * gfp) /* scale the channel 0 (left) input by this amount before encoding (not used for decoding) */ int -lame_set_scale_left(lame_global_flags * gfp, float scale) -{ +lame_set_scale_left(lame_global_flags *gfp, float scale) { if (is_lame_global_flags_valid(gfp)) { /* default = 1 */ gfp->scale_left = scale; @@ -149,8 +140,7 @@ lame_set_scale_left(lame_global_flags * gfp, float scale) } float -lame_get_scale_left(const lame_global_flags * gfp) -{ +lame_get_scale_left(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->scale_left; } @@ -161,8 +151,7 @@ lame_get_scale_left(const lame_global_flags * gfp) /* scale the channel 1 (right) input by this amount before encoding (not used for decoding) */ int -lame_set_scale_right(lame_global_flags * gfp, float scale) -{ +lame_set_scale_right(lame_global_flags *gfp, float scale) { if (is_lame_global_flags_valid(gfp)) { /* default = 1 */ gfp->scale_right = scale; @@ -172,8 +161,7 @@ lame_set_scale_right(lame_global_flags * gfp, float scale) } float -lame_get_scale_right(const lame_global_flags * gfp) -{ +lame_get_scale_right(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->scale_right; } @@ -183,8 +171,7 @@ lame_get_scale_right(const lame_global_flags * gfp) /* output sample rate in Hz */ int -lame_set_out_samplerate(lame_global_flags * gfp, int out_samplerate) -{ +lame_set_out_samplerate(lame_global_flags *gfp, int out_samplerate) { if (is_lame_global_flags_valid(gfp)) { /* * default = 0: LAME picks best value based on the amount @@ -197,7 +184,7 @@ lame_set_out_samplerate(lame_global_flags * gfp, int out_samplerate) * (not used by decoding routines) */ if (out_samplerate != 0) { - int v=0; + int v = 0; if (SmpFrqIndex(out_samplerate, &v) < 0) return -1; } @@ -208,8 +195,7 @@ lame_set_out_samplerate(lame_global_flags * gfp, int out_samplerate) } int -lame_get_out_samplerate(const lame_global_flags * gfp) -{ +lame_get_out_samplerate(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->samplerate_out; } @@ -225,8 +211,7 @@ lame_get_out_samplerate(const lame_global_flags * gfp) /* collect data for an MP3 frame analzyer */ int -lame_set_analysis(lame_global_flags * gfp, int analysis) -{ +lame_set_analysis(lame_global_flags *gfp, int analysis) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 */ @@ -242,8 +227,7 @@ lame_set_analysis(lame_global_flags * gfp, int analysis) } int -lame_get_analysis(const lame_global_flags * gfp) -{ +lame_get_analysis(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->analysis && 1 >= gfp->analysis); return gfp->analysis; @@ -254,8 +238,7 @@ lame_get_analysis(const lame_global_flags * gfp) /* write a Xing VBR header frame */ int -lame_set_bWriteVbrTag(lame_global_flags * gfp, int bWriteVbrTag) -{ +lame_set_bWriteVbrTag(lame_global_flags *gfp, int bWriteVbrTag) { if (is_lame_global_flags_valid(gfp)) { /* default = 1 (on) for VBR/ABR modes, 0 (off) for CBR mode */ @@ -271,8 +254,7 @@ lame_set_bWriteVbrTag(lame_global_flags * gfp, int bWriteVbrTag) } int -lame_get_bWriteVbrTag(const lame_global_flags * gfp) -{ +lame_get_bWriteVbrTag(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->write_lame_tag && 1 >= gfp->write_lame_tag); return gfp->write_lame_tag; @@ -281,11 +263,9 @@ lame_get_bWriteVbrTag(const lame_global_flags * gfp) } - /* decode only, use lame/mpglib to convert mp3 to wav */ int -lame_set_decode_only(lame_global_flags * gfp, int decode_only) -{ +lame_set_decode_only(lame_global_flags *gfp, int decode_only) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -301,8 +281,7 @@ lame_set_decode_only(lame_global_flags * gfp, int decode_only) } int -lame_get_decode_only(const lame_global_flags * gfp) -{ +lame_get_decode_only(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->decode_only && 1 >= gfp->decode_only); return gfp->decode_only; @@ -315,23 +294,23 @@ lame_get_decode_only(const lame_global_flags * gfp) /* 1=encode a Vorbis .ogg file. default=0 */ /* DEPRECATED */ int CDECL lame_set_ogg(lame_global_flags *, int); + int CDECL lame_get_ogg(const lame_global_flags *); + #else #endif /* encode a Vorbis .ogg file */ /* DEPRECATED */ int -lame_set_ogg(lame_global_flags * gfp, int ogg) -{ +lame_set_ogg(lame_global_flags *gfp, int ogg) { (void) gfp; (void) ogg; return -1; } int -lame_get_ogg(const lame_global_flags * gfp) -{ +lame_get_ogg(const lame_global_flags *gfp) { (void) gfp; return 0; } @@ -347,16 +326,13 @@ lame_get_ogg(const lame_global_flags * gfp) * 7 ok quality, really fast */ int -lame_set_quality(lame_global_flags * gfp, int quality) -{ +lame_set_quality(lame_global_flags *gfp, int quality) { if (is_lame_global_flags_valid(gfp)) { if (quality < 0) { gfp->quality = 0; - } - else if (quality > 9) { + } else if (quality > 9) { gfp->quality = 9; - } - else { + } else { gfp->quality = quality; } return 0; @@ -365,8 +341,7 @@ lame_set_quality(lame_global_flags * gfp, int quality) } int -lame_get_quality(const lame_global_flags * gfp) -{ +lame_get_quality(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->quality; } @@ -376,10 +351,9 @@ lame_get_quality(const lame_global_flags * gfp) /* mode = STEREO, JOINT_STEREO, DUAL_CHANNEL (not supported), MONO */ int -lame_set_mode(lame_global_flags * gfp, MPEG_mode mode) -{ +lame_set_mode(lame_global_flags *gfp, MPEG_mode mode) { if (is_lame_global_flags_valid(gfp)) { - int mpg_mode = mode; + int mpg_mode = mode; /* default: lame chooses based on compression ratio and input channels */ if (mpg_mode < 0 || MAX_INDICATOR <= mpg_mode) return -1; /* Unknown MPEG mode! */ @@ -390,8 +364,7 @@ lame_set_mode(lame_global_flags * gfp, MPEG_mode mode) } MPEG_mode -lame_get_mode(const lame_global_flags * gfp) -{ +lame_get_mode(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(gfp->mode < MAX_INDICATOR); return gfp->mode; @@ -401,21 +374,23 @@ lame_get_mode(const lame_global_flags * gfp) #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED + /* mode_automs. Use a M/S mode with a switching threshold based on compression ratio DEPRECATED */ int CDECL lame_set_mode_automs(lame_global_flags *, int); + int CDECL lame_get_mode_automs(const lame_global_flags *); + #else #endif /* Us a M/S mode with a switching threshold based on compression ratio */ /* DEPRECATED */ int -lame_set_mode_automs(lame_global_flags * gfp, int mode_automs) -{ +lame_set_mode_automs(lame_global_flags *gfp, int mode_automs) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -431,8 +406,7 @@ lame_set_mode_automs(lame_global_flags * gfp, int mode_automs) } int -lame_get_mode_automs(const lame_global_flags * gfp) -{ +lame_get_mode_automs(const lame_global_flags *gfp) { (void) gfp; return 1; } @@ -443,8 +417,7 @@ lame_get_mode_automs(const lame_global_flags * gfp) * Requires mode = 1. */ int -lame_set_force_ms(lame_global_flags * gfp, int force_ms) -{ +lame_set_force_ms(lame_global_flags *gfp, int force_ms) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -460,8 +433,7 @@ lame_set_force_ms(lame_global_flags * gfp, int force_ms) } int -lame_get_force_ms(const lame_global_flags * gfp) -{ +lame_get_force_ms(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->force_ms && 1 >= gfp->force_ms); return gfp->force_ms; @@ -472,8 +444,7 @@ lame_get_force_ms(const lame_global_flags * gfp) /* Use free_format. */ int -lame_set_free_format(lame_global_flags * gfp, int free_format) -{ +lame_set_free_format(lame_global_flags *gfp, int free_format) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -489,8 +460,7 @@ lame_set_free_format(lame_global_flags * gfp, int free_format) } int -lame_get_free_format(const lame_global_flags * gfp) -{ +lame_get_free_format(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->free_format && 1 >= gfp->free_format); return gfp->free_format; @@ -499,11 +469,9 @@ lame_get_free_format(const lame_global_flags * gfp) } - /* Perform ReplayGain analysis */ int -lame_set_findReplayGain(lame_global_flags * gfp, int findReplayGain) -{ +lame_set_findReplayGain(lame_global_flags *gfp, int findReplayGain) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -519,8 +487,7 @@ lame_set_findReplayGain(lame_global_flags * gfp, int findReplayGain) } int -lame_get_findReplayGain(const lame_global_flags * gfp) -{ +lame_get_findReplayGain(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->findReplayGain && 1 >= gfp->findReplayGain); return gfp->findReplayGain; @@ -532,8 +499,7 @@ lame_get_findReplayGain(const lame_global_flags * gfp) /* Decode on the fly. Find the peak sample. If ReplayGain analysis is enabled then perform it on the decoded data. */ int -lame_set_decode_on_the_fly(lame_global_flags * gfp, int decode_on_the_fly) -{ +lame_set_decode_on_the_fly(lame_global_flags *gfp, int decode_on_the_fly) { if (is_lame_global_flags_valid(gfp)) { #ifndef DECODE_ON_THE_FLY return -1; @@ -555,8 +521,7 @@ lame_set_decode_on_the_fly(lame_global_flags * gfp, int decode_on_the_fly) } int -lame_get_decode_on_the_fly(const lame_global_flags * gfp) -{ +lame_get_decode_on_the_fly(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->decode_on_the_fly && 1 >= gfp->decode_on_the_fly); return gfp->decode_on_the_fly; @@ -565,55 +530,55 @@ lame_get_decode_on_the_fly(const lame_global_flags * gfp) } #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED + /* DEPRECATED: now does the same as lame_set_findReplayGain() default = 0 (disabled) */ int CDECL lame_set_ReplayGain_input(lame_global_flags *, int); + int CDECL lame_get_ReplayGain_input(const lame_global_flags *); /* DEPRECATED: now does the same as lame_set_decode_on_the_fly() && lame_set_findReplayGain() default = 0 (disabled) */ int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int); + int CDECL lame_get_ReplayGain_decode(const lame_global_flags *); /* DEPRECATED: now does the same as lame_set_decode_on_the_fly() default = 0 (disabled) */ int CDECL lame_set_findPeakSample(lame_global_flags *, int); + int CDECL lame_get_findPeakSample(const lame_global_flags *); + #else #endif /* DEPRECATED. same as lame_set_decode_on_the_fly() */ int -lame_set_findPeakSample(lame_global_flags * gfp, int arg) -{ +lame_set_findPeakSample(lame_global_flags *gfp, int arg) { return lame_set_decode_on_the_fly(gfp, arg); } int -lame_get_findPeakSample(const lame_global_flags * gfp) -{ +lame_get_findPeakSample(const lame_global_flags *gfp) { return lame_get_decode_on_the_fly(gfp); } /* DEPRECATED. same as lame_set_findReplayGain() */ int -lame_set_ReplayGain_input(lame_global_flags * gfp, int arg) -{ +lame_set_ReplayGain_input(lame_global_flags *gfp, int arg) { return lame_set_findReplayGain(gfp, arg); } int -lame_get_ReplayGain_input(const lame_global_flags * gfp) -{ +lame_get_ReplayGain_input(const lame_global_flags *gfp) { return lame_get_findReplayGain(gfp); } /* DEPRECATED. same as lame_set_decode_on_the_fly() && lame_set_findReplayGain() */ int -lame_set_ReplayGain_decode(lame_global_flags * gfp, int arg) -{ +lame_set_ReplayGain_decode(lame_global_flags *gfp, int arg) { if (lame_set_decode_on_the_fly(gfp, arg) < 0 || lame_set_findReplayGain(gfp, arg) < 0) return -1; else @@ -621,8 +586,7 @@ lame_set_ReplayGain_decode(lame_global_flags * gfp, int arg) } int -lame_get_ReplayGain_decode(const lame_global_flags * gfp) -{ +lame_get_ReplayGain_decode(const lame_global_flags *gfp) { if (lame_get_decode_on_the_fly(gfp) > 0 && lame_get_findReplayGain(gfp) > 0) return 1; else @@ -633,8 +597,7 @@ lame_get_ReplayGain_decode(const lame_global_flags * gfp) /* set and get some gapless encoding flags */ int -lame_set_nogap_total(lame_global_flags * gfp, int the_nogap_total) -{ +lame_set_nogap_total(lame_global_flags *gfp, int the_nogap_total) { if (is_lame_global_flags_valid(gfp)) { gfp->nogap_total = the_nogap_total; return 0; @@ -643,8 +606,7 @@ lame_set_nogap_total(lame_global_flags * gfp, int the_nogap_total) } int -lame_get_nogap_total(const lame_global_flags * gfp) -{ +lame_get_nogap_total(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->nogap_total; } @@ -652,8 +614,7 @@ lame_get_nogap_total(const lame_global_flags * gfp) } int -lame_set_nogap_currentindex(lame_global_flags * gfp, int the_nogap_index) -{ +lame_set_nogap_currentindex(lame_global_flags *gfp, int the_nogap_index) { if (is_lame_global_flags_valid(gfp)) { gfp->nogap_current = the_nogap_index; return 0; @@ -662,8 +623,7 @@ lame_set_nogap_currentindex(lame_global_flags * gfp, int the_nogap_index) } int -lame_get_nogap_currentindex(const lame_global_flags * gfp) -{ +lame_get_nogap_currentindex(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->nogap_current; } @@ -673,8 +633,7 @@ lame_get_nogap_currentindex(const lame_global_flags * gfp) /* message handlers */ int -lame_set_errorf(lame_global_flags * gfp, void (*func) (const char *, va_list)) -{ +lame_set_errorf(lame_global_flags *gfp, void (*func)(const char *, va_list)) { if (is_lame_global_flags_valid(gfp)) { gfp->report.errorf = func; return 0; @@ -683,8 +642,7 @@ lame_set_errorf(lame_global_flags * gfp, void (*func) (const char *, va_list)) } int -lame_set_debugf(lame_global_flags * gfp, void (*func) (const char *, va_list)) -{ +lame_set_debugf(lame_global_flags *gfp, void (*func)(const char *, va_list)) { if (is_lame_global_flags_valid(gfp)) { gfp->report.debugf = func; return 0; @@ -693,8 +651,7 @@ lame_set_debugf(lame_global_flags * gfp, void (*func) (const char *, va_list)) } int -lame_set_msgf(lame_global_flags * gfp, void (*func) (const char *, va_list)) -{ +lame_set_msgf(lame_global_flags *gfp, void (*func)(const char *, va_list)) { if (is_lame_global_flags_valid(gfp)) { gfp->report.msgf = func; return 0; @@ -711,8 +668,7 @@ lame_set_msgf(lame_global_flags * gfp, void (*func) (const char *, va_list)) * Default is compression ratio of 11. */ int -lame_set_brate(lame_global_flags * gfp, int brate) -{ +lame_set_brate(lame_global_flags *gfp, int brate) { if (is_lame_global_flags_valid(gfp)) { gfp->brate = brate; if (brate > 320) { @@ -724,8 +680,7 @@ lame_set_brate(lame_global_flags * gfp, int brate) } int -lame_get_brate(const lame_global_flags * gfp) -{ +lame_get_brate(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->brate; } @@ -733,8 +688,7 @@ lame_get_brate(const lame_global_flags * gfp) } int -lame_set_compression_ratio(lame_global_flags * gfp, float compression_ratio) -{ +lame_set_compression_ratio(lame_global_flags *gfp, float compression_ratio) { if (is_lame_global_flags_valid(gfp)) { gfp->compression_ratio = compression_ratio; return 0; @@ -743,8 +697,7 @@ lame_set_compression_ratio(lame_global_flags * gfp, float compression_ratio) } float -lame_get_compression_ratio(const lame_global_flags * gfp) -{ +lame_get_compression_ratio(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->compression_ratio; } @@ -760,8 +713,7 @@ lame_get_compression_ratio(const lame_global_flags * gfp) /* Mark as copyright protected. */ int -lame_set_copyright(lame_global_flags * gfp, int copyright) -{ +lame_set_copyright(lame_global_flags *gfp, int copyright) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -777,8 +729,7 @@ lame_set_copyright(lame_global_flags * gfp, int copyright) } int -lame_get_copyright(const lame_global_flags * gfp) -{ +lame_get_copyright(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->copyright && 1 >= gfp->copyright); return gfp->copyright; @@ -789,8 +740,7 @@ lame_get_copyright(const lame_global_flags * gfp) /* Mark as original. */ int -lame_set_original(lame_global_flags * gfp, int original) -{ +lame_set_original(lame_global_flags *gfp, int original) { if (is_lame_global_flags_valid(gfp)) { /* default = 1 (enabled) */ @@ -806,8 +756,7 @@ lame_set_original(lame_global_flags * gfp, int original) } int -lame_get_original(const lame_global_flags * gfp) -{ +lame_get_original(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->original && 1 >= gfp->original); return gfp->original; @@ -821,8 +770,7 @@ lame_get_original(const lame_global_flags * gfp) * Use 2 bytes from each frame for CRC checksum. */ int -lame_set_error_protection(lame_global_flags * gfp, int error_protection) -{ +lame_set_error_protection(lame_global_flags *gfp, int error_protection) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -838,8 +786,7 @@ lame_set_error_protection(lame_global_flags * gfp, int error_protection) } int -lame_get_error_protection(const lame_global_flags * gfp) -{ +lame_get_error_protection(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->error_protection && 1 >= gfp->error_protection); return gfp->error_protection; @@ -849,9 +796,12 @@ lame_get_error_protection(const lame_global_flags * gfp) #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED + /* padding_type. 0=pad no frames 1=pad all frames 2=adjust padding(default) */ int CDECL lame_set_padding_type(lame_global_flags *, Padding_type); + Padding_type CDECL lame_get_padding_type(const lame_global_flags *); + #else #endif @@ -862,16 +812,14 @@ Padding_type CDECL lame_get_padding_type(const lame_global_flags *); * PAD_ADJUST = adjust padding */ int -lame_set_padding_type(lame_global_flags * gfp, Padding_type padding_type) -{ +lame_set_padding_type(lame_global_flags *gfp, Padding_type padding_type) { (void) gfp; (void) padding_type; return 0; } Padding_type -lame_get_padding_type(const lame_global_flags * gfp) -{ +lame_get_padding_type(const lame_global_flags *gfp) { (void) gfp; return PAD_ADJUST; } @@ -879,8 +827,7 @@ lame_get_padding_type(const lame_global_flags * gfp) /* MP3 'private extension' bit. Meaningless. */ int -lame_set_extension(lame_global_flags * gfp, int extension) -{ +lame_set_extension(lame_global_flags *gfp, int extension) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ /* enforce disable/enable meaning, if we need more than two values @@ -895,8 +842,7 @@ lame_set_extension(lame_global_flags * gfp, int extension) } int -lame_get_extension(const lame_global_flags * gfp) -{ +lame_get_extension(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->extension && 1 >= gfp->extension); return gfp->extension; @@ -907,8 +853,7 @@ lame_get_extension(const lame_global_flags * gfp) /* Enforce strict ISO compliance. */ int -lame_set_strict_ISO(lame_global_flags * gfp, int val) -{ +lame_set_strict_ISO(lame_global_flags *gfp, int val) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ /* enforce disable/enable meaning, if we need more than two values @@ -923,8 +868,7 @@ lame_set_strict_ISO(lame_global_flags * gfp, int val) } int -lame_get_strict_ISO(const lame_global_flags * gfp) -{ +lame_get_strict_ISO(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->strict_ISO; } @@ -940,8 +884,7 @@ lame_get_strict_ISO(const lame_global_flags * gfp) /* Disable the bit reservoir. For testing only. */ int -lame_set_disable_reservoir(lame_global_flags * gfp, int disable_reservoir) -{ +lame_set_disable_reservoir(lame_global_flags *gfp, int disable_reservoir) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -957,8 +900,7 @@ lame_set_disable_reservoir(lame_global_flags * gfp, int disable_reservoir) } int -lame_get_disable_reservoir(const lame_global_flags * gfp) -{ +lame_get_disable_reservoir(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->disable_reservoir && 1 >= gfp->disable_reservoir); return gfp->disable_reservoir; @@ -967,11 +909,8 @@ lame_get_disable_reservoir(const lame_global_flags * gfp) } - - int -lame_set_experimentalX(lame_global_flags * gfp, int experimentalX) -{ +lame_set_experimentalX(lame_global_flags *gfp, int experimentalX) { if (is_lame_global_flags_valid(gfp)) { lame_set_quant_comp(gfp, experimentalX); lame_set_quant_comp_short(gfp, experimentalX); @@ -981,16 +920,14 @@ lame_set_experimentalX(lame_global_flags * gfp, int experimentalX) } int -lame_get_experimentalX(const lame_global_flags * gfp) -{ +lame_get_experimentalX(const lame_global_flags *gfp) { return lame_get_quant_comp(gfp); } /* Select a different "best quantization" function. default = 0 */ int -lame_set_quant_comp(lame_global_flags * gfp, int quant_type) -{ +lame_set_quant_comp(lame_global_flags *gfp, int quant_type) { if (is_lame_global_flags_valid(gfp)) { gfp->quant_comp = quant_type; return 0; @@ -999,8 +936,7 @@ lame_set_quant_comp(lame_global_flags * gfp, int quant_type) } int -lame_get_quant_comp(const lame_global_flags * gfp) -{ +lame_get_quant_comp(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->quant_comp; } @@ -1010,8 +946,7 @@ lame_get_quant_comp(const lame_global_flags * gfp) /* Select a different "best quantization" function. default = 0 */ int -lame_set_quant_comp_short(lame_global_flags * gfp, int quant_type) -{ +lame_set_quant_comp_short(lame_global_flags *gfp, int quant_type) { if (is_lame_global_flags_valid(gfp)) { gfp->quant_comp_short = quant_type; return 0; @@ -1020,8 +955,7 @@ lame_set_quant_comp_short(lame_global_flags * gfp, int quant_type) } int -lame_get_quant_comp_short(const lame_global_flags * gfp) -{ +lame_get_quant_comp_short(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->quant_comp_short; } @@ -1031,8 +965,7 @@ lame_get_quant_comp_short(const lame_global_flags * gfp) /* Another experimental option. For testing only. */ int -lame_set_experimentalY(lame_global_flags * gfp, int experimentalY) -{ +lame_set_experimentalY(lame_global_flags *gfp, int experimentalY) { if (is_lame_global_flags_valid(gfp)) { gfp->experimentalY = experimentalY; return 0; @@ -1041,8 +974,7 @@ lame_set_experimentalY(lame_global_flags * gfp, int experimentalY) } int -lame_get_experimentalY(const lame_global_flags * gfp) -{ +lame_get_experimentalY(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->experimentalY; } @@ -1051,8 +983,7 @@ lame_get_experimentalY(const lame_global_flags * gfp) int -lame_set_experimentalZ(lame_global_flags * gfp, int experimentalZ) -{ +lame_set_experimentalZ(lame_global_flags *gfp, int experimentalZ) { if (is_lame_global_flags_valid(gfp)) { gfp->experimentalZ = experimentalZ; return 0; @@ -1061,8 +992,7 @@ lame_set_experimentalZ(lame_global_flags * gfp, int experimentalZ) } int -lame_get_experimentalZ(const lame_global_flags * gfp) -{ +lame_get_experimentalZ(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->experimentalZ; } @@ -1072,8 +1002,7 @@ lame_get_experimentalZ(const lame_global_flags * gfp) /* Naoki's psycho acoustic model. */ int -lame_set_exp_nspsytune(lame_global_flags * gfp, int exp_nspsytune) -{ +lame_set_exp_nspsytune(lame_global_flags *gfp, int exp_nspsytune) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ gfp->exp_nspsytune = exp_nspsytune; @@ -1083,8 +1012,7 @@ lame_set_exp_nspsytune(lame_global_flags * gfp, int exp_nspsytune) } int -lame_get_exp_nspsytune(const lame_global_flags * gfp) -{ +lame_get_exp_nspsytune(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->exp_nspsytune; } @@ -1100,10 +1028,9 @@ lame_get_exp_nspsytune(const lame_global_flags * gfp) /* Types of VBR. default = vbr_off = CBR */ int -lame_set_VBR(lame_global_flags * gfp, vbr_mode VBR) -{ +lame_set_VBR(lame_global_flags *gfp, vbr_mode VBR) { if (is_lame_global_flags_valid(gfp)) { - int vbr_q = VBR; + int vbr_q = VBR; if (0 > vbr_q || vbr_max_indicator <= vbr_q) return -1; /* Unknown VBR mode! */ gfp->VBR = VBR; @@ -1113,8 +1040,7 @@ lame_set_VBR(lame_global_flags * gfp, vbr_mode VBR) } vbr_mode -lame_get_VBR(const lame_global_flags * gfp) -{ +lame_get_VBR(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(gfp->VBR < vbr_max_indicator); return gfp->VBR; @@ -1129,10 +1055,9 @@ lame_get_VBR(const lame_global_flags * gfp) * 9 = lowest */ int -lame_set_VBR_q(lame_global_flags * gfp, int VBR_q) -{ +lame_set_VBR_q(lame_global_flags *gfp, int VBR_q) { if (is_lame_global_flags_valid(gfp)) { - int ret = 0; + int ret = 0; if (0 > VBR_q) { ret = -1; /* Unknown VBR quality level! */ @@ -1150,8 +1075,7 @@ lame_set_VBR_q(lame_global_flags * gfp, int VBR_q) } int -lame_get_VBR_q(const lame_global_flags * gfp) -{ +lame_get_VBR_q(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->VBR_q && 10 > gfp->VBR_q); return gfp->VBR_q; @@ -1160,10 +1084,9 @@ lame_get_VBR_q(const lame_global_flags * gfp) } int -lame_set_VBR_quality(lame_global_flags * gfp, float VBR_q) -{ +lame_set_VBR_quality(lame_global_flags *gfp, float VBR_q) { if (is_lame_global_flags_valid(gfp)) { - int ret = 0; + int ret = 0; if (0 > VBR_q) { ret = -1; /* Unknown VBR quality level! */ @@ -1183,8 +1106,7 @@ lame_set_VBR_quality(lame_global_flags * gfp, float VBR_q) } float -lame_get_VBR_quality(const lame_global_flags * gfp) -{ +lame_get_VBR_quality(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->VBR_q + gfp->VBR_q_frac; } @@ -1194,8 +1116,7 @@ lame_get_VBR_quality(const lame_global_flags * gfp) /* Ignored except for VBR = vbr_abr (ABR mode) */ int -lame_set_VBR_mean_bitrate_kbps(lame_global_flags * gfp, int VBR_mean_bitrate_kbps) -{ +lame_set_VBR_mean_bitrate_kbps(lame_global_flags *gfp, int VBR_mean_bitrate_kbps) { if (is_lame_global_flags_valid(gfp)) { gfp->VBR_mean_bitrate_kbps = VBR_mean_bitrate_kbps; return 0; @@ -1204,8 +1125,7 @@ lame_set_VBR_mean_bitrate_kbps(lame_global_flags * gfp, int VBR_mean_bitrate_kbp } int -lame_get_VBR_mean_bitrate_kbps(const lame_global_flags * gfp) -{ +lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->VBR_mean_bitrate_kbps; } @@ -1213,8 +1133,7 @@ lame_get_VBR_mean_bitrate_kbps(const lame_global_flags * gfp) } int -lame_set_VBR_min_bitrate_kbps(lame_global_flags * gfp, int VBR_min_bitrate_kbps) -{ +lame_set_VBR_min_bitrate_kbps(lame_global_flags *gfp, int VBR_min_bitrate_kbps) { if (is_lame_global_flags_valid(gfp)) { gfp->VBR_min_bitrate_kbps = VBR_min_bitrate_kbps; return 0; @@ -1223,8 +1142,7 @@ lame_set_VBR_min_bitrate_kbps(lame_global_flags * gfp, int VBR_min_bitrate_kbps) } int -lame_get_VBR_min_bitrate_kbps(const lame_global_flags * gfp) -{ +lame_get_VBR_min_bitrate_kbps(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->VBR_min_bitrate_kbps; } @@ -1232,8 +1150,7 @@ lame_get_VBR_min_bitrate_kbps(const lame_global_flags * gfp) } int -lame_set_VBR_max_bitrate_kbps(lame_global_flags * gfp, int VBR_max_bitrate_kbps) -{ +lame_set_VBR_max_bitrate_kbps(lame_global_flags *gfp, int VBR_max_bitrate_kbps) { if (is_lame_global_flags_valid(gfp)) { gfp->VBR_max_bitrate_kbps = VBR_max_bitrate_kbps; return 0; @@ -1242,8 +1159,7 @@ lame_set_VBR_max_bitrate_kbps(lame_global_flags * gfp, int VBR_max_bitrate_kbps) } int -lame_get_VBR_max_bitrate_kbps(const lame_global_flags * gfp) -{ +lame_get_VBR_max_bitrate_kbps(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->VBR_max_bitrate_kbps; } @@ -1256,8 +1172,7 @@ lame_get_VBR_max_bitrate_kbps(const lame_global_flags * gfp) * Normally it will be violated for analog silence. */ int -lame_set_VBR_hard_min(lame_global_flags * gfp, int VBR_hard_min) -{ +lame_set_VBR_hard_min(lame_global_flags *gfp, int VBR_hard_min) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 (disabled) */ @@ -1275,8 +1190,7 @@ lame_set_VBR_hard_min(lame_global_flags * gfp, int VBR_hard_min) } int -lame_get_VBR_hard_min(const lame_global_flags * gfp) -{ +lame_get_VBR_hard_min(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->VBR_hard_min && 1 >= gfp->VBR_hard_min); return gfp->VBR_hard_min; @@ -1295,8 +1209,7 @@ lame_get_VBR_hard_min(const lame_global_flags * gfp) * -1 = disabled */ int -lame_set_lowpassfreq(lame_global_flags * gfp, int lowpassfreq) -{ +lame_set_lowpassfreq(lame_global_flags *gfp, int lowpassfreq) { if (is_lame_global_flags_valid(gfp)) { gfp->lowpassfreq = lowpassfreq; return 0; @@ -1305,8 +1218,7 @@ lame_set_lowpassfreq(lame_global_flags * gfp, int lowpassfreq) } int -lame_get_lowpassfreq(const lame_global_flags * gfp) -{ +lame_get_lowpassfreq(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->lowpassfreq; } @@ -1319,8 +1231,7 @@ lame_get_lowpassfreq(const lame_global_flags * gfp) * default = one polyphase filter band */ int -lame_set_lowpasswidth(lame_global_flags * gfp, int lowpasswidth) -{ +lame_set_lowpasswidth(lame_global_flags *gfp, int lowpasswidth) { if (is_lame_global_flags_valid(gfp)) { gfp->lowpasswidth = lowpasswidth; return 0; @@ -1329,8 +1240,7 @@ lame_set_lowpasswidth(lame_global_flags * gfp, int lowpasswidth) } int -lame_get_lowpasswidth(const lame_global_flags * gfp) -{ +lame_get_lowpasswidth(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->lowpasswidth; } @@ -1344,8 +1254,7 @@ lame_get_lowpasswidth(const lame_global_flags * gfp) * -1 = disabled */ int -lame_set_highpassfreq(lame_global_flags * gfp, int highpassfreq) -{ +lame_set_highpassfreq(lame_global_flags *gfp, int highpassfreq) { if (is_lame_global_flags_valid(gfp)) { gfp->highpassfreq = highpassfreq; return 0; @@ -1354,8 +1263,7 @@ lame_set_highpassfreq(lame_global_flags * gfp, int highpassfreq) } int -lame_get_highpassfreq(const lame_global_flags * gfp) -{ +lame_get_highpassfreq(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->highpassfreq; } @@ -1368,8 +1276,7 @@ lame_get_highpassfreq(const lame_global_flags * gfp) * default = one polyphase filter band */ int -lame_set_highpasswidth(lame_global_flags * gfp, int highpasswidth) -{ +lame_set_highpasswidth(lame_global_flags *gfp, int highpasswidth) { if (is_lame_global_flags_valid(gfp)) { gfp->highpasswidth = highpasswidth; return 0; @@ -1378,8 +1285,7 @@ lame_set_highpasswidth(lame_global_flags * gfp, int highpasswidth) } int -lame_get_highpasswidth(const lame_global_flags * gfp) -{ +lame_get_highpasswidth(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->highpasswidth; } @@ -1397,8 +1303,7 @@ lame_get_highpasswidth(const lame_global_flags * gfp) /* Adjust masking values. */ int -lame_set_maskingadjust(lame_global_flags * gfp, float adjust) -{ +lame_set_maskingadjust(lame_global_flags *gfp, float adjust) { if (is_lame_global_flags_valid(gfp)) { gfp->maskingadjust = adjust; return 0; @@ -1407,8 +1312,7 @@ lame_set_maskingadjust(lame_global_flags * gfp, float adjust) } float -lame_get_maskingadjust(const lame_global_flags * gfp) -{ +lame_get_maskingadjust(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->maskingadjust; } @@ -1416,8 +1320,7 @@ lame_get_maskingadjust(const lame_global_flags * gfp) } int -lame_set_maskingadjust_short(lame_global_flags * gfp, float adjust) -{ +lame_set_maskingadjust_short(lame_global_flags *gfp, float adjust) { if (is_lame_global_flags_valid(gfp)) { gfp->maskingadjust_short = adjust; return 0; @@ -1426,8 +1329,7 @@ lame_set_maskingadjust_short(lame_global_flags * gfp, float adjust) } float -lame_get_maskingadjust_short(const lame_global_flags * gfp) -{ +lame_get_maskingadjust_short(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->maskingadjust_short; } @@ -1436,8 +1338,7 @@ lame_get_maskingadjust_short(const lame_global_flags * gfp) /* Only use ATH for masking. */ int -lame_set_ATHonly(lame_global_flags * gfp, int ATHonly) -{ +lame_set_ATHonly(lame_global_flags *gfp, int ATHonly) { if (is_lame_global_flags_valid(gfp)) { gfp->ATHonly = ATHonly; return 0; @@ -1446,8 +1347,7 @@ lame_set_ATHonly(lame_global_flags * gfp, int ATHonly) } int -lame_get_ATHonly(const lame_global_flags * gfp) -{ +lame_get_ATHonly(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->ATHonly; } @@ -1457,8 +1357,7 @@ lame_get_ATHonly(const lame_global_flags * gfp) /* Only use ATH for short blocks. */ int -lame_set_ATHshort(lame_global_flags * gfp, int ATHshort) -{ +lame_set_ATHshort(lame_global_flags *gfp, int ATHshort) { if (is_lame_global_flags_valid(gfp)) { gfp->ATHshort = ATHshort; return 0; @@ -1467,8 +1366,7 @@ lame_set_ATHshort(lame_global_flags * gfp, int ATHshort) } int -lame_get_ATHshort(const lame_global_flags * gfp) -{ +lame_get_ATHshort(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->ATHshort; } @@ -1478,8 +1376,7 @@ lame_get_ATHshort(const lame_global_flags * gfp) /* Disable ATH. */ int -lame_set_noATH(lame_global_flags * gfp, int noATH) -{ +lame_set_noATH(lame_global_flags *gfp, int noATH) { if (is_lame_global_flags_valid(gfp)) { gfp->noATH = noATH; return 0; @@ -1488,8 +1385,7 @@ lame_set_noATH(lame_global_flags * gfp, int noATH) } int -lame_get_noATH(const lame_global_flags * gfp) -{ +lame_get_noATH(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->noATH; } @@ -1499,8 +1395,7 @@ lame_get_noATH(const lame_global_flags * gfp) /* Select ATH formula. */ int -lame_set_ATHtype(lame_global_flags * gfp, int ATHtype) -{ +lame_set_ATHtype(lame_global_flags *gfp, int ATHtype) { if (is_lame_global_flags_valid(gfp)) { /* XXX: ATHtype should be converted to an enum. */ gfp->ATHtype = ATHtype; @@ -1510,8 +1405,7 @@ lame_set_ATHtype(lame_global_flags * gfp, int ATHtype) } int -lame_get_ATHtype(const lame_global_flags * gfp) -{ +lame_get_ATHtype(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->ATHtype; } @@ -1521,8 +1415,7 @@ lame_get_ATHtype(const lame_global_flags * gfp) /* Select ATH formula 4 shape. */ int -lame_set_ATHcurve(lame_global_flags * gfp, float ATHcurve) -{ +lame_set_ATHcurve(lame_global_flags *gfp, float ATHcurve) { if (is_lame_global_flags_valid(gfp)) { gfp->ATHcurve = ATHcurve; return 0; @@ -1531,8 +1424,7 @@ lame_set_ATHcurve(lame_global_flags * gfp, float ATHcurve) } float -lame_get_ATHcurve(const lame_global_flags * gfp) -{ +lame_get_ATHcurve(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->ATHcurve; } @@ -1542,8 +1434,7 @@ lame_get_ATHcurve(const lame_global_flags * gfp) /* Lower ATH by this many db. */ int -lame_set_ATHlower(lame_global_flags * gfp, float ATHlower) -{ +lame_set_ATHlower(lame_global_flags *gfp, float ATHlower) { if (is_lame_global_flags_valid(gfp)) { gfp->ATH_lower_db = ATHlower; return 0; @@ -1552,8 +1443,7 @@ lame_set_ATHlower(lame_global_flags * gfp, float ATHlower) } float -lame_get_ATHlower(const lame_global_flags * gfp) -{ +lame_get_ATHlower(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->ATH_lower_db; } @@ -1563,8 +1453,7 @@ lame_get_ATHlower(const lame_global_flags * gfp) /* Select ATH adaptive adjustment scheme. */ int -lame_set_athaa_type(lame_global_flags * gfp, int athaa_type) -{ +lame_set_athaa_type(lame_global_flags *gfp, int athaa_type) { if (is_lame_global_flags_valid(gfp)) { gfp->athaa_type = athaa_type; return 0; @@ -1573,8 +1462,7 @@ lame_set_athaa_type(lame_global_flags * gfp, int athaa_type) } int -lame_get_athaa_type(const lame_global_flags * gfp) -{ +lame_get_athaa_type(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->athaa_type; } @@ -1583,23 +1471,24 @@ lame_get_athaa_type(const lame_global_flags * gfp) #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED -int CDECL lame_set_athaa_loudapprox(lame_global_flags * gfp, int athaa_loudapprox); -int CDECL lame_get_athaa_loudapprox(const lame_global_flags * gfp); + +int CDECL lame_set_athaa_loudapprox(lame_global_flags *gfp, int athaa_loudapprox); + +int CDECL lame_get_athaa_loudapprox(const lame_global_flags *gfp); + #else #endif /* Select the loudness approximation used by the ATH adaptive auto-leveling. */ int -lame_set_athaa_loudapprox(lame_global_flags * gfp, int athaa_loudapprox) -{ +lame_set_athaa_loudapprox(lame_global_flags *gfp, int athaa_loudapprox) { (void) gfp; (void) athaa_loudapprox; return 0; } int -lame_get_athaa_loudapprox(const lame_global_flags * gfp) -{ +lame_get_athaa_loudapprox(const lame_global_flags *gfp) { (void) gfp; /* obsolete, the type known under number 2 is the only survival */ return 2; @@ -1608,8 +1497,7 @@ lame_get_athaa_loudapprox(const lame_global_flags * gfp) /* Adjust (in dB) the point below which adaptive ATH level adjustment occurs. */ int -lame_set_athaa_sensitivity(lame_global_flags * gfp, float athaa_sensitivity) -{ +lame_set_athaa_sensitivity(lame_global_flags *gfp, float athaa_sensitivity) { if (is_lame_global_flags_valid(gfp)) { gfp->athaa_sensitivity = athaa_sensitivity; return 0; @@ -1618,8 +1506,7 @@ lame_set_athaa_sensitivity(lame_global_flags * gfp, float athaa_sensitivity) } float -lame_get_athaa_sensitivity(const lame_global_flags * gfp) -{ +lame_get_athaa_sensitivity(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->athaa_sensitivity; } @@ -1628,26 +1515,24 @@ lame_get_athaa_sensitivity(const lame_global_flags * gfp) /* Predictability limit (ISO tonality formula) */ -int lame_set_cwlimit(lame_global_flags * gfp, int cwlimit); -int lame_get_cwlimit(const lame_global_flags * gfp); +int lame_set_cwlimit(lame_global_flags *gfp, int cwlimit); + +int lame_get_cwlimit(const lame_global_flags *gfp); int -lame_set_cwlimit(lame_global_flags * gfp, int cwlimit) -{ +lame_set_cwlimit(lame_global_flags *gfp, int cwlimit) { (void) gfp; (void) cwlimit; return 0; } int -lame_get_cwlimit(const lame_global_flags * gfp) -{ +lame_get_cwlimit(const lame_global_flags *gfp) { (void) gfp; return 0; } - /* * Allow blocktypes to differ between channels. * default: @@ -1655,8 +1540,7 @@ lame_get_cwlimit(const lame_global_flags * gfp) * 1 for stereo => block types may differ */ int -lame_set_allow_diff_short(lame_global_flags * gfp, int allow_diff_short) -{ +lame_set_allow_diff_short(lame_global_flags *gfp, int allow_diff_short) { if (is_lame_global_flags_valid(gfp)) { gfp->short_blocks = allow_diff_short ? short_block_allowed : short_block_coupled; return 0; @@ -1665,8 +1549,7 @@ lame_set_allow_diff_short(lame_global_flags * gfp, int allow_diff_short) } int -lame_get_allow_diff_short(const lame_global_flags * gfp) -{ +lame_get_allow_diff_short(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { if (gfp->short_blocks == short_block_allowed) return 1; /* short blocks allowed to differ */ @@ -1679,8 +1562,7 @@ lame_get_allow_diff_short(const lame_global_flags * gfp) /* Use temporal masking effect */ int -lame_set_useTemporal(lame_global_flags * gfp, int useTemporal) -{ +lame_set_useTemporal(lame_global_flags *gfp, int useTemporal) { if (is_lame_global_flags_valid(gfp)) { /* default = 1 (enabled) */ @@ -1696,8 +1578,7 @@ lame_set_useTemporal(lame_global_flags * gfp, int useTemporal) } int -lame_get_useTemporal(const lame_global_flags * gfp) -{ +lame_get_useTemporal(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->useTemporal && 1 >= gfp->useTemporal); return gfp->useTemporal; @@ -1708,8 +1589,7 @@ lame_get_useTemporal(const lame_global_flags * gfp) /* Use inter-channel masking effect */ int -lame_set_interChRatio(lame_global_flags * gfp, float ratio) -{ +lame_set_interChRatio(lame_global_flags *gfp, float ratio) { if (is_lame_global_flags_valid(gfp)) { /* default = 0.0 (no inter-channel maskin) */ if (0 <= ratio && ratio <= 1.0) { @@ -1721,8 +1601,7 @@ lame_set_interChRatio(lame_global_flags * gfp, float ratio) } float -lame_get_interChRatio(const lame_global_flags * gfp) -{ +lame_get_interChRatio(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert((0 <= gfp->interChRatio && gfp->interChRatio <= 1.0) || EQ(gfp->interChRatio, -1)); return gfp->interChRatio; @@ -1733,8 +1612,7 @@ lame_get_interChRatio(const lame_global_flags * gfp) /* Use pseudo substep shaping method */ int -lame_set_substep(lame_global_flags * gfp, int method) -{ +lame_set_substep(lame_global_flags *gfp, int method) { if (is_lame_global_flags_valid(gfp)) { /* default = 0.0 (no substep noise shaping) */ if (0 <= method && method <= 7) { @@ -1746,8 +1624,7 @@ lame_set_substep(lame_global_flags * gfp, int method) } int -lame_get_substep(const lame_global_flags * gfp) -{ +lame_get_substep(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->substep_shaping && gfp->substep_shaping <= 7); return gfp->substep_shaping; @@ -1757,8 +1634,7 @@ lame_get_substep(const lame_global_flags * gfp) /* scalefactors scale */ int -lame_set_sfscale(lame_global_flags * gfp, int val) -{ +lame_set_sfscale(lame_global_flags *gfp, int val) { if (is_lame_global_flags_valid(gfp)) { gfp->noise_shaping = (val != 0) ? 2 : 1; return 0; @@ -1767,8 +1643,7 @@ lame_set_sfscale(lame_global_flags * gfp, int val) } int -lame_get_sfscale(const lame_global_flags * gfp) -{ +lame_get_sfscale(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return (gfp->noise_shaping == 2) ? 1 : 0; } @@ -1777,8 +1652,7 @@ lame_get_sfscale(const lame_global_flags * gfp) /* subblock gain */ int -lame_set_subblock_gain(lame_global_flags * gfp, int sbgain) -{ +lame_set_subblock_gain(lame_global_flags *gfp, int sbgain) { if (is_lame_global_flags_valid(gfp)) { gfp->subblock_gain = sbgain; return 0; @@ -1787,8 +1661,7 @@ lame_set_subblock_gain(lame_global_flags * gfp, int sbgain) } int -lame_get_subblock_gain(const lame_global_flags * gfp) -{ +lame_get_subblock_gain(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->subblock_gain; } @@ -1798,8 +1671,7 @@ lame_get_subblock_gain(const lame_global_flags * gfp) /* Disable short blocks. */ int -lame_set_no_short_blocks(lame_global_flags * gfp, int no_short_blocks) -{ +lame_set_no_short_blocks(lame_global_flags *gfp, int no_short_blocks) { if (is_lame_global_flags_valid(gfp)) { /* enforce disable/enable meaning, if we need more than two values we need to switch to an enum to have an apropriate representation @@ -1813,19 +1685,18 @@ lame_set_no_short_blocks(lame_global_flags * gfp, int no_short_blocks) } int -lame_get_no_short_blocks(const lame_global_flags * gfp) -{ +lame_get_no_short_blocks(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { switch (gfp->short_blocks) { - default: - case short_block_not_set: - return -1; - case short_block_dispensed: - return 1; - case short_block_allowed: - case short_block_coupled: - case short_block_forced: - return 0; + default: + case short_block_not_set: + return -1; + case short_block_dispensed: + return 1; + case short_block_allowed: + case short_block_coupled: + case short_block_forced: + return 0; } } return -1; @@ -1834,8 +1705,7 @@ lame_get_no_short_blocks(const lame_global_flags * gfp) /* Force short blocks. */ int -lame_set_force_short_blocks(lame_global_flags * gfp, int short_blocks) -{ +lame_set_force_short_blocks(lame_global_flags *gfp, int short_blocks) { if (is_lame_global_flags_valid(gfp)) { /* enforce disable/enable meaning, if we need more than two values we need to switch to an enum to have an apropriate representation @@ -1854,27 +1724,25 @@ lame_set_force_short_blocks(lame_global_flags * gfp, int short_blocks) } int -lame_get_force_short_blocks(const lame_global_flags * gfp) -{ +lame_get_force_short_blocks(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { switch (gfp->short_blocks) { - default: - case short_block_not_set: - return -1; - case short_block_dispensed: - case short_block_allowed: - case short_block_coupled: - return 0; - case short_block_forced: - return 1; + default: + case short_block_not_set: + return -1; + case short_block_dispensed: + case short_block_allowed: + case short_block_coupled: + return 0; + case short_block_forced: + return 1; } } return -1; } int -lame_set_short_threshold_lrm(lame_global_flags * gfp, float lrm) -{ +lame_set_short_threshold_lrm(lame_global_flags *gfp, float lrm) { if (is_lame_global_flags_valid(gfp)) { gfp->attackthre = lrm; return 0; @@ -1883,8 +1751,7 @@ lame_set_short_threshold_lrm(lame_global_flags * gfp, float lrm) } float -lame_get_short_threshold_lrm(const lame_global_flags * gfp) -{ +lame_get_short_threshold_lrm(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->attackthre; } @@ -1892,8 +1759,7 @@ lame_get_short_threshold_lrm(const lame_global_flags * gfp) } int -lame_set_short_threshold_s(lame_global_flags * gfp, float s) -{ +lame_set_short_threshold_s(lame_global_flags *gfp, float s) { if (is_lame_global_flags_valid(gfp)) { gfp->attackthre_s = s; return 0; @@ -1902,8 +1768,7 @@ lame_set_short_threshold_s(lame_global_flags * gfp, float s) } float -lame_get_short_threshold_s(const lame_global_flags * gfp) -{ +lame_get_short_threshold_s(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->attackthre_s; } @@ -1911,8 +1776,7 @@ lame_get_short_threshold_s(const lame_global_flags * gfp) } int -lame_set_short_threshold(lame_global_flags * gfp, float lrm, float s) -{ +lame_set_short_threshold(lame_global_flags *gfp, float lrm, float s) { if (is_lame_global_flags_valid(gfp)) { lame_set_short_threshold_lrm(gfp, lrm); lame_set_short_threshold_s(gfp, s); @@ -1931,8 +1795,7 @@ lame_set_short_threshold(lame_global_flags * gfp, float lrm, float s) * ignore these bits */ int -lame_set_emphasis(lame_global_flags * gfp, int emphasis) -{ +lame_set_emphasis(lame_global_flags *gfp, int emphasis) { if (is_lame_global_flags_valid(gfp)) { /* XXX: emphasis should be converted to an enum */ if (0 <= emphasis && emphasis < 4) { @@ -1944,8 +1807,7 @@ lame_set_emphasis(lame_global_flags * gfp, int emphasis) } int -lame_get_emphasis(const lame_global_flags * gfp) -{ +lame_get_emphasis(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { assert(0 <= gfp->emphasis && gfp->emphasis < 4); return gfp->emphasis; @@ -1967,8 +1829,7 @@ lame_get_emphasis(const lame_global_flags * gfp) * (2 = MPEG-2.5) */ int -lame_get_version(const lame_global_flags * gfp) -{ +lame_get_version(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -1981,8 +1842,7 @@ lame_get_version(const lame_global_flags * gfp) /* Encoder delay. */ int -lame_get_encoder_delay(const lame_global_flags * gfp) -{ +lame_get_encoder_delay(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -1994,8 +1854,7 @@ lame_get_encoder_delay(const lame_global_flags * gfp) /* padding added to the end of the input */ int -lame_get_encoder_padding(const lame_global_flags * gfp) -{ +lame_get_encoder_padding(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2008,8 +1867,7 @@ lame_get_encoder_padding(const lame_global_flags * gfp) /* Size of MPEG frame. */ int -lame_get_framesize(const lame_global_flags * gfp) -{ +lame_get_framesize(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2023,8 +1881,7 @@ lame_get_framesize(const lame_global_flags * gfp) /* Number of frames encoded so far. */ int -lame_get_frameNum(const lame_global_flags * gfp) -{ +lame_get_frameNum(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2035,8 +1892,7 @@ lame_get_frameNum(const lame_global_flags * gfp) } int -lame_get_mf_samples_to_encode(const lame_global_flags * gfp) -{ +lame_get_mf_samples_to_encode(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2047,12 +1903,11 @@ lame_get_mf_samples_to_encode(const lame_global_flags * gfp) } int CDECL -lame_get_size_mp3buffer(const lame_global_flags * gfp) -{ +lame_get_size_mp3buffer(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { - int size; + int size; compute_flushbits(gfc, &size); return size; } @@ -2061,8 +1916,7 @@ lame_get_size_mp3buffer(const lame_global_flags * gfp) } int -lame_get_RadioGain(const lame_global_flags * gfp) -{ +lame_get_RadioGain(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2073,8 +1927,7 @@ lame_get_RadioGain(const lame_global_flags * gfp) } int -lame_get_AudiophileGain(const lame_global_flags * gfp) -{ +lame_get_AudiophileGain(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2085,8 +1938,7 @@ lame_get_AudiophileGain(const lame_global_flags * gfp) } float -lame_get_PeakSample(const lame_global_flags * gfp) -{ +lame_get_PeakSample(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2097,8 +1949,7 @@ lame_get_PeakSample(const lame_global_flags * gfp) } int -lame_get_noclipGainChange(const lame_global_flags * gfp) -{ +lame_get_noclipGainChange(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2109,8 +1960,7 @@ lame_get_noclipGainChange(const lame_global_flags * gfp) } float -lame_get_noclipScale(const lame_global_flags * gfp) -{ +lame_get_noclipScale(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2126,8 +1976,7 @@ lame_get_noclipScale(const lame_global_flags * gfp) * Only valid if calling program set num_samples. */ int -lame_get_totalframes(const lame_global_flags * gfp) -{ +lame_get_totalframes(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { @@ -2137,7 +1986,7 @@ lame_get_totalframes(const lame_global_flags * gfp) unsigned long end_padding = 0; int frames = 0; - if (pcm_samples_to_encode == (0ul-1ul)) + if (pcm_samples_to_encode == (0ul - 1ul)) return 0; /* unknown */ /* estimate based on user set num_samples: */ @@ -2152,13 +2001,12 @@ lame_get_totalframes(const lame_global_flags * gfp) if (resampled_samples_to_encode <= 0.0) return 0; /* unlikely to happen, so what, no estimate! */ frames_f = floor(resampled_samples_to_encode / pcm_samples_per_frame); - if (frames_f >= (INT_MAX-2)) + if (frames_f >= (INT_MAX - 2)) return 0; /* overflow, happens eventually, no estimate! */ frames = frames_f; resampled_samples_to_encode -= frames * pcm_samples_per_frame; pcm_samples_to_encode = ceil(resampled_samples_to_encode); - } - else { + } else { frames = pcm_samples_to_encode / pcm_samples_per_frame; pcm_samples_to_encode -= frames * pcm_samples_per_frame; } @@ -2179,12 +2027,8 @@ lame_get_totalframes(const lame_global_flags * gfp) } - - - int -lame_set_preset(lame_global_flags * gfp, int preset) -{ +lame_set_preset(lame_global_flags *gfp, int preset) { if (is_lame_global_flags_valid(gfp)) { gfp->preset = preset; return apply_preset(gfp, preset, 1); @@ -2193,27 +2037,25 @@ lame_set_preset(lame_global_flags * gfp, int preset) } - int -lame_set_asm_optimizations(lame_global_flags * gfp, int optim, int mode) -{ +lame_set_asm_optimizations(lame_global_flags *gfp, int optim, int mode) { if (is_lame_global_flags_valid(gfp)) { mode = (mode == 1 ? 1 : 0); switch (optim) { - case MMX:{ + case MMX: { gfp->asm_optimizations.mmx = mode; return optim; } - case AMD_3DNOW:{ + case AMD_3DNOW: { gfp->asm_optimizations.amd3dnow = mode; return optim; } - case SSE:{ + case SSE: { gfp->asm_optimizations.sse = mode; return optim; } - default: - return optim; + default: + return optim; } } return -1; @@ -2221,8 +2063,7 @@ lame_set_asm_optimizations(lame_global_flags * gfp, int optim, int mode) void -lame_set_write_id3tag_automatic(lame_global_flags * gfp, int v) -{ +lame_set_write_id3tag_automatic(lame_global_flags *gfp, int v) { if (is_lame_global_flags_valid(gfp)) { gfp->write_id3tag_automatic = v; } @@ -2230,8 +2071,7 @@ lame_set_write_id3tag_automatic(lame_global_flags * gfp, int v) int -lame_get_write_id3tag_automatic(lame_global_flags const *gfp) -{ +lame_get_write_id3tag_automatic(lame_global_flags const *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->write_id3tag_automatic; } @@ -2254,8 +2094,7 @@ change. void CDECL lame_set_tune(lame_global_flags *, float); void -lame_set_tune(lame_global_flags * gfp, float val) -{ +lame_set_tune(lame_global_flags *gfp, float val) { if (is_lame_global_flags_valid(gfp)) { gfp->tune_value_a = val; gfp->tune = 1; @@ -2264,8 +2103,7 @@ lame_set_tune(lame_global_flags * gfp, float val) /* Custom msfix hack */ void -lame_set_msfix(lame_global_flags * gfp, double msfix) -{ +lame_set_msfix(lame_global_flags *gfp, double msfix) { if (is_lame_global_flags_valid(gfp)) { /* default = 0 */ gfp->msfix = msfix; @@ -2273,8 +2111,7 @@ lame_set_msfix(lame_global_flags * gfp, double msfix) } float -lame_get_msfix(const lame_global_flags * gfp) -{ +lame_get_msfix(const lame_global_flags *gfp) { if (is_lame_global_flags_valid(gfp)) { return gfp->msfix; } @@ -2282,13 +2119,14 @@ lame_get_msfix(const lame_global_flags * gfp) } #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED + int CDECL lame_set_preset_expopts(lame_global_flags *, int); + #else #endif int -lame_set_preset_expopts(lame_global_flags * gfp, int preset_expopts) -{ +lame_set_preset_expopts(lame_global_flags *gfp, int preset_expopts) { (void) gfp; (void) preset_expopts; return 0; @@ -2296,20 +2134,18 @@ lame_set_preset_expopts(lame_global_flags * gfp, int preset_expopts) int -lame_set_preset_notune(lame_global_flags * gfp, int preset_notune) -{ +lame_set_preset_notune(lame_global_flags *gfp, int preset_notune) { (void) gfp; (void) preset_notune; return 0; } static int -calc_maximum_input_samples_for_buffer_size(lame_internal_flags const* gfc, size_t buffer_size) -{ +calc_maximum_input_samples_for_buffer_size(lame_internal_flags const *gfc, size_t buffer_size) { SessionConfig_t const *const cfg = &gfc->cfg; int const pcm_samples_per_frame = 576 * cfg->mode_gr; - int frames_per_buffer = 0, input_samples_per_buffer = 0; - int kbps = 320; + int frames_per_buffer = 0, input_samples_per_buffer = 0; + int kbps = 320; if (cfg->samplerate_out < 16000) kbps = 64; @@ -2335,8 +2171,7 @@ calc_maximum_input_samples_for_buffer_size(lame_internal_flags const* gfc, size_ } int -lame_get_maximum_number_of_samples(lame_t gfp, size_t buffer_size) -{ +lame_get_maximum_number_of_samples(lame_t gfp, size_t buffer_size) { if (is_lame_global_flags_valid(gfp)) { lame_internal_flags const *const gfc = gfp->internal_flags; if (is_lame_internal_flags_valid(gfc)) { diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.h new file mode 100644 index 0000000..a6becce --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/set_get.h @@ -0,0 +1,85 @@ +/* + * set_get.h -- Internal set/get definitions + * + * Copyright (C) 2003 Gabriel Bouvigne / Lame project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __SET_GET_H__ +#define __SET_GET_H__ + +#include "lame.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/* select psychoacoustic model */ + +/* manage short blocks */ +int CDECL lame_set_short_threshold(lame_global_flags *, float, float); + +int CDECL lame_set_short_threshold_lrm(lame_global_flags *, float); + +float CDECL lame_get_short_threshold_lrm(const lame_global_flags *); + +int CDECL lame_set_short_threshold_s(lame_global_flags *, float); + +float CDECL lame_get_short_threshold_s(const lame_global_flags *); + + +int CDECL lame_set_maskingadjust(lame_global_flags *, float); + +float CDECL lame_get_maskingadjust(const lame_global_flags *); + +int CDECL lame_set_maskingadjust_short(lame_global_flags *, float); + +float CDECL lame_get_maskingadjust_short(const lame_global_flags *); + +/* select ATH formula 4 shape */ +int CDECL lame_set_ATHcurve(lame_global_flags *, float); + +float CDECL lame_get_ATHcurve(const lame_global_flags *); + +int CDECL lame_set_preset_notune(lame_global_flags *, int); + +/* substep shaping method */ +int CDECL lame_set_substep(lame_global_flags *, int); + +int CDECL lame_get_substep(const lame_global_flags *); + +/* scalefactors scale */ +int CDECL lame_set_sfscale(lame_global_flags *, int); + +int CDECL lame_get_sfscale(const lame_global_flags *); + +/* subblock gain */ +int CDECL lame_set_subblock_gain(lame_global_flags *, int); + +int CDECL lame_get_subblock_gain(const lame_global_flags *); + + +/*presets*/ +int apply_preset(lame_global_flags *, int preset, int enforce); + +void CDECL lame_set_tune(lame_t, float); /* FOR INTERNAL USE ONLY */ +void CDECL lame_set_msfix(lame_t gfp, double msfix); + + +#if defined(__cplusplus) +} +#endif +#endif diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.c new file mode 100644 index 0000000..d45f98c --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.c @@ -0,0 +1,558 @@ +/* + * MPEG layer 3 tables source file + * + * Copyright (c) 1999 Albert L Faber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* $Id: tables.c,v 1.29 2011/05/07 16:05:17 rbrito Exp $ */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "machine.h" + +#include "lame.h" +#include "tables.h" + + +static const uint16_t t1HB[] = { + 1, 1, + 1, 0 +}; + +static const uint16_t t2HB[] = { + 1, 2, 1, + 3, 1, 1, + 3, 2, 0 +}; + +static const uint16_t t3HB[] = { + 3, 2, 1, + 1, 1, 1, + 3, 2, 0 +}; + +static const uint16_t t5HB[] = { + 1, 2, 6, 5, + 3, 1, 4, 4, + 7, 5, 7, 1, + 6, 1, 1, 0 +}; + +static const uint16_t t6HB[] = { + 7, 3, 5, 1, + 6, 2, 3, 2, + 5, 4, 4, 1, + 3, 3, 2, 0 +}; + +static const uint16_t t7HB[] = { + 1, 2, 10, 19, 16, 10, + 3, 3, 7, 10, 5, 3, + 11, 4, 13, 17, 8, 4, + 12, 11, 18, 15, 11, 2, + 7, 6, 9, 14, 3, 1, + 6, 4, 5, 3, 2, 0 +}; + +static const uint16_t t8HB[] = { + 3, 4, 6, 18, 12, 5, + 5, 1, 2, 16, 9, 3, + 7, 3, 5, 14, 7, 3, + 19, 17, 15, 13, 10, 4, + 13, 5, 8, 11, 5, 1, + 12, 4, 4, 1, 1, 0 +}; + +static const uint16_t t9HB[] = { + 7, 5, 9, 14, 15, 7, + 6, 4, 5, 5, 6, 7, + 7, 6, 8, 8, 8, 5, + 15, 6, 9, 10, 5, 1, + 11, 7, 9, 6, 4, 1, + 14, 4, 6, 2, 6, 0 +}; + +static const uint16_t t10HB[] = { + 1, 2, 10, 23, 35, 30, 12, 17, + 3, 3, 8, 12, 18, 21, 12, 7, + 11, 9, 15, 21, 32, 40, 19, 6, + 14, 13, 22, 34, 46, 23, 18, 7, + 20, 19, 33, 47, 27, 22, 9, 3, + 31, 22, 41, 26, 21, 20, 5, 3, + 14, 13, 10, 11, 16, 6, 5, 1, + 9, 8, 7, 8, 4, 4, 2, 0 +}; + +static const uint16_t t11HB[] = { + 3, 4, 10, 24, 34, 33, 21, 15, + 5, 3, 4, 10, 32, 17, 11, 10, + 11, 7, 13, 18, 30, 31, 20, 5, + 25, 11, 19, 59, 27, 18, 12, 5, + 35, 33, 31, 58, 30, 16, 7, 5, + 28, 26, 32, 19, 17, 15, 8, 14, + 14, 12, 9, 13, 14, 9, 4, 1, + 11, 4, 6, 6, 6, 3, 2, 0 +}; + +static const uint16_t t12HB[] = { + 9, 6, 16, 33, 41, 39, 38, 26, + 7, 5, 6, 9, 23, 16, 26, 11, + 17, 7, 11, 14, 21, 30, 10, 7, + 17, 10, 15, 12, 18, 28, 14, 5, + 32, 13, 22, 19, 18, 16, 9, 5, + 40, 17, 31, 29, 17, 13, 4, 2, + 27, 12, 11, 15, 10, 7, 4, 1, + 27, 12, 8, 12, 6, 3, 1, 0 +}; + +static const uint16_t t13HB[] = { + 1, 5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19, + 3, 4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14, + 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16, + 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14, + 35, 16, 60, 57, 97, 75, 114, 91, 54, 73, 55, 41, 48, 53, 23, 24, + 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17, + 47, 45, 78, 74, 115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15, + 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42, + 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16, + 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11, + 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22, + 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14, 9, 7, + 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17, 9, 5, + 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10, 7, 6, 3, + 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10, 6, 1, 4, 2, + 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16, 8, 1, 1, 0, 1 +}; + +static const uint16_t t15HB[] = { + 7, 12, 18, 53, 47, 76, 124, 108, 89, 123, 108, 119, 107, 81, 122, 63, + 13, 5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36, + 19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33, + 29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29, + 52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27, + 77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38, + 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30, + 109, 53, 49, 94, 88, 75, 66, 122, 91, 73, 56, 42, 64, 44, 21, 25, + 90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20, + 71, 34, 67, 60, 58, 49, 88, 76, 67, 106, 71, 54, 38, 39, 23, 15, + 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62, 9, + 86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11, + 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14, 7, + 91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14, 8, 9, 3, + 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10, 2, 1, + 71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10, 6, 8, 6, 2, 0 +}; + +static const uint16_t t16HB[] = { + 1, 5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17, + 3, 4, 12, 20, 35, 62, 53, 47, 83, 75, 68, 119, 201, 107, 207, 9, + 15, 13, 23, 38, 67, 58, 103, 90, 161, 72, 127, 117, 110, 209, 206, 16, + 45, 21, 39, 69, 64, 114, 99, 87, 158, 140, 252, 212, 199, 387, 365, 26, + 75, 36, 68, 65, 115, 101, 179, 164, 155, 264, 246, 226, 395, 382, 362, 9, + 66, 30, 59, 56, 102, 185, 173, 265, 142, 253, 232, 400, 388, 378, 445, 16, + 111, 54, 52, 100, 184, 178, 160, 133, 257, 244, 228, 217, 385, 366, 715, 10, + 98, 48, 91, 88, 165, 157, 148, 261, 248, 407, 397, 372, 380, 889, 884, 8, + 85, 84, 81, 159, 156, 143, 260, 249, 427, 401, 392, 383, 727, 713, 708, 7, + 154, 76, 73, 141, 131, 256, 245, 426, 406, 394, 384, 735, 359, 710, 352, 11, + 139, 129, 67, 125, 247, 233, 229, 219, 393, 743, 737, 720, 885, 882, 439, 4, + 243, 120, 118, 115, 227, 223, 396, 746, 742, 736, 721, 712, 706, 223, 436, 6, + 202, 224, 222, 218, 216, 389, 386, 381, 364, 888, 443, 707, 440, 437, 1728, 4, + 747, 211, 210, 208, 370, 379, 734, 723, 714, 1735, 883, 877, 876, 3459, 865, 2, + 377, 369, 102, 187, 726, 722, 358, 711, 709, 866, 1734, 871, 3458, 870, 434, 0, + 12, 10, 7, 11, 10, 17, 11, 9, 13, 12, 10, 7, 5, 3, 1, 3 +}; + +static const uint16_t t24HB[] = { + 15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88, + 14, 12, 21, 38, 71, 130, 122, 216, 209, 198, 327, 345, 319, 297, 279, 42, + 47, 22, 41, 74, 68, 128, 120, 221, 207, 194, 182, 340, 315, 295, 541, 18, + 81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293, 271, 16, + 147, 72, 69, 135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285, 540, 14, + 263, 66, 129, 126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281, 262, 12, + 249, 123, 121, 117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272, 520, 10, + 435, 115, 111, 109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531, 381, 17, + 427, 212, 208, 205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514, 377, 16, + 335, 199, 197, 191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379, 371, 11, + 668, 184, 183, 179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373, 366, 10, + 652, 346, 171, 168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368, 362, 6, + 648, 322, 316, 312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364, 359, 4, + 620, 300, 296, 294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361, 357, 2, + 1033, 280, 278, 274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358, 356, 0, + 43, 20, 19, 17, 15, 13, 11, 9, 7, 6, 4, 7, 5, 3, 1, 3 +}; + +static const uint16_t t32HB[] = { + 1 << 0, 5 << 1, 4 << 1, 5 << 2, 6 << 1, 5 << 2, 4 << 2, 4 << 3, + 7 << 1, 3 << 2, 6 << 2, 0 << 3, 7 << 2, 2 << 3, 3 << 3, 1 << 4 +}; + +static const uint16_t t33HB[] = { + 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2, 9 << 2, 8 << 3, + 7 << 1, 6 << 2, 5 << 2, 4 << 3, 3 << 2, 2 << 3, 1 << 3, 0 << 4 +}; + + +const uint8_t t1l[] = { + 1, 4, + 3, 5 +}; + +static const uint8_t t2l[] = { + 1, 4, 7, + 4, 5, 7, + 6, 7, 8 +}; + +static const uint8_t t3l[] = { + 2, 3, 7, + 4, 4, 7, + 6, 7, 8 +}; + +static const uint8_t t5l[] = { + 1, 4, 7, 8, + 4, 5, 8, 9, + 7, 8, 9, 10, + 8, 8, 9, 10 +}; + +static const uint8_t t6l[] = { + 3, 4, 6, 8, + 4, 4, 6, 7, + 5, 6, 7, 8, + 7, 7, 8, 9 +}; + +static const uint8_t t7l[] = { + 1, 4, 7, 9, 9, 10, + 4, 6, 8, 9, 9, 10, + 7, 7, 9, 10, 10, 11, + 8, 9, 10, 11, 11, 11, + 8, 9, 10, 11, 11, 12, + 9, 10, 11, 12, 12, 12 +}; + +static const uint8_t t8l[] = { + 2, 4, 7, 9, 9, 10, + 4, 4, 6, 10, 10, 10, + 7, 6, 8, 10, 10, 11, + 9, 10, 10, 11, 11, 12, + 9, 9, 10, 11, 12, 12, + 10, 10, 11, 11, 13, 13 +}; + +static const uint8_t t9l[] = { + 3, 4, 6, 7, 9, 10, + 4, 5, 6, 7, 8, 10, + 5, 6, 7, 8, 9, 10, + 7, 7, 8, 9, 9, 10, + 8, 8, 9, 9, 10, 11, + 9, 9, 10, 10, 11, 11 +}; + +static const uint8_t t10l[] = { + 1, 4, 7, 9, 10, 10, 10, 11, + 4, 6, 8, 9, 10, 11, 10, 10, + 7, 8, 9, 10, 11, 12, 11, 11, + 8, 9, 10, 11, 12, 12, 11, 12, + 9, 10, 11, 12, 12, 12, 12, 12, + 10, 11, 12, 12, 13, 13, 12, 13, + 9, 10, 11, 12, 12, 12, 13, 13, + 10, 10, 11, 12, 12, 13, 13, 13 +}; + +static const uint8_t t11l[] = { + 2, 4, 6, 8, 9, 10, 9, 10, + 4, 5, 6, 8, 10, 10, 9, 10, + 6, 7, 8, 9, 10, 11, 10, 10, + 8, 8, 9, 11, 10, 12, 10, 11, + 9, 10, 10, 11, 11, 12, 11, 12, + 9, 10, 11, 12, 12, 13, 12, 13, + 9, 9, 9, 10, 11, 12, 12, 12, + 9, 9, 10, 11, 12, 12, 12, 12 +}; + +static const uint8_t t12l[] = { + 4, 4, 6, 8, 9, 10, 10, 10, + 4, 5, 6, 7, 9, 9, 10, 10, + 6, 6, 7, 8, 9, 10, 9, 10, + 7, 7, 8, 8, 9, 10, 10, 10, + 8, 8, 9, 9, 10, 10, 10, 11, + 9, 9, 10, 10, 10, 11, 10, 11, + 9, 9, 9, 10, 10, 11, 11, 12, + 10, 10, 10, 11, 11, 11, 11, 12 +}; + +static const uint8_t t13l[] = { + 1, 5, 7, 8, 9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14, + 4, 6, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14, + 7, 8, 9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15, + 8, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15, + 9, 9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16, + 10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16, + 10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, + 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18, + 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17, + 11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17, + 11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19, + 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18, + 12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18, + 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18, + 14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18, + 13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18 +}; + +static const uint8_t t15l[] = { + 3, 5, 6, 8, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14, + 5, 5, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, + 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, + 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, + 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, + 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14, + 10, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, + 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14, + 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, + 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, + 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14, + 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, + 12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, + 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, + 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15, + 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15 +}; + +static const uint8_t t16_5l[] = { + 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11, + 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11, + 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12, + 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13, + 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12, + 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13, + 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13, + 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13, + 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13, + 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14, + 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13, + 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14, + 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14, + 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14, + 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14, + 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12 +}; + +static const uint8_t t16l[] = { + 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10, + 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10, + 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11, + 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12, + 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11, + 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12, + 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12, + 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12, + 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12, + 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13, + 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12, + 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13, + 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13, + 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13, + 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13, + 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10 +}; + +static const uint8_t t24l[] = { + 4, 5, 7, 8, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10, + 5, 6, 7, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10, + 7, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 9, + 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 9, + 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 9, + 10, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 9, + 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 9, + 11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10, + 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10, + 12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10, + 12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10, + 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10, + 13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 6 +}; + +const uint8_t t32l[] = { + 1 + 0, 4 + 1, 4 + 1, 5 + 2, 4 + 1, 6 + 2, 5 + 2, 6 + 3, + 4 + 1, 5 + 2, 5 + 2, 6 + 3, 5 + 2, 6 + 3, 6 + 3, 6 + 4 +}; + +const uint8_t t33l[] = { + 4 + 0, 4 + 1, 4 + 1, 4 + 2, 4 + 1, 4 + 2, 4 + 2, 4 + 3, + 4 + 1, 4 + 2, 4 + 2, 4 + 3, 4 + 2, 4 + 3, 4 + 3, 4 + 4 +}; + + +const struct huffcodetab ht[HTN] = { + /* xlen, linmax, table, hlen */ + {0, 0, NULL, NULL}, + {2, 0, t1HB, t1l}, + {3, 0, t2HB, t2l}, + {3, 0, t3HB, t3l}, + {0, 0, NULL, NULL}, /* Apparently not used */ + {4, 0, t5HB, t5l}, + {4, 0, t6HB, t6l}, + {6, 0, t7HB, t7l}, + {6, 0, t8HB, t8l}, + {6, 0, t9HB, t9l}, + {8, 0, t10HB, t10l}, + {8, 0, t11HB, t11l}, + {8, 0, t12HB, t12l}, + {16, 0, t13HB, t13l}, + {0, 0, NULL, t16_5l}, /* Apparently not used */ + {16, 0, t15HB, t15l}, + + {1, 1, t16HB, t16l}, + {2, 3, t16HB, t16l}, + {3, 7, t16HB, t16l}, + {4, 15, t16HB, t16l}, + {6, 63, t16HB, t16l}, + {8, 255, t16HB, t16l}, + {10, 1023, t16HB, t16l}, + {13, 8191, t16HB, t16l}, + + {4, 15, t24HB, t24l}, + {5, 31, t24HB, t24l}, + {6, 63, t24HB, t24l}, + {7, 127, t24HB, t24l}, + {8, 255, t24HB, t24l}, + {9, 511, t24HB, t24l}, + {11, 2047, t24HB, t24l}, + {13, 8191, t24HB, t24l}, + + {0, 0, t32HB, t32l}, + {0, 0, t33HB, t33l}, +}; + + +/* for (i = 0; i < 16*16; i++) { + * largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i]; + * } + */ +const uint32_t largetbl[16 * 16] = { + 0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b, + 0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a, + 0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b, + 0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a, + 0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b, + 0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009, + 0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b, + 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009, + 0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b, + 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009, + 0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b, + 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009, + 0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b, + 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009, + 0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, + 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a, + 0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, + 0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a, + 0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c, + 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a, + 0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, + 0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a, + 0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c, + 0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a, + 0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, + 0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a, + 0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c, + 0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a, + 0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d, + 0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a, + 0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009, + 0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006 +}; + +/* for (i = 0; i < 3*3; i++) { + * table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i]; + * } + */ +const uint32_t table23[3 * 3] = { + 0x010002, 0x040003, 0x070007, + 0x040004, 0x050004, 0x070007, + 0x060006, 0x070007, 0x080008 +}; + +/* for (i = 0; i < 4*4; i++) { + * table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i]; + * } + */ +const uint32_t table56[4 * 4] = { + 0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007, + 0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009 +}; + + +/* + * 0: MPEG-2 LSF + * 1: MPEG-1 + * 2: MPEG-2.5 LSF FhG extention (1995-07-11 shn) + */ + +typedef enum { + MPEG_2 = 0, + MPEG_1 = 1, + MPEG_25 = 2 +} MPEG_t; + +const int bitrate_table[3][16] = { + {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1}, /* MPEG 2 */ + {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1}, /* MPEG 1 */ + {0, 8, 16, 24, 32, 40, 48, 56, 64, -1, -1, -1, -1, -1, -1, -1}, /* MPEG 2.5 */ +}; + +const int samplerate_table[3][4] = { + {22050, 24000, 16000, -1}, /* MPEG 2 */ + {44100, 48000, 32000, -1}, /* MPEG 1 */ + {11025, 12000, 8000, -1}, /* MPEG 2.5 */ +}; + +int +lame_get_bitrate(int mpeg_version, int table_index) { + if (0 <= mpeg_version && mpeg_version <= 2) { + if (0 <= table_index && table_index <= 15) { + return bitrate_table[mpeg_version][table_index]; + } + } + return -1; +} + +int +lame_get_samplerate(int mpeg_version, int table_index) { + if (0 <= mpeg_version && mpeg_version <= 2) { + if (0 <= table_index && table_index <= 3) { + return samplerate_table[mpeg_version][table_index]; + } + } + return -1; +} + + +/* This is the scfsi_band table from 2.4.2.7 of the IS */ +const int scfsi_band[5] = {0, 6, 11, 16, 21}; + +/* end of tables.c */ diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.h new file mode 100644 index 0000000..274aa30 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/tables.h @@ -0,0 +1,95 @@ +/* + * MPEG layer 3 tables include file + * + * Copyright (c) 1999 Albert L Faber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_TABLES_H +#define LAME_TABLES_H + +#if 0 +typedef struct { + unsigned char no; + unsigned char width; + unsigned char minval_2; + float quiet_thr; + float norm; + float bark; +} type1_t; + +typedef struct { + unsigned char no; + unsigned char width; + float quiet_thr; + float norm; + float SNR; + float bark; +} type2_t; + +typedef struct { + unsigned int no:5; + unsigned int cbw:3; + unsigned int bu:6; + unsigned int bo:6; + unsigned int w1_576:10; + unsigned int w2_576:10; +} type34_t; + +typedef struct { + size_t len1; + const type1_t *const tab1; + size_t len2; + const type2_t *const tab2; + size_t len3; + const type34_t *const tab3; + size_t len4; + const type34_t *const tab4; +} type5_t; + +extern const type5_t table5[6]; + +#endif + +#define HTN 34 + +struct huffcodetab { + const unsigned int xlen; /* max. x-index+ */ + const unsigned int linmax; /* max number to be stored in linbits */ + const uint16_t *table; /* pointer to array[xlen][ylen] */ + const uint8_t *hlen; /* pointer to array[xlen][ylen] */ +}; + +extern const struct huffcodetab ht[HTN]; +/* global memory block */ +/* array of all huffcodtable headers */ +/* 0..31 Huffman code table 0..31 */ +/* 32,33 count1-tables */ + +extern const uint8_t t32l[]; +extern const uint8_t t33l[]; + +extern const uint32_t largetbl[16 * 16]; +extern const uint32_t table23[3 * 3]; +extern const uint32_t table56[4 * 4]; + +extern const int scfsi_band[5]; + +extern const int bitrate_table[3][16]; +extern const int samplerate_table[3][4]; + +#endif /* LAME_TABLES_H */ diff --git a/library/src/main/cpp/lamemp3/takehiro.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/takehiro.c similarity index 81% rename from library/src/main/cpp/lamemp3/takehiro.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/takehiro.c index ff9d0b5..bfb24b5 100644 --- a/library/src/main/cpp/lamemp3/takehiro.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/takehiro.c @@ -41,58 +41,55 @@ static const struct { const int region0_count; const int region1_count; } subdv_table[23] = { - { - 0, 0}, /* 0 bands */ - { - 0, 0}, /* 1 bands */ - { - 0, 0}, /* 2 bands */ - { - 0, 0}, /* 3 bands */ - { - 0, 0}, /* 4 bands */ - { - 0, 1}, /* 5 bands */ - { - 1, 1}, /* 6 bands */ - { - 1, 1}, /* 7 bands */ - { - 1, 2}, /* 8 bands */ - { - 2, 2}, /* 9 bands */ - { - 2, 3}, /* 10 bands */ - { - 2, 3}, /* 11 bands */ - { - 3, 4}, /* 12 bands */ - { - 3, 4}, /* 13 bands */ - { - 3, 4}, /* 14 bands */ - { - 4, 5}, /* 15 bands */ - { - 4, 5}, /* 16 bands */ - { - 4, 6}, /* 17 bands */ - { - 5, 6}, /* 18 bands */ - { - 5, 6}, /* 19 bands */ - { - 5, 7}, /* 20 bands */ - { - 6, 7}, /* 21 bands */ - { - 6, 7}, /* 22 bands */ + { + 0, 0}, /* 0 bands */ + { + 0, 0}, /* 1 bands */ + { + 0, 0}, /* 2 bands */ + { + 0, 0}, /* 3 bands */ + { + 0, 0}, /* 4 bands */ + { + 0, 1}, /* 5 bands */ + { + 1, 1}, /* 6 bands */ + { + 1, 1}, /* 7 bands */ + { + 1, 2}, /* 8 bands */ + { + 2, 2}, /* 9 bands */ + { + 2, 3}, /* 10 bands */ + { + 2, 3}, /* 11 bands */ + { + 3, 4}, /* 12 bands */ + { + 3, 4}, /* 13 bands */ + { + 3, 4}, /* 14 bands */ + { + 4, 5}, /* 15 bands */ + { + 4, 5}, /* 16 bands */ + { + 4, 6}, /* 17 bands */ + { + 5, 6}, /* 18 bands */ + { + 5, 6}, /* 19 bands */ + { + 5, 7}, /* 20 bands */ + { + 6, 7}, /* 21 bands */ + { + 6, 7}, /* 22 bands */ }; - - - /********************************************************************* * nonlinear quantization of xr * More accurate formula than the ISO formula. Takes into account @@ -113,25 +110,23 @@ static const struct { static void -quantize_lines_xrpow_01(unsigned int l, FLOAT istep, const FLOAT * xr, int *ix) -{ +quantize_lines_xrpow_01(unsigned int l, FLOAT istep, const FLOAT *xr, int *ix) { const FLOAT compareval0 = (1.0f - 0.4054f) / istep; unsigned int i; assert(l > 0); assert(l % 2 == 0); for (i = 0; i < l; i += 2) { - FLOAT const xr_0 = xr[i+0]; - FLOAT const xr_1 = xr[i+1]; + FLOAT const xr_0 = xr[i + 0]; + FLOAT const xr_1 = xr[i + 1]; int const ix_0 = (compareval0 > xr_0) ? 0 : 1; int const ix_1 = (compareval0 > xr_1) ? 0 : 1; - ix[i+0] = ix_0; - ix[i+1] = ix_1; + ix[i + 0] = ix_0; + ix[i + 1] = ix_1; } } - #ifdef TAKEHIRO_IEEE754_HACK typedef union { @@ -216,14 +211,13 @@ quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT * xp, int *pi) * the TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile * to write some ASM for XRPOW_FTOI(). *********************************************************************/ -#define XRPOW_FTOI(src,dest) ((dest) = (int)(src)) +#define XRPOW_FTOI(src, dest) ((dest) = (int)(src)) #define QUANTFAC(rx) adj43[rx] #define ROUNDFAC 0.4054 static void -quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT * xr, int *ix) -{ +quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT *xr, int *ix) { unsigned int remaining; assert(l > 0); @@ -232,8 +226,8 @@ quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT * xr, int *ix) remaining = l % 2; l = l >> 1; while (l--) { - FLOAT x0, x1, x2, x3; - int rx0, rx1, rx2, rx3; + FLOAT x0, x1, x2, x3; + int rx0, rx1, rx2, rx3; x0 = *xr++ * istep; x1 = *xr++ * istep; @@ -253,8 +247,8 @@ quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT * xr, int *ix) XRPOW_FTOI(x3, *ix++); }; if (remaining) { - FLOAT x0, x1; - int rx0, rx1; + FLOAT x0, x1; + int rx0, rx1; x0 = *xr++ * istep; x1 = *xr++ * istep; @@ -269,11 +263,9 @@ quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT * xr, int *ix) } - #endif - /********************************************************************* * Quantization function * This function will select which lines to quantize and call the @@ -281,18 +273,17 @@ quantize_lines_xrpow(unsigned int l, FLOAT istep, const FLOAT * xr, int *ix) *********************************************************************/ static void -quantize_xrpow(const FLOAT * xp, int *pi, FLOAT istep, gr_info const *const cod_info, - calc_noise_data const *prev_noise) -{ +quantize_xrpow(const FLOAT *xp, int *pi, FLOAT istep, gr_info const *const cod_info, + calc_noise_data const *prev_noise) { /* quantize on xr^(3/4) instead of xr */ - int sfb; - int sfbmax; - int j = 0; - int prev_data_use; - int *iData; - int accumulate = 0; - int accumulate01 = 0; - int *acc_iData; + int sfb; + int sfbmax; + int j = 0; + int prev_data_use; + int *iData; + int accumulate = 0; + int accumulate01 = 0; + int *acc_iData; const FLOAT *acc_xp; iData = pi; @@ -312,14 +303,14 @@ quantize_xrpow(const FLOAT * xp, int *pi, FLOAT istep, gr_info const *const cod_ sfbmax = 21; for (sfb = 0; sfb <= sfbmax; sfb++) { - int step = -1; + int step = -1; if (prev_data_use || cod_info->block_type == NORM_TYPE) { step = - cod_info->global_gain - - ((cod_info->scalefac[sfb] + (cod_info->preflag ? pretab[sfb] : 0)) - << (cod_info->scalefac_scale + 1)) - - cod_info->subblock_gain[cod_info->window[sfb]] * 8; + cod_info->global_gain + - ((cod_info->scalefac[sfb] + (cod_info->preflag ? pretab[sfb] : 0)) + << (cod_info->scalefac_scale + 1)) + - cod_info->subblock_gain[cod_info->window[sfb]] * 8; } assert(cod_info->width[sfb] >= 0); if (prev_data_use && (prev_noise->step[sfb] == step)) { @@ -333,14 +324,13 @@ quantize_xrpow(const FLOAT * xp, int *pi, FLOAT istep, gr_info const *const cod_ quantize_lines_xrpow_01(accumulate01, istep, acc_xp, acc_iData); accumulate01 = 0; } - } - else { /*should compute this part */ - int l; + } else { /*should compute this part */ + int l; l = cod_info->width[sfb]; if ((j + cod_info->width[sfb]) > cod_info->max_nonzero_coeff) { /*do not compute upper zero part */ - int usefullsize; + int usefullsize; usefullsize = cod_info->max_nonzero_coeff - j + 1; memset(&pi[cod_info->max_nonzero_coeff], 0, sizeof(int) * (576 - cod_info->max_nonzero_coeff)); @@ -371,8 +361,7 @@ quantize_xrpow(const FLOAT * xp, int *pi, FLOAT istep, gr_info const *const cod_ acc_xp = xp; } accumulate01 += l; - } - else { + } else { if (accumulate01) { quantize_lines_xrpow_01(accumulate01, istep, acc_xp, acc_iData); accumulate01 = 0; @@ -423,9 +412,8 @@ quantize_xrpow(const FLOAT * xp, int *pi, FLOAT istep, gr_info const *const cod_ /*************************************************************************/ static int -ix_max(const int *ix, const int *end) -{ - int max1 = 0, max2 = 0; +ix_max(const int *ix, const int *end) { + int max1 = 0, max2 = 0; do { int const x1 = *ix++; @@ -442,15 +430,8 @@ ix_max(const int *ix, const int *end) } - - - - - - static int -count_bit_ESC(const int *ix, const int *const end, int t1, const int t2, unsigned int *const s) -{ +count_bit_ESC(const int *ix, const int *const end, int t1, const int t2, unsigned int *const s) { /* ESC-table is used */ unsigned int const linbits = ht[t1].xlen * 65536u + ht[t2].xlen; unsigned int sum = 0, sum2; @@ -486,8 +467,7 @@ count_bit_ESC(const int *ix, const int *const end, int t1, const int t2, unsigne static int -count_bit_noESC(const int *ix, const int *end, int mx, unsigned int *s) -{ +count_bit_noESC(const int *ix, const int *end, int mx, unsigned int *s) { /* No ESC-words */ unsigned int sum1 = 0; const uint8_t *const hlen1 = ht[1].hlen; @@ -496,7 +476,7 @@ count_bit_noESC(const int *ix, const int *end, int mx, unsigned int *s) do { unsigned int const x0 = *ix++; unsigned int const x1 = *ix++; - sum1 += hlen1[ x0+x0 + x1 ]; + sum1 += hlen1[x0 + x0 + x1]; } while (ix < end); *s += sum1; @@ -505,23 +485,22 @@ count_bit_noESC(const int *ix, const int *end, int mx, unsigned int *s) static const int huf_tbl_noESC[] = { - 1, 2, 5, 7, 7, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13 + 1, 2, 5, 7, 7, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13 }; static int -count_bit_noESC_from2(const int *ix, const int *end, int max, unsigned int *s) -{ +count_bit_noESC_from2(const int *ix, const int *end, int max, unsigned int *s) { int t1 = huf_tbl_noESC[max - 1]; /* No ESC-words */ const unsigned int xlen = ht[t1].xlen; - uint32_t const* table = (t1 == 2) ? &table23[0] : &table56[0]; + uint32_t const *table = (t1 == 2) ? &table23[0] : &table56[0]; unsigned int sum = 0, sum2; do { unsigned int const x0 = *ix++; unsigned int const x1 = *ix++; - sum += table[ x0 * xlen + x1 ]; + sum += table[x0 * xlen + x1]; } while (ix < end); sum2 = sum & 0xffffu; @@ -538,8 +517,7 @@ count_bit_noESC_from2(const int *ix, const int *end, int max, unsigned int *s) inline static int -count_bit_noESC_from3(const int *ix, const int *end, int max, unsigned int * s) -{ +count_bit_noESC_from3(const int *ix, const int *end, int max, unsigned int *s) { int t1 = huf_tbl_noESC[max - 1]; /* No ESC-words */ unsigned int sum1 = 0; @@ -549,7 +527,7 @@ count_bit_noESC_from3(const int *ix, const int *end, int max, unsigned int * s) const uint8_t *const hlen1 = ht[t1].hlen; const uint8_t *const hlen2 = ht[t1 + 1].hlen; const uint8_t *const hlen3 = ht[t1 + 2].hlen; - int t; + int t; do { unsigned int x0 = *ix++; @@ -571,7 +549,7 @@ count_bit_noESC_from3(const int *ix, const int *end, int max, unsigned int * s) } *s += sum1; - return t; + return t; } @@ -587,8 +565,7 @@ count_bit_noESC_from3(const int *ix, const int *end, int max, unsigned int * s) of the Huffman tables as defined in the IS (Table B.7), and will not work with any arbitrary tables. */ -static int count_bit_null(const int* ix, const int* end, int max, unsigned int* s) -{ +static int count_bit_null(const int *ix, const int *end, int max, unsigned int *s) { (void) ix; (void) end; (void) max; @@ -596,37 +573,25 @@ static int count_bit_null(const int* ix, const int* end, int max, unsigned int* return 0; } -typedef int (*count_fnc)(const int* ix, const int* end, int max, unsigned int* s); - -static const count_fnc count_fncs[] = -{ &count_bit_null -, &count_bit_noESC -, &count_bit_noESC_from2 -, &count_bit_noESC_from2 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -, &count_bit_noESC_from3 -}; +typedef int (*count_fnc)(const int *ix, const int *end, int max, unsigned int *s); + +static const count_fnc count_fncs[] = + {&count_bit_null, &count_bit_noESC, &count_bit_noESC_from2, &count_bit_noESC_from2, + &count_bit_noESC_from3, &count_bit_noESC_from3, &count_bit_noESC_from3, + &count_bit_noESC_from3, &count_bit_noESC_from3, &count_bit_noESC_from3, + &count_bit_noESC_from3, &count_bit_noESC_from3, &count_bit_noESC_from3, + &count_bit_noESC_from3, &count_bit_noESC_from3, &count_bit_noESC_from3 + }; static int -choose_table_nonMMX(const int *ix, const int *const end, int *const _s) -{ - unsigned int* s = (unsigned int*)_s; - unsigned int max; - int choice, choice2; +choose_table_nonMMX(const int *ix, const int *const end, int *const _s) { + unsigned int *s = (unsigned int *) _s; + unsigned int max; + int choice, choice2; max = ix_max(ix, end); if (max <= 15) { - return count_fncs[max](ix, end, max, s); + return count_fncs[max](ix, end, max, s); } /* try tables with linbits */ if (max > IXMAX_VAL) { @@ -655,11 +620,10 @@ choose_table_nonMMX(const int *ix, const int *const end, int *const _s) /*************************************************************************/ int noquant_count_bits(lame_internal_flags const *const gfc, - gr_info * const gi, calc_noise_data * prev_noise) -{ + gr_info *const gi, calc_noise_data *prev_noise) { SessionConfig_t const *const cfg = &gfc->cfg; - int bits = 0; - int i, a1, a2; + int bits = 0; + int i, a1, a2; int const *const ix = gi->l3_enc; i = Min(576, ((gi->max_nonzero_coeff + 2) >> 1) << 1); @@ -676,11 +640,11 @@ noquant_count_bits(lame_internal_flags const *const gfc, /* Determines the number of bits to encode the quadruples. */ a1 = a2 = 0; for (; i > 3; i -= 4) { - int x4 = ix[i-4]; - int x3 = ix[i-3]; - int x2 = ix[i-2]; - int x1 = ix[i-1]; - int p; + int x4 = ix[i - 4]; + int x3 = ix[i - 3]; + int x2 = ix[i - 2]; + int x1 = ix[i - 1]; + int p; /* hack to check if all values <= 1 */ if ((unsigned int) (x4 | x3 | x2 | x1) > 1) break; @@ -708,8 +672,7 @@ noquant_count_bits(lame_internal_flags const *const gfc, a1 = gi->big_values; a2 = gi->big_values; - } - else if (gi->block_type == NORM_TYPE) { + } else if (gi->block_type == NORM_TYPE) { assert(i <= 576); /* bv_scf has 576 entries (0..575) */ a1 = gi->region0_count = gfc->sv_qnt.bv_scf[i - 2]; a2 = gi->region1_count = gfc->sv_qnt.bv_scf[i - 1]; @@ -720,8 +683,7 @@ noquant_count_bits(lame_internal_flags const *const gfc, if (a2 < i) gi->table_select[2] = gfc->choose_table(ix + a2, ix + i, &bits); - } - else { + } else { gi->region0_count = 7; /*gi->region1_count = SBPSY_l - 7 - 1; */ gi->region1_count = SBMAX_l - 1 - 7 - 1; @@ -755,7 +717,7 @@ noquant_count_bits(lame_internal_flags const *const gfc, if (prev_noise) { if (gi->block_type == NORM_TYPE) { - int sfb = 0; + int sfb = 0; while (gfc->scalefac_band.l[sfb] < gi->big_values) { sfb++; } @@ -768,9 +730,8 @@ noquant_count_bits(lame_internal_flags const *const gfc, int count_bits(lame_internal_flags const *const gfc, - const FLOAT * const xr, gr_info * const gi, calc_noise_data * prev_noise) -{ - int *const ix = gi->l3_enc; + const FLOAT *const xr, gr_info *const gi, calc_noise_data *prev_noise) { + int *const ix = gi->l3_enc; /* since quantize_xrpow uses table lookup, we need to check this first: */ FLOAT const w = (IXMAX_VAL) / IPOW20(gi->global_gain); @@ -781,7 +742,7 @@ count_bits(lame_internal_flags const *const gfc, quantize_xrpow(xr, ix, IPOW20(gi->global_gain), gi, prev_noise); if (gfc->sv_qnt.substep_shaping & 2) { - int sfb, j = 0; + int sfb, j = 0; /* 0.634521682242439 = 0.5946*2**(.5*0.1875) */ int const gain = gi->global_gain + gi->scalefac_scale; const FLOAT roundfac = 0.634521682242439 / IPOW20(gain); @@ -790,9 +751,8 @@ count_bits(lame_internal_flags const *const gfc, assert(width >= 0); if (!gfc->sv_qnt.pseudohalf[sfb]) { j += width; - } - else { - int k; + } else { + int k; for (k = j, j += width; k < j; ++k) { ix[k] = (xr[k] >= roundfac) ? ix[k] : 0; } @@ -809,11 +769,10 @@ count_bits(lame_internal_flags const *const gfc, inline static void -recalc_divide_init(const lame_internal_flags * const gfc, +recalc_divide_init(const lame_internal_flags *const gfc, gr_info const *cod_info, - int const *const ix, int r01_bits[], int r01_div[], int r0_tbl[], int r1_tbl[]) -{ - int r0, r1, bigv, r0t, r1t, bits; + int const *const ix, int r01_bits[], int r01_div[], int r0_tbl[], int r1_tbl[]) { + int r0, r1, bigv, r0t, r1t, bits; bigv = cod_info->big_values; @@ -823,7 +782,7 @@ recalc_divide_init(const lame_internal_flags * const gfc, for (r0 = 0; r0 < 16; r0++) { int const a1 = gfc->scalefac_band.l[r0 + 1]; - int r0bits; + int r0bits; if (a1 >= bigv) break; r0bits = 0; @@ -847,13 +806,13 @@ recalc_divide_init(const lame_internal_flags * const gfc, } inline static void -recalc_divide_sub(const lame_internal_flags * const gfc, - const gr_info * cod_info2, - gr_info * const gi, +recalc_divide_sub(const lame_internal_flags *const gfc, + const gr_info *cod_info2, + gr_info *const gi, const int *const ix, - const int r01_bits[], const int r01_div[], const int r0_tbl[], const int r1_tbl[]) -{ - int bits, r2, a2, bigv, r2t; + const int r01_bits[], const int r01_div[], const int r0_tbl[], + const int r1_tbl[]) { + int bits, r2, a2, bigv, r2t; bigv = cod_info2->big_values; @@ -881,20 +840,17 @@ recalc_divide_sub(const lame_internal_flags * const gfc, } - - void -best_huffman_divide(const lame_internal_flags * const gfc, gr_info * const gi) -{ +best_huffman_divide(const lame_internal_flags *const gfc, gr_info *const gi) { SessionConfig_t const *const cfg = &gfc->cfg; - int i, a1, a2; + int i, a1, a2; gr_info cod_info2; int const *const ix = gi->l3_enc; - int r01_bits[7 + 15 + 1]; - int r01_div[7 + 15 + 1]; - int r0_tbl[7 + 15 + 1]; - int r1_tbl[7 + 15 + 1]; + int r01_bits[7 + 15 + 1]; + int r01_div[7 + 15 + 1]; + int r0_tbl[7 + 15 + 1]; + int r1_tbl[7 + 15 + 1]; /* SHORT BLOCK stuff fails for MPEG2 */ @@ -949,26 +905,25 @@ best_huffman_divide(const lame_internal_flags * const gfc, gr_info * const gi) } if (a1 > 0) cod_info2.table_select[0] = - gfc->choose_table(ix, ix + a1, (int *) &cod_info2.part2_3_length); + gfc->choose_table(ix, ix + a1, (int *) &cod_info2.part2_3_length); if (i > a1) cod_info2.table_select[1] = - gfc->choose_table(ix + a1, ix + i, (int *) &cod_info2.part2_3_length); + gfc->choose_table(ix + a1, ix + i, (int *) &cod_info2.part2_3_length); if (gi->part2_3_length > cod_info2.part2_3_length) memcpy(gi, &cod_info2, sizeof(gr_info)); } } -static const int slen1_n[16] = { 1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16 }; -static const int slen2_n[16] = { 1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 }; -const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; -const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; +static const int slen1_n[16] = {1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16}; +static const int slen2_n[16] = {1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8}; +const int slen1_tab[16] = {0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4}; +const int slen2_tab[16] = {0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3}; static void -scfsi_calc(int ch, III_side_info_t * l3_side) -{ +scfsi_calc(int ch, III_side_info_t *l3_side) { unsigned int i; - int s1, s2, c1, c2; - int sfb; + int s1, s2, c1, c2; + int sfb; gr_info *const gi = &l3_side->tt[1][ch]; gr_info const *const g0 = &l3_side->tt[0][ch]; @@ -1009,7 +964,7 @@ scfsi_calc(int ch, III_side_info_t * l3_side) int const c = slen1_tab[i] * c1 + slen2_tab[i] * c2; if (gi->part2_length > c) { gi->part2_length = c; - gi->scalefac_compress = (int)i; + gi->scalefac_compress = (int) i; } } } @@ -1021,14 +976,13 @@ Only call this routine after final scalefactors have been chosen and the channel/granule will not be re-encoded. */ void -best_scalefac_store(const lame_internal_flags * gfc, - const int gr, const int ch, III_side_info_t * const l3_side) -{ +best_scalefac_store(const lame_internal_flags *gfc, + const int gr, const int ch, III_side_info_t *const l3_side) { SessionConfig_t const *const cfg = &gfc->cfg; /* use scalefac_scale if we can */ gr_info *const gi = &l3_side->tt[gr][ch]; - int sfb, i, j, l; - int recalc = 0; + int sfb, i, j, l; + int recalc = 0; /* remove scalefacs from bands with ix=0. This idea comes * from the AAC ISO docs. added mt 3/00 */ @@ -1049,7 +1003,7 @@ best_scalefac_store(const lame_internal_flags * gfc, } if (!gi->scalefac_scale && !gi->preflag) { - int s = 0; + int s = 0; for (sfb = 0; sfb < gi->sfbmax; sfb++) if (gi->scalefac[sfb] > 0) s |= gi->scalefac[sfb]; @@ -1097,16 +1051,17 @@ best_scalefac_store(const lame_internal_flags * gfc, #ifndef NDEBUG + static int -all_scalefactors_not_negative(int const *scalefac, int n) -{ - int i; +all_scalefactors_not_negative(int const *scalefac, int n) { + int i; for (i = 0; i < n; ++i) { if (scalefac[i] < 0) return 0; } return 1; } + #endif @@ -1114,17 +1069,17 @@ all_scalefactors_not_negative(int const *scalefac, int n) /* 18*slen1_tab[i] + 18*slen2_tab[i] */ static const int scale_short[16] = { - 0, 18, 36, 54, 54, 36, 54, 72, 54, 72, 90, 72, 90, 108, 108, 126 + 0, 18, 36, 54, 54, 36, 54, 72, 54, 72, 90, 72, 90, 108, 108, 126 }; /* 17*slen1_tab[i] + 18*slen2_tab[i] */ static const int scale_mixed[16] = { - 0, 18, 36, 54, 51, 35, 53, 71, 52, 70, 88, 69, 87, 105, 104, 122 + 0, 18, 36, 54, 51, 35, 53, 71, 52, 70, 88, 69, 87, 105, 104, 122 }; /* 11*slen1_tab[i] + 10*slen2_tab[i] */ static const int scale_long[16] = { - 0, 10, 20, 30, 33, 21, 31, 41, 32, 42, 52, 43, 53, 63, 64, 74 + 0, 10, 20, 30, 33, 21, 31, 41, 32, 42, 52, 43, 53, 63, 64, 74 }; @@ -1135,13 +1090,12 @@ static const int scale_long[16] = { /* Also calculates the number of bits necessary to code the scalefactors. */ static int -mpeg1_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) -{ - int k, sfb, max_slen1 = 0, max_slen2 = 0; +mpeg1_scale_bitcount(const lame_internal_flags *gfc, gr_info *const cod_info) { + int k, sfb, max_slen1 = 0, max_slen2 = 0; /* maximum values */ const int *tab; - int *const scalefac = cod_info->scalefac; + int *const scalefac = cod_info->scalefac; (void) gfc; assert(all_scalefactors_not_negative(scalefac, cod_info->sfbmax)); @@ -1150,8 +1104,7 @@ mpeg1_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) tab = scale_short; if (cod_info->mixed_block_flag) tab = scale_mixed; - } - else { /* block_type == 1,2,or 3 */ + } else { /* block_type == 1,2,or 3 */ tab = scale_long; if (!cod_info->preflag) { for (sfb = 11; sfb < SBPSY_l; sfb++) @@ -1190,17 +1143,16 @@ mpeg1_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) } - /* table of largest scalefactor values for MPEG2 */ static const int max_range_sfac_tab[6][4] = { - {15, 15, 7, 7}, - {15, 15, 7, 0}, - {7, 3, 0, 0}, - {15, 31, 31, 0}, - {7, 7, 7, 0}, - {3, 3, 0, 0} + {15, 15, 7, 7}, + {15, 15, 7, 0}, + {7, 3, 0, 0}, + {15, 31, 31, 0}, + {7, 7, 7, 0}, + {3, 3, 0, 0} }; @@ -1217,10 +1169,9 @@ static const int max_range_sfac_tab[6][4] = { /* "Audio Decoding Layer III" */ static int -mpeg2_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) -{ - int table_number, row_in_table, partition, nr_sfb, window, over; - int i, sfb, max_sfac[4]; +mpeg2_scale_bitcount(const lame_internal_flags *gfc, gr_info *const cod_info) { + int table_number, row_in_table, partition, nr_sfb, window, over; + int i, sfb, max_sfac[4]; const int *partition_table; int const *const scalefac = cod_info->scalefac; @@ -1246,8 +1197,7 @@ mpeg2_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) if (scalefac[sfb * 3 + window] > max_sfac[partition]) max_sfac[partition] = scalefac[sfb * 3 + window]; } - } - else { + } else { row_in_table = 0; partition_table = &nr_of_sfb_block[table_number][row_in_table][0]; for (sfb = 0, partition = 0; partition < 4; partition++) { @@ -1267,9 +1217,9 @@ mpeg2_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) Since no bands have been over-amplified, we can set scalefac_compress and slen[] for the formatter */ - static const int log2tab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 }; + static const int log2tab[] = {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4}; - int slen1, slen2, slen3, slen4; + int slen1, slen2, slen3, slen4; cod_info->sfb_partition_table = nr_of_sfb_block[table_number][row_in_table]; for (partition = 0; partition < 4; partition++) @@ -1282,24 +1232,24 @@ mpeg2_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) slen4 = cod_info->slen[3]; switch (table_number) { - case 0: - cod_info->scalefac_compress = (((slen1 * 5) + slen2) << 4) - + (slen3 << 2) - + slen4; - break; + case 0: + cod_info->scalefac_compress = (((slen1 * 5) + slen2) << 4) + + (slen3 << 2) + + slen4; + break; - case 1: - cod_info->scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2) - + slen3; - break; + case 1: + cod_info->scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2) + + slen3; + break; - case 2: - cod_info->scalefac_compress = 500 + (slen1 * 3) + slen2; - break; + case 2: + cod_info->scalefac_compress = 500 + (slen1 * 3) + slen2; + break; - default: - ERRORF(gfc, "intensity stereo not implemented yet\n"); - break; + default: + ERRORF(gfc, "intensity stereo not implemented yet\n"); + break; } } #ifdef DEBUG @@ -1311,19 +1261,17 @@ mpeg2_scale_bitcount(const lame_internal_flags * gfc, gr_info * const cod_info) cod_info->part2_length = 0; for (partition = 0; partition < 4; partition++) cod_info->part2_length += - cod_info->slen[partition] * cod_info->sfb_partition_table[partition]; + cod_info->slen[partition] * cod_info->sfb_partition_table[partition]; } return over; } int -scale_bitcount(const lame_internal_flags * gfc, gr_info * cod_info) -{ +scale_bitcount(const lame_internal_flags *gfc, gr_info *cod_info) { if (gfc->cfg.mode_gr == 2) { return mpeg1_scale_bitcount(gfc, cod_info); - } - else { + } else { return mpeg2_scale_bitcount(gfc, cod_info); } } @@ -1334,9 +1282,8 @@ extern int choose_table_MMX(const int *ix, const int *const end, int *const s); #endif void -huffman_init(lame_internal_flags * const gfc) -{ - int i; +huffman_init(lame_internal_flags *const gfc) { + int i; gfc->choose_table = choose_table_nonMMX; @@ -1347,7 +1294,7 @@ huffman_init(lame_internal_flags * const gfc) #endif for (i = 2; i <= 576; i += 2) { - int scfb_anz = 0, bv_index; + int scfb_anz = 0, bv_index; while (gfc->scalefac_band.l[++scfb_anz] < i); bv_index = subdv_table[scfb_anz].region0_count; diff --git a/library/src/main/cpp/lamemp3/util.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.c similarity index 83% rename from library/src/main/cpp/lamemp3/util.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.c index b6948af..53d0a11 100644 --- a/library/src/main/cpp/lamemp3/util.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.c @@ -34,7 +34,6 @@ #include "machine.h" #include "encoder.h" #include "util.h" -#include "tables.h" #define PRECOMPUTE #if defined(__FreeBSD__) && !defined(__alpha__) @@ -50,8 +49,7 @@ /*empty and close mallocs in gfc */ void -free_id3tag(lame_internal_flags * const gfc) -{ +free_id3tag(lame_internal_flags *const gfc) { gfc->tag_spec.language[0] = 0; if (gfc->tag_spec.title != 0) { free(gfc->tag_spec.title); @@ -79,9 +77,9 @@ free_id3tag(lame_internal_flags * const gfc) if (gfc->tag_spec.v2_head != 0) { FrameDataNode *node = gfc->tag_spec.v2_head; do { - void *p = node->dsc.ptr.b; - void *q = node->txt.ptr.b; - void *r = node; + void *p = node->dsc.ptr.b; + void *q = node->txt.ptr.b; + void *r = node; node = node->nxt; free(p); free(q); @@ -94,8 +92,7 @@ free_id3tag(lame_internal_flags * const gfc) static void -free_global_data(lame_internal_flags * gfc) -{ +free_global_data(lame_internal_flags *gfc) { if (gfc && gfc->cd_psy) { if (gfc->cd_psy->l.s3) { /* XXX allocated in psymodel_init() */ @@ -112,9 +109,8 @@ free_global_data(lame_internal_flags * gfc) void -freegfc(lame_internal_flags * const gfc) -{ /* bit stream structure */ - int i; +freegfc(lame_internal_flags *const gfc) { /* bit stream structure */ + int i; if (gfc == 0) return; @@ -169,8 +165,7 @@ freegfc(lame_internal_flags * const gfc) } void -calloc_aligned(aligned_pointer_t * ptr, unsigned int size, unsigned int bytes) -{ +calloc_aligned(aligned_pointer_t *ptr, unsigned int size, unsigned int bytes) { if (ptr) { if (!ptr->pointer) { ptr->pointer = malloc(size + bytes); @@ -178,12 +173,10 @@ calloc_aligned(aligned_pointer_t * ptr, unsigned int size, unsigned int bytes) memset(ptr->pointer, 0, size + bytes); if (bytes > 0) { ptr->aligned = (void *) ((((size_t) ptr->pointer + bytes - 1) / bytes) * bytes); - } - else { + } else { ptr->aligned = ptr->pointer; } - } - else { + } else { ptr->aligned = 0; } } @@ -191,8 +184,7 @@ calloc_aligned(aligned_pointer_t * ptr, unsigned int size, unsigned int bytes) } void -free_aligned(aligned_pointer_t * ptr) -{ +free_aligned(aligned_pointer_t *ptr) { if (ptr) { if (ptr->pointer) { free(ptr->pointer); @@ -205,9 +197,8 @@ free_aligned(aligned_pointer_t * ptr) /*those ATH formulas are returning their minimum value for input = -1*/ -static FLOAT -ATHformula_GB(FLOAT f, FLOAT value, FLOAT f_min, FLOAT f_max) -{ +static FLOAT +ATHformula_GB(FLOAT f, FLOAT value, FLOAT f_min, FLOAT f_max) { /* from Painter & Spanias modified by Gabriel Bouvigne to better fit the reality ath = 3.640 * pow(f,-0.8) @@ -230,7 +221,7 @@ it adjusts from something close to Painter & Spanias on V9 up to Bouvigne's formula for V0. This way the VBR bitrate is more balanced according to the -V value.*/ - FLOAT ath; + FLOAT ath; /* the following Hack allows to ask for the lowest value */ if (f < -.3) @@ -241,48 +232,45 @@ bitrate is more balanced according to the -V value.*/ f = Min(f_max, f); ath = 3.640 * pow(f, -0.8) - - 6.800 * exp(-0.6 * pow(f - 3.4, 2.0)) - + 6.000 * exp(-0.15 * pow(f - 8.7, 2.0)) - + (0.6 + 0.04 * value) * 0.001 * pow(f, 4.0); + - 6.800 * exp(-0.6 * pow(f - 3.4, 2.0)) + + 6.000 * exp(-0.15 * pow(f - 8.7, 2.0)) + + (0.6 + 0.04 * value) * 0.001 * pow(f, 4.0); return ath; } - FLOAT -ATHformula(SessionConfig_t const *cfg, FLOAT f) -{ - FLOAT ath; +ATHformula(SessionConfig_t const *cfg, FLOAT f) { + FLOAT ath; switch (cfg->ATHtype) { - case 0: - ath = ATHformula_GB(f, 9, 0.1f, 24.0f); - break; - case 1: - ath = ATHformula_GB(f, -1, 0.1f, 24.0f); /*over sensitive, should probably be removed */ - break; - case 2: - ath = ATHformula_GB(f, 0, 0.1f, 24.0f); - break; - case 3: - ath = ATHformula_GB(f, 1, 0.1f, 24.0f) + 6; /*modification of GB formula by Roel */ - break; - case 4: - ath = ATHformula_GB(f, cfg->ATHcurve, 0.1f, 24.0f); - break; - case 5: - ath = ATHformula_GB(f, cfg->ATHcurve, 3.41f, 16.1f); - break; - default: - ath = ATHformula_GB(f, 0, 0.1f, 24.0f); - break; + case 0: + ath = ATHformula_GB(f, 9, 0.1f, 24.0f); + break; + case 1: + ath = ATHformula_GB(f, -1, 0.1f, 24.0f); /*over sensitive, should probably be removed */ + break; + case 2: + ath = ATHformula_GB(f, 0, 0.1f, 24.0f); + break; + case 3: + ath = ATHformula_GB(f, 1, 0.1f, 24.0f) + 6; /*modification of GB formula by Roel */ + break; + case 4: + ath = ATHformula_GB(f, cfg->ATHcurve, 0.1f, 24.0f); + break; + case 5: + ath = ATHformula_GB(f, cfg->ATHcurve, 3.41f, 16.1f); + break; + default: + ath = ATHformula_GB(f, 0, 0.1f, 24.0f); + break; } return ath; } /* see for example "Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7 */ FLOAT -freq2bark(FLOAT freq) -{ +freq2bark(FLOAT freq) { /* input: freq in hz output: barks */ if (freq < 0) freq = 0; @@ -305,16 +293,13 @@ freq2cbw(FLOAT freq) #endif - - #define ABS(A) (((A)>0) ? (A) : -(A)) int FindNearestBitrate(int bRate, /* legal rates from 8 to 320 */ - int version, int samplerate) -{ /* MPEG-1 or MPEG-2 LSF */ - int bitrate; - int i; + int version, int samplerate) { /* MPEG-1 or MPEG-2 LSF */ + int bitrate; + int i; if (samplerate < 16000) version = 2; @@ -331,9 +316,6 @@ FindNearestBitrate(int bRate, /* legal rates from 8 to 320 */ } - - - #ifndef Min #define Min(A, B) ((A) < (B) ? (A) : (B)) #endif @@ -351,18 +333,17 @@ FindNearestBitrate(int bRate, /* legal rates from 8 to 320 */ * Gabriel Bouvigne 2002-11-03 */ int -nearestBitrateFullIndex(uint16_t bitrate) -{ +nearestBitrateFullIndex(uint16_t bitrate) { /* borrowed from DM abr presets */ const int full_bitrate_table[] = - { 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 }; + {8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320}; - int lower_range = 0, lower_range_kbps = 0, upper_range = 0, upper_range_kbps = 0; + int lower_range = 0, lower_range_kbps = 0, upper_range = 0, upper_range_kbps = 0; - int b; + int b; /* We assume specified bitrate will be 320kbps */ @@ -392,16 +373,12 @@ nearestBitrateFullIndex(uint16_t bitrate) } - - - /* map frequency to a valid MP3 sample frequency * * Robert Hegemann 2000-07-01 */ int -map2MP3Frequency(int freq) -{ +map2MP3Frequency(int freq) { if (freq <= 8000) return 8000; if (freq <= 11025) @@ -425,9 +402,8 @@ map2MP3Frequency(int freq) int BitrateIndex(int bRate, /* legal rates from 32 to 448 kbps */ int version, /* MPEG-1 or MPEG-2/2.5 LSF */ - int samplerate) -{ /* convert bitrate in kbps to index */ - int i; + int samplerate) { /* convert bitrate in kbps to index */ + int i; if (samplerate < 16000) version = 2; for (i = 0; i <= 14; i++) { @@ -443,39 +419,38 @@ BitrateIndex(int bRate, /* legal rates from 32 to 448 kbps */ /* convert samp freq in Hz to index */ int -SmpFrqIndex(int sample_freq, int *const version) -{ +SmpFrqIndex(int sample_freq, int *const version) { switch (sample_freq) { - case 44100: - *version = 1; - return 0; - case 48000: - *version = 1; - return 1; - case 32000: - *version = 1; - return 2; - case 22050: - *version = 0; - return 0; - case 24000: - *version = 0; - return 1; - case 16000: - *version = 0; - return 2; - case 11025: - *version = 0; - return 0; - case 12000: - *version = 0; - return 1; - case 8000: - *version = 0; - return 2; - default: - *version = 0; - return -1; + case 44100: + *version = 1; + return 0; + case 48000: + *version = 1; + return 1; + case 32000: + *version = 1; + return 2; + case 22050: + *version = 0; + return 0; + case 24000: + *version = 0; + return 1; + case 16000: + *version = 0; + return 2; + case 11025: + *version = 0; + return 0; + case 12000: + *version = 0; + return 1; + case 8000: + *version = 0; + return 2; + default: + *version = 0; + return -1; } } @@ -497,13 +472,12 @@ SmpFrqIndex(int sample_freq, int *const version) /* resampling via FIR filter, blackman window */ inline static FLOAT -blackman(FLOAT x, FLOAT fcn, int l) -{ +blackman(FLOAT x, FLOAT fcn, int l) { /* This algorithm from: SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C S.D. Stearns and R.A. David, Prentice-Hall, 1992 */ - FLOAT bkwn, x2; + FLOAT bkwn, x2; FLOAT const wcn = (PI * fcn); x /= l; @@ -529,29 +503,26 @@ blackman(FLOAT x, FLOAT fcn, int l) /* Joint work of Euclid and M. Hendry */ static int -gcd(int i, int j) -{ +gcd(int i, int j) { /* assert ( i > 0 && j > 0 ); */ return j ? gcd(j, i % j) : i; } - static int -fill_buffer_resample(lame_internal_flags * gfc, - sample_t * outbuf, - int desired_len, sample_t const *inbuf, int len, int *num_used, int ch) -{ +fill_buffer_resample(lame_internal_flags *gfc, + sample_t *outbuf, + int desired_len, sample_t const *inbuf, int len, int *num_used, int ch) { SessionConfig_t const *const cfg = &gfc->cfg; EncStateVar_t *esv = &gfc->sv_enc; - double resample_ratio = (double)cfg->samplerate_in / (double)cfg->samplerate_out; - int BLACKSIZE; - FLOAT offset, xvalue; - int i, j = 0, k; - int filter_l; - FLOAT fcn, intratio; - FLOAT *inbuf_old; - int bpc; /* number of convolution functions to pre-compute */ + double resample_ratio = (double) cfg->samplerate_in / (double) cfg->samplerate_out; + int BLACKSIZE; + FLOAT offset, xvalue; + int i, j = 0, k; + int filter_l; + FLOAT fcn, intratio; + FLOAT *inbuf_old; + int bpc; /* number of convolution functions to pre-compute */ bpc = cfg->samplerate_out / gcd(cfg->samplerate_out, cfg->samplerate_in); if (bpc > BPC) bpc = BPC; @@ -577,7 +548,7 @@ fill_buffer_resample(lame_internal_flags * gfc, /* precompute blackman filter coefficients */ for (j = 0; j <= 2 * bpc; j++) { - FLOAT sum = 0.; + FLOAT sum = 0.; offset = (j - bpc) / (2. * bpc); for (i = 0; i <= filter_l; i++) sum += esv->blackfilt[j][i] = blackman(i - offset, fcn, filter_l); @@ -592,8 +563,8 @@ fill_buffer_resample(lame_internal_flags * gfc, /* time of j'th element in inbuf = itime + j/ifreq; */ /* time of k'th element in outbuf = j/ofreq */ for (k = 0; k < desired_len; k++) { - double time0 = k * resample_ratio; /* time of k'th output sample */ - int joff; + double time0 = k * resample_ratio; /* time of k'th output sample */ + int joff; j = floor(time0 - esv->itime[ch]); @@ -641,8 +612,7 @@ fill_buffer_resample(lame_internal_flags * gfc, if (*num_used >= BLACKSIZE) { for (i = 0; i < BLACKSIZE; i++) inbuf_old[i] = inbuf[*num_used + i - BLACKSIZE]; - } - else { + } else { /* shift in *num_used samples into inbuf_old */ int const n_shift = BLACKSIZE - *num_used; /* number of samples to shift */ @@ -661,8 +631,7 @@ fill_buffer_resample(lame_internal_flags * gfc, } int -isResamplingNecessary(SessionConfig_t const* cfg) -{ +isResamplingNecessary(SessionConfig_t const *cfg) { int const l = cfg->samplerate_out * 0.9995f; int const h = cfg->samplerate_out * 1.0005f; return (cfg->samplerate_in < l) || (h < cfg->samplerate_in) ? 1 : 0; @@ -673,25 +642,24 @@ isResamplingNecessary(SessionConfig_t const* cfg) were used. n_out = number of samples copied into mfbuf */ void -fill_buffer(lame_internal_flags * gfc, - sample_t * const mfbuf[2], sample_t const * const in_buffer[2], int nsamples, int *n_in, int *n_out) -{ +fill_buffer(lame_internal_flags *gfc, + sample_t *const mfbuf[2], sample_t const *const in_buffer[2], int nsamples, int *n_in, + int *n_out) { SessionConfig_t const *const cfg = &gfc->cfg; - int mf_size = gfc->sv_enc.mf_size; - int framesize = 576 * cfg->mode_gr; - int nout, ch = 0; - int nch = cfg->channels_out; + int mf_size = gfc->sv_enc.mf_size; + int framesize = 576 * cfg->mode_gr; + int nout, ch = 0; + int nch = cfg->channels_out; /* copy in new samples into mfbuf, with resampling if necessary */ if (isResamplingNecessary(cfg)) { do { nout = - fill_buffer_resample(gfc, &mfbuf[ch][mf_size], - framesize, in_buffer[ch], nsamples, n_in, ch); + fill_buffer_resample(gfc, &mfbuf[ch][mf_size], + framesize, in_buffer[ch], nsamples, n_in, ch); } while (++ch < nch); *n_out = nout; - } - else { + } else { nout = Min(framesize, nsamples); do { memcpy(&mfbuf[ch][mf_size], &in_buffer[ch][0], nout * sizeof(mfbuf[0][0])); @@ -702,11 +670,6 @@ fill_buffer(lame_internal_flags * gfc, } - - - - - /*********************************************************************** * * Message Output @@ -714,15 +677,13 @@ fill_buffer(lame_internal_flags * gfc, ***********************************************************************/ void -lame_report_def(const char *format, va_list args) -{ +lame_report_def(const char *format, va_list args) { (void) vfprintf(stderr, format, args); fflush(stderr); /* an debug function should flush immediately */ } -void -lame_report_fnc(lame_report_function print_f, const char *format, ...) -{ +void +lame_report_fnc(lame_report_function print_f, const char *format, ...) { if (print_f) { va_list args; va_start(args, format); @@ -733,8 +694,7 @@ lame_report_fnc(lame_report_function print_f, const char *format, ...) void -lame_debugf(const lame_internal_flags* gfc, const char *format, ...) -{ +lame_debugf(const lame_internal_flags *gfc, const char *format, ...) { if (gfc && gfc->report_dbg) { va_list args; va_start(args, format); @@ -745,8 +705,7 @@ lame_debugf(const lame_internal_flags* gfc, const char *format, ...) void -lame_msgf(const lame_internal_flags* gfc, const char *format, ...) -{ +lame_msgf(const lame_internal_flags *gfc, const char *format, ...) { if (gfc && gfc->report_msg) { va_list args; va_start(args, format); @@ -757,8 +716,7 @@ lame_msgf(const lame_internal_flags* gfc, const char *format, ...) void -lame_errorf(const lame_internal_flags* gfc, const char *format, ...) -{ +lame_errorf(const lame_internal_flags *gfc, const char *format, ...) { if (gfc && gfc->report_err) { va_list args; va_start(args, format); @@ -786,8 +744,7 @@ extern int has_SSE2_nasm(void); #endif int -has_MMX(void) -{ +has_MMX(void) { #ifdef HAVE_NASM return has_MMX_nasm(); #else @@ -796,8 +753,7 @@ has_MMX(void) } int -has_3DNow(void) -{ +has_3DNow(void) { #ifdef HAVE_NASM return has_3DNow_nasm(); #else @@ -806,8 +762,7 @@ has_3DNow(void) } int -has_SSE(void) -{ +has_SSE(void) { #ifdef HAVE_NASM return has_SSE_nasm(); #else @@ -820,8 +775,7 @@ has_SSE(void) } int -has_SSE2(void) -{ +has_SSE2(void) { #ifdef HAVE_NASM return has_SSE2_nasm(); #else @@ -834,8 +788,7 @@ has_SSE2(void) } void -disable_FPE(void) -{ +disable_FPE(void) { /* extremly system dependent stuff, move to a lib to make the code readable */ /*==========================================================================*/ @@ -941,9 +894,6 @@ disable_FPE(void) } - - - #ifdef USE_FAST_LOG /*********************************************************************** * @@ -1011,8 +961,7 @@ fast_log2(ieee754_float32_t x) void -init_log_table(void) -{ +init_log_table(void) { } diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.h new file mode 100644 index 0000000..89b74e9 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/util.h @@ -0,0 +1,635 @@ +/* + * lame utility library include file + * + * Copyright (c) 1999 Albert L Faber + * Copyright (c) 2008 Robert Hegemann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_UTIL_H +#define LAME_UTIL_H + +#include "l3side.h" +#include "id3tag.h" +#include "lame_global_flags.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*********************************************************************** +* +* Global Definitions +* +***********************************************************************/ + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +#ifdef UINT_MAX +# define MAX_U_32_NUM UINT_MAX +#else +# define MAX_U_32_NUM 0xFFFFFFFF +#endif + +#ifndef PI +# ifdef M_PI +# define PI M_PI +# else +# define PI 3.14159265358979323846 +# endif +#endif + + +#ifdef M_LN2 +# define LOG2 M_LN2 +#else +# define LOG2 0.69314718055994530942 +#endif + +#ifdef M_LN10 +# define LOG10 M_LN10 +#else +# define LOG10 2.30258509299404568402 +#endif + + +#ifdef M_SQRT2 +# define SQRT2 M_SQRT2 +#else +# define SQRT2 1.41421356237309504880 +#endif + + +#define CRC16_POLYNOMIAL 0x8005 + +#define MAX_BITS_PER_CHANNEL 4095 +#define MAX_BITS_PER_GRANULE 7680 + +/* "bit_stream.h" Definitions */ +#define BUFFER_SIZE LAME_MAXMP3BUFFER + +#define Min(A, B) ((A) < (B) ? (A) : (B)) +#define Max(A, B) ((A) > (B) ? (A) : (B)) + +/* log/log10 approximations */ +#ifdef USE_FAST_LOG +#define FAST_LOG10(x) (fast_log2(x)*(LOG2/LOG10)) +#define FAST_LOG(x) (fast_log2(x)*LOG2) +#define FAST_LOG10_X(x,y) (fast_log2(x)*(LOG2/LOG10*(y))) +#define FAST_LOG_X(x,y) (fast_log2(x)*(LOG2*(y))) +#else +#define FAST_LOG10(x) log10(x) +#define FAST_LOG(x) log(x) +#define FAST_LOG10_X(x, y) (log10(x)*(y)) +#define FAST_LOG_X(x, y) (log(x)*(y)) +#endif + + +struct replaygain_data; +#ifndef replaygain_data_defined +#define replaygain_data_defined +typedef struct replaygain_data replaygain_t; +#endif +struct plotting_data; +#ifndef plotting_data_defined +#define plotting_data_defined +typedef struct plotting_data plotting_data; +#endif + +/*********************************************************************** +* +* Global Type Definitions +* +***********************************************************************/ + +typedef struct { + void *aligned; /* pointer to ie. 128 bit aligned memory */ + void *pointer; /* to use with malloc/free */ +} aligned_pointer_t; + +void calloc_aligned(aligned_pointer_t *ptr, unsigned int size, unsigned int bytes); + +void free_aligned(aligned_pointer_t *ptr); + + +/* "bit_stream.h" Type Definitions */ + +typedef struct bit_stream_struc { + unsigned char *buf; /* bit stream buffer */ + int buf_size; /* size of buffer (in number of bytes) */ + int totbit; /* bit counter of bit stream */ + int buf_byte_idx; /* pointer to top byte in buffer */ + int buf_bit_idx; /* pointer to top bit of top byte in buffer */ + + /* format of file in rd mode (BINARY/ASCII) */ +} Bit_stream_struc; + + +typedef struct { + int sum; /* what we have seen so far */ + int seen; /* how many frames we have seen in this chunk */ + int want; /* how many frames we want to collect into one chunk */ + int pos; /* actual position in our bag */ + int size; /* size of our bag */ + int *bag; /* pointer to our bag */ + unsigned int nVbrNumFrames; + unsigned long nBytesWritten; + /* VBR tag data */ + unsigned int TotalFrameSize; +} VBR_seek_info_t; + + +/** + * ATH related stuff, if something new ATH related has to be added, + * please plugg it here into the ATH_t struct + */ +typedef struct { + int use_adjust; /* method for the auto adjustment */ + FLOAT aa_sensitivity_p; /* factor for tuning the (sample power) + point below which adaptive threshold + of hearing adjustment occurs */ + FLOAT adjust_factor; /* lowering based on peak volume, 1 = no lowering */ + FLOAT adjust_limit; /* limit for dynamic ATH adjust */ + FLOAT decay; /* determined to lower x dB each second */ + FLOAT floor; /* lowest ATH value */ + FLOAT l[SBMAX_l]; /* ATH for sfbs in long blocks */ + FLOAT s[SBMAX_s]; /* ATH for sfbs in short blocks */ + FLOAT psfb21[PSFB21]; /* ATH for partitionned sfb21 in long blocks */ + FLOAT psfb12[PSFB12]; /* ATH for partitionned sfb12 in short blocks */ + FLOAT cb_l[CBANDS]; /* ATH for long block convolution bands */ + FLOAT cb_s[CBANDS]; /* ATH for short block convolution bands */ + FLOAT eql_w[BLKSIZE / 2]; /* equal loudness weights (based on ATH) */ +} ATH_t; + +/** + * PSY Model related stuff + */ + +typedef struct { + FLOAT masking_lower[CBANDS]; + FLOAT minval[CBANDS]; + FLOAT rnumlines[CBANDS]; + FLOAT mld_cb[CBANDS]; + FLOAT mld[Max(SBMAX_l, SBMAX_s)]; + FLOAT bo_weight[Max(SBMAX_l, SBMAX_s)]; /* band weight long scalefactor bands, at transition */ + FLOAT attack_threshold; /* short block tuning */ + int s3ind[CBANDS][2]; + int numlines[CBANDS]; + int bm[Max(SBMAX_l, SBMAX_s)]; + int bo[Max(SBMAX_l, SBMAX_s)]; + int npart; + int n_sb; /* SBMAX_l or SBMAX_s */ + FLOAT *s3; +} PsyConst_CB2SB_t; + + +/** + * global data constants + */ +typedef struct { + FLOAT window[BLKSIZE], window_s[BLKSIZE_s / 2]; + PsyConst_CB2SB_t l; + PsyConst_CB2SB_t s; + PsyConst_CB2SB_t l_to_s; + FLOAT attack_threshold[4]; + FLOAT decay; + int force_short_block_calc; +} PsyConst_t; + + +typedef struct { + + FLOAT nb_l1[4][CBANDS], nb_l2[4][CBANDS]; + FLOAT nb_s1[4][CBANDS], nb_s2[4][CBANDS]; + + III_psy_xmin thm[4]; + III_psy_xmin en[4]; + + /* loudness calculation (for adaptive threshold of hearing) */ + FLOAT loudness_sq_save[2]; /* account for granule delay of L3psycho_anal */ + + FLOAT tot_ener[4]; + + FLOAT last_en_subshort[4][9]; + int last_attacks[4]; + + int blocktype_old[2]; +} PsyStateVar_t; + + +typedef struct { + /* loudness calculation (for adaptive threshold of hearing) */ + FLOAT loudness_sq[2][2]; /* loudness^2 approx. per granule and channel */ +} PsyResult_t; + + +/* variables used by encoder.c */ +typedef struct { + /* variables for newmdct.c */ + FLOAT sb_sample[2][2][18][SBLIMIT]; + FLOAT amp_filter[32]; + + /* variables used by util.c */ + /* BPC = maximum number of filter convolution windows to precompute */ +#define BPC 320 + double itime[2]; /* float precision seems to be not enough */ + sample_t *inbuf_old[2]; + sample_t *blackfilt[2 * BPC + 1]; + + FLOAT pefirbuf[19]; + + /* used for padding */ + int frac_SpF; + int slot_lag; + + /* variables for bitstream.c */ + /* mpeg1: buffer=511 bytes smallest frame: 96-38(sideinfo)=58 + * max number of frames in reservoir: 8 + * mpeg2: buffer=255 bytes. smallest frame: 24-23bytes=1 + * with VBR, if you are encoding all silence, it is possible to + * have 8kbs/24khz frames with 1byte of data each, which means we need + * to buffer up to 255 headers! */ + /* also, max_header_buf has to be a power of two */ +#define MAX_HEADER_BUF 256 +#define MAX_HEADER_LEN 40 /* max size of header is 38 */ + struct { + int write_timing; + int ptr; + char buf[MAX_HEADER_LEN]; + } header[MAX_HEADER_BUF]; + + int h_ptr; + int w_ptr; + int ancillary_flag; + + /* variables for reservoir.c */ + int ResvSize; /* in bits */ + int ResvMax; /* in bits */ + + int in_buffer_nsamples; + sample_t *in_buffer_0; + sample_t *in_buffer_1; + +#ifndef MFSIZE +# define MFSIZE ( 3*1152 + ENCDELAY - MDCTDELAY ) +#endif + sample_t mfbuf[2][MFSIZE]; + + int mf_samples_to_encode; + int mf_size; + +} EncStateVar_t; + + +typedef struct { + /* simple statistics */ + int bitrate_channelmode_hist[16][4 + 1]; + int bitrate_blocktype_hist[16][4 + 1 + 1]; /*norm/start/short/stop/mixed(short)/sum */ + + int bitrate_index; + int frame_number; /* number of frames encoded */ + int padding; /* padding for the current frame? */ + int mode_ext; + int encoder_delay; + int encoder_padding; /* number of samples of padding appended to input */ +} EncResult_t; + + +/* variables used by quantize.c */ +typedef struct { + /* variables for nspsytune */ + FLOAT longfact[SBMAX_l]; + FLOAT shortfact[SBMAX_s]; + FLOAT masking_lower; + FLOAT mask_adjust; /* the dbQ stuff */ + FLOAT mask_adjust_short; /* the dbQ stuff */ + int OldValue[2]; + int CurrentStep[2]; + int pseudohalf[SFBMAX]; + int sfb21_extra; /* will be set in lame_init_params */ + int substep_shaping; /* 0 = no substep + 1 = use substep shaping at last step(VBR only) + (not implemented yet) + 2 = use substep inside loop + 3 = use substep inside loop and last step + */ + + + char bv_scf[576]; +} QntStateVar_t; + + +typedef struct { + replaygain_t *rgdata; + /* ReplayGain */ +} RpgStateVar_t; + + +typedef struct { + FLOAT noclipScale; /* user-specified scale factor required for preventing clipping */ + sample_t PeakSample; + int RadioGain; + int noclipGainChange; /* gain change required for preventing clipping */ +} RpgResult_t; + + +typedef struct { + int version; /* 0=MPEG-2/2.5 1=MPEG-1 */ + int samplerate_index; + int sideinfo_len; + + int noise_shaping; /* 0 = none + 1 = ISO AAC model + 2 = allow scalefac_select=1 + */ + + int subblock_gain; /* 0 = no, 1 = yes */ + int use_best_huffman; /* 0 = no. 1=outside loop 2=inside loop(slow) */ + int noise_shaping_amp; /* 0 = ISO model: amplify all distorted bands + 1 = amplify within 50% of max (on db scale) + 2 = amplify only most distorted band + 3 = method 1 and refine with method 2 + */ + + int noise_shaping_stop; /* 0 = stop at over=0, all scalefacs amplified or + a scalefac has reached max value + 1 = stop when all scalefacs amplified or + a scalefac has reached max value + 2 = stop when all scalefacs amplified + */ + + + int full_outer_loop; /* 0 = stop early after 0 distortion found. 1 = full search */ + + int lowpassfreq; + int highpassfreq; + int samplerate_in; /* input_samp_rate in Hz. default=44.1 kHz */ + int samplerate_out; /* output_samp_rate. */ + int channels_in; /* number of channels in the input data stream (PCM or decoded PCM) */ + int channels_out; /* number of channels in the output data stream (not used for decoding) */ + int mode_gr; /* granules per frame */ + int force_ms; /* force M/S mode. requires mode=1 */ + + int quant_comp; + int quant_comp_short; + + int use_temporal_masking_effect; + int use_safe_joint_stereo; + + int preset; + + vbr_mode vbr; + int vbr_avg_bitrate_kbps; + int vbr_min_bitrate_index; /* min bitrate index */ + int vbr_max_bitrate_index; /* max bitrate index */ + int avg_bitrate; + int enforce_min_bitrate; /* strictly enforce VBR_min_bitrate normaly, it will be violated for analog silence */ + + int findReplayGain; /* find the RG value? default=0 */ + int findPeakSample; + int decode_on_the_fly; /* decode on the fly? default=0 */ + int analysis; + int disable_reservoir; + int buffer_constraint; /* enforce ISO spec as much as possible */ + int free_format; + int write_lame_tag; /* add Xing VBR tag? */ + + int error_protection; /* use 2 bytes per frame for a CRC checksum. default=0 */ + int copyright; /* mark as copyright. default=0 */ + int original; /* mark as original. default=1 */ + int extension; /* the MP3 'private extension' bit. Meaningless */ + int emphasis; /* Input PCM is emphased PCM (for + instance from one of the rarely + emphased CDs), it is STRONGLY not + recommended to use this, because + psycho does not take it into account, + and last but not least many decoders + don't care about these bits */ + + + MPEG_mode mode; + short_block_t short_blocks; + + float interChRatio; + float msfix; /* Naoki's adjustment of Mid/Side maskings */ + float ATH_offset_db;/* add to ATH this many db */ + float ATH_offset_factor;/* change ATH by this factor, derived from ATH_offset_db */ + float ATHcurve; /* change ATH formula 4 shape */ + int ATHtype; + int ATHonly; /* only use ATH */ + int ATHshort; /* only use ATH for short blocks */ + int noATH; /* disable ATH */ + + float ATHfixpoint; + + float adjust_alto_db; + float adjust_bass_db; + float adjust_treble_db; + float adjust_sfb21_db; + + float compression_ratio; /* sizeof(wav file)/sizeof(mp3 file) */ + + /* lowpass and highpass filter control */ + FLOAT lowpass1, lowpass2; /* normalized frequency bounds of passband */ + FLOAT highpass1, highpass2; /* normalized frequency bounds of passband */ + + /* scale input by this amount before encoding at least not used for MP3 decoding */ + FLOAT pcm_transform[2][2]; + + FLOAT minval; +} SessionConfig_t; + + +struct lame_internal_flags { + + /******************************************************************** + * internal variables NOT set by calling program, and should not be * + * modified by the calling program * + ********************************************************************/ + + /* + * Some remarks to the Class_ID field: + * The Class ID is an Identifier for a pointer to this struct. + * It is very unlikely that a pointer to lame_global_flags has the same 32 bits + * in it's structure (large and other special properties, for instance prime). + * + * To test that the structure is right and initialized, use: + * if ( gfc -> Class_ID == LAME_ID ) ... + * Other remark: + * If you set a flag to 0 for uninit data and 1 for init data, the right test + * should be "if (flag == 1)" and NOT "if (flag)". Unintended modification + * of this element will be otherwise misinterpreted as an init. + */ +# define LAME_ID 0xFFF88E3B + unsigned long class_id; + + int lame_init_params_successful; + int lame_encode_frame_init; + int iteration_init_init; + int fill_buffer_resample_init; + + SessionConfig_t cfg; + + /* variables used by lame.c */ + Bit_stream_struc bs; + III_side_info_t l3_side; + + scalefac_struct scalefac_band; + + PsyStateVar_t sv_psy; /* DATA FROM PSYMODEL.C */ + PsyResult_t ov_psy; + EncStateVar_t sv_enc; /* DATA FROM ENCODER.C */ + EncResult_t ov_enc; + QntStateVar_t sv_qnt; /* DATA FROM QUANTIZE.C */ + + RpgStateVar_t sv_rpg; + RpgResult_t ov_rpg; + + /* optional ID3 tags, used in id3tag.c */ + struct id3tag_spec tag_spec; + uint16_t nMusicCRC; + + uint16_t _unused; + + /* CPU features */ + struct { + unsigned int MMX:1; /* Pentium MMX, Pentium II...IV, K6, K6-2, + K6-III, Athlon */ + unsigned int AMD_3DNow:1; /* K6-2, K6-III, Athlon */ + unsigned int SSE:1; /* Pentium III, Pentium 4 */ + unsigned int SSE2:1; /* Pentium 4, K8 */ + unsigned int _unused:28; + } CPU_features; + + + VBR_seek_info_t VBR_seek_table; /* used for Xing VBR header */ + + ATH_t *ATH; /* all ATH related stuff */ + + PsyConst_t *cd_psy; + + /* used by the frame analyzer */ + plotting_data *pinfo; + hip_t hip; + + /* functions to replace with CPU feature optimized versions in takehiro.c */ + int (*choose_table)(const int *ix, const int *const end, int *const s); + + void (*fft_fht)(FLOAT *, int); + + void (*init_xrpow_core)(gr_info *const cod_info, FLOAT xrpow[576], int upper, + FLOAT *sum); + + lame_report_function report_msg; + lame_report_function report_dbg; + lame_report_function report_err; +}; + +#ifndef lame_internal_flags_defined +#define lame_internal_flags_defined +typedef struct lame_internal_flags lame_internal_flags; +#endif + + +/*********************************************************************** +* +* Global Function Prototype Declarations +* +***********************************************************************/ +void freegfc(lame_internal_flags *const gfc); + +void free_id3tag(lame_internal_flags *const gfc); + +extern int BitrateIndex(int, int, int); + +extern int FindNearestBitrate(int, int, int); + +extern int map2MP3Frequency(int freq); + +extern int SmpFrqIndex(int, int *const); + +extern int nearestBitrateFullIndex(uint16_t brate); + +extern FLOAT ATHformula(SessionConfig_t const *cfg, FLOAT freq); + +extern FLOAT freq2bark(FLOAT freq); + +void disable_FPE(void); + +/* log/log10 approximations */ +extern void init_log_table(void); + +extern float fast_log2(float x); + +int isResamplingNecessary(SessionConfig_t const *cfg); + +void fill_buffer(lame_internal_flags *gfc, + sample_t *const mfbuf[2], + sample_t const *const in_buffer[2], int nsamples, int *n_in, int *n_out); + +/* same as lame_decode1 (look in lame.h), but returns + unclipped raw floating-point samples. It is declared + here, not in lame.h, because it returns LAME's + internal type sample_t. No more than 1152 samples + per channel are allowed. */ +int hip_decode1_unclipped(hip_t hip, unsigned char *mp3buf, + size_t len, sample_t pcm_l[], sample_t pcm_r[]); + + +extern int has_MMX(void); + +extern int has_3DNow(void); + +extern int has_SSE(void); + +extern int has_SSE2(void); + + +/*********************************************************************** +* +* Macros about Message Printing and Exit +* +***********************************************************************/ + +extern void lame_report_def(const char *format, va_list args); + +extern void lame_report_fnc(lame_report_function print_f, const char *, ...); + +extern void lame_errorf(const lame_internal_flags *gfc, const char *, ...); + +extern void lame_debugf(const lame_internal_flags *gfc, const char *, ...); + +extern void lame_msgf(const lame_internal_flags *gfc, const char *, ...); + +#define DEBUGF lame_debugf +#define ERRORF lame_errorf +#define MSGF lame_msgf + +int is_lame_internal_flags_valid(const lame_internal_flags *gfp); + +extern void hip_set_pinfo(hip_t hip, plotting_data *pinfo); + +#ifdef __cplusplus +} +#endif +#endif /* LAME_UTIL_H */ diff --git a/library/src/main/cpp/lamemp3/vbrquantize.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.c similarity index 83% rename from library/src/main/cpp/lamemp3/vbrquantize.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.c index 18ccc05..885448b 100644 --- a/library/src/main/cpp/lamemp3/vbrquantize.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.c @@ -37,22 +37,21 @@ #include "quantize_pvt.h" - - struct algo_s; typedef struct algo_s algo_t; -typedef void (*alloc_sf_f) (const algo_t *, const int *, const int *, int); -typedef uint8_t (*find_sf_f) (const FLOAT *, const FLOAT *, FLOAT, unsigned int, uint8_t); +typedef void (*alloc_sf_f)(const algo_t *, const int *, const int *, int); + +typedef uint8_t (*find_sf_f)(const FLOAT *, const FLOAT *, FLOAT, unsigned int, uint8_t); struct algo_s { alloc_sf_f alloc; - find_sf_f find; + find_sf_f find; const FLOAT *xr34orig; lame_internal_flags *gfc; gr_info *cod_info; - int mingain_l; - int mingain_s[3]; + int mingain_l; + int mingain_s[3]; }; @@ -77,18 +76,17 @@ struct algo_s { #endif typedef VOLATILE union { - float f; - int i; + float f; + int i; } fi_union; - #ifdef TAKEHIRO_IEEE754_HACK #define DOUBLEX double #else #define DOUBLEX FLOAT #endif - + #define MAGIC_FLOAT_def (65536*(128)) #define MAGIC_INT_def 0x4b000000 @@ -104,7 +102,7 @@ typedef VOLATILE union { *********************************************************************/ # define QUANTFAC(rx) adj43[rx] # define ROUNDFAC_def 0.4054f -# define XRPOW_FTOI(src,dest) ((dest) = (int)(src)) +# define XRPOW_FTOI(src, dest) ((dest) = (int)(src)) #endif static int const MAGIC_INT = MAGIC_INT_def; @@ -114,10 +112,9 @@ static DOUBLEX const ROUNDFAC = ROUNDFAC_def; static DOUBLEX const MAGIC_FLOAT = MAGIC_FLOAT_def; -inline static float -vec_max_c(const float * xr34, unsigned int bw) -{ - float xfsf = 0; +inline static float +vec_max_c(const float *xr34, unsigned int bw) { + float xfsf = 0; unsigned int i = bw >> 2u; unsigned int const remaining = (bw & 0x03u); @@ -136,19 +133,22 @@ vec_max_c(const float * xr34, unsigned int bw) } xr34 += 4; } - switch( remaining ) { - case 3: if (xfsf < xr34[2]) xfsf = xr34[2]; - case 2: if (xfsf < xr34[1]) xfsf = xr34[1]; - case 1: if (xfsf < xr34[0]) xfsf = xr34[0]; - default: break; + switch (remaining) { + case 3: + if (xfsf < xr34[2]) xfsf = xr34[2]; + case 2: + if (xfsf < xr34[1]) xfsf = xr34[1]; + case 1: + if (xfsf < xr34[0]) xfsf = xr34[0]; + default: + break; } return xfsf; } -inline static uint8_t -find_lowest_scalefac(const FLOAT xr34) -{ +inline static uint8_t +find_lowest_scalefac(const FLOAT xr34) { uint8_t sf_ok = 255; uint8_t sf = 128, delsf = 64; uint8_t i; @@ -158,8 +158,7 @@ find_lowest_scalefac(const FLOAT xr34) if (xfsf <= ixmax_val) { sf_ok = sf; sf -= delsf; - } - else { + } else { sf += delsf; } delsf >>= 1; @@ -169,8 +168,7 @@ find_lowest_scalefac(const FLOAT xr34) inline static void -k_34_4(DOUBLEX x[4], int l3[4]) -{ +k_34_4(DOUBLEX x[4], int l3[4]) { #ifdef TAKEHIRO_IEEE754_HACK fi_union fi[4]; @@ -209,22 +207,18 @@ k_34_4(DOUBLEX x[4], int l3[4]) } - - - /* do call the calc_sfb_noise_* functions only with sf values * for which holds: sfpow34*xr34 <= IXMAX_VAL */ -static FLOAT -calc_sfb_noise_x34(const FLOAT * xr, const FLOAT * xr34, unsigned int bw, uint8_t sf) -{ +static FLOAT +calc_sfb_noise_x34(const FLOAT *xr, const FLOAT *xr34, unsigned int bw, uint8_t sf) { DOUBLEX x[4]; - int l3[4]; + int l3[4]; const FLOAT sfpow = pow20[sf + Q_MAX2]; /*pow(2.0,sf/4.0); */ const FLOAT sfpow34 = ipow20[sf]; /*pow(sfpow,-3.0/4.0); */ - FLOAT xfsf = 0; + FLOAT xfsf = 0; unsigned int i = bw >> 2u; unsigned int const remaining = (bw & 0x03u); @@ -247,19 +241,25 @@ calc_sfb_noise_x34(const FLOAT * xr, const FLOAT * xr34, unsigned int bw, uint8_ } if (remaining) { x[0] = x[1] = x[2] = x[3] = 0; - switch( remaining ) { - case 3: x[2] = sfpow34 * xr34[2]; - case 2: x[1] = sfpow34 * xr34[1]; - case 1: x[0] = sfpow34 * xr34[0]; + switch (remaining) { + case 3: + x[2] = sfpow34 * xr34[2]; + case 2: + x[1] = sfpow34 * xr34[1]; + case 1: + x[0] = sfpow34 * xr34[0]; } k_34_4(x, l3); x[0] = x[1] = x[2] = x[3] = 0; - switch( remaining ) { - case 3: x[2] = fabsf(xr[2]) - sfpow * pow43[l3[2]]; - case 2: x[1] = fabsf(xr[1]) - sfpow * pow43[l3[1]]; - case 1: x[0] = fabsf(xr[0]) - sfpow * pow43[l3[0]]; + switch (remaining) { + case 3: + x[2] = fabsf(xr[2]) - sfpow * pow43[l3[2]]; + case 2: + x[1] = fabsf(xr[1]) - sfpow * pow43[l3[1]]; + case 1: + x[0] = fabsf(xr[0]) - sfpow * pow43[l3[0]]; } xfsf += (x[0] * x[0] + x[1] * x[1]) + (x[2] * x[2] + x[3] * x[3]); } @@ -267,19 +267,17 @@ calc_sfb_noise_x34(const FLOAT * xr, const FLOAT * xr34, unsigned int bw, uint8_ } - struct calc_noise_cache { - int valid; - FLOAT value; + int valid; + FLOAT value; }; typedef struct calc_noise_cache calc_noise_cache_t; -static uint8_t -tri_calc_sfb_noise_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsigned int bw, - uint8_t sf, calc_noise_cache_t * did_it) -{ +static uint8_t +tri_calc_sfb_noise_x34(const FLOAT *xr, const FLOAT *xr34, FLOAT l3_xmin, unsigned int bw, + uint8_t sf, calc_noise_cache_t *did_it) { if (did_it[sf].valid == 0) { did_it[sf].valid = 1; did_it[sf].value = calc_sfb_noise_x34(xr, xr34, bw, sf); @@ -316,15 +314,14 @@ tri_calc_sfb_noise_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsi * calculates quantization step size determined by allowed masking */ static int -calc_scalefac(FLOAT l3_xmin, int bw) -{ +calc_scalefac(FLOAT l3_xmin, int bw) { FLOAT const c = 5.799142446; /* 10 * 10^(2/3) * log10(4/3) */ return 210 + (int) (c * log10f(l3_xmin / bw) - .5f); } static uint8_t -guess_scalefac_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsigned int bw, uint8_t sf_min) -{ +guess_scalefac_x34(const FLOAT *xr, const FLOAT *xr34, FLOAT l3_xmin, unsigned int bw, + uint8_t sf_min) { int const guess = calc_scalefac(l3_xmin, bw); if (guess < sf_min) return sf_min; if (guess >= 255) return 255; @@ -345,10 +342,9 @@ guess_scalefac_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsigned * per band (shaping the noise). */ -static uint8_t -find_scalefac_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsigned int bw, - uint8_t sf_min) -{ +static uint8_t +find_scalefac_x34(const FLOAT *xr, const FLOAT *xr34, FLOAT l3_xmin, unsigned int bw, + uint8_t sf_min) { calc_noise_cache_t did_it[256]; uint8_t sf = 128, sf_ok = 255, delsf = 128, seen_good_one = 0, i; memset(did_it, 0, sizeof(did_it)); @@ -356,13 +352,11 @@ find_scalefac_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsigned delsf >>= 1; if (sf <= sf_min) { sf += delsf; - } - else { + } else { uint8_t const bad = tri_calc_sfb_noise_x34(xr, xr34, l3_xmin, bw, sf, did_it); if (bad) { /* distortion. try a smaller scalefactor */ sf -= delsf; - } - else { + } else { sf_ok = sf; sf += delsf; seen_good_one = 1; @@ -394,16 +388,15 @@ find_scalefac_x34(const FLOAT * xr, const FLOAT * xr34, FLOAT l3_xmin, unsigned /* a variation for vbr-mtrh */ static int -block_sf(algo_t * that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrsfmin[SFBMAX]) -{ - FLOAT max_xr34; +block_sf(algo_t *that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrsfmin[SFBMAX]) { + FLOAT max_xr34; const FLOAT *const xr = &that->cod_info->xr[0]; const FLOAT *const xr34_orig = &that->xr34orig[0]; const int *const width = &that->cod_info->width[0]; const char *const energy_above_cutoff = &that->cod_info->energy_above_cutoff[0]; unsigned int const max_nonzero_coeff = (unsigned int) that->cod_info->max_nonzero_coeff; uint8_t maxsf = 0; - int sfb = 0, m_o = -1; + int sfb = 0, m_o = -1; unsigned int j = 0, i = 0; int const psymax = that->cod_info->psymax; @@ -434,7 +427,8 @@ block_sf(algo_t * that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrs if (++i > 2) { i = 0; } - if (sfb < psymax && w > 2) { /* mpeg2.5 at 8 kHz doesn't use all scalefactors, unused have width 2 */ + if (sfb < psymax && + w > 2) { /* mpeg2.5 at 8 kHz doesn't use all scalefactors, unused have width 2 */ if (energy_above_cutoff[sfb]) { m2 = that->find(&xr[j], &xr34_orig[j], l3_xmin[sfb], l, m1); #if 0 @@ -455,13 +449,11 @@ block_sf(algo_t * that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrs if (m_o < m2 && m2 < 255) { m_o = m2; } - } - else { + } else { m2 = 255; maxsf = 255; } - } - else { + } else { if (maxsf < m1) { maxsf = m1; } @@ -469,7 +461,7 @@ block_sf(algo_t * that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrs } vbrsf[sfb] = m2; ++sfb; - j += w; + j += w; } for (; sfb < SFBMAX; ++sfb) { vbrsf[sfb] = maxsf; @@ -487,7 +479,6 @@ block_sf(algo_t * that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrs } - /*********************************************************************** * * quantize xr34 based on scalefactors @@ -500,13 +491,12 @@ block_sf(algo_t * that, const FLOAT l3_xmin[SFBMAX], int vbrsf[SFBMAX], int vbrs ***********************************************************************/ static void -quantize_x34(const algo_t * that) -{ +quantize_x34(const algo_t *that) { DOUBLEX x[4]; const FLOAT *xr34_orig = that->xr34orig; gr_info *const cod_info = that->cod_info; int const ifqstep = (cod_info->scalefac_scale == 0) ? 2 : 4; - int *l3 = cod_info->l3_enc; + int *l3 = cod_info->l3_enc; unsigned int j = 0, sfb = 0; unsigned int const max_nonzero_coeff = (unsigned int) cod_info->max_nonzero_coeff; @@ -515,8 +505,8 @@ quantize_x34(const algo_t * that) while (j <= max_nonzero_coeff) { int const s = - (cod_info->scalefac[sfb] + (cod_info->preflag ? pretab[sfb] : 0)) * ifqstep - + cod_info->subblock_gain[cod_info->window[sfb]] * 8; + (cod_info->scalefac[sfb] + (cod_info->preflag ? pretab[sfb] : 0)) * ifqstep + + cod_info->subblock_gain[cod_info->window[sfb]] * 8; uint8_t const sfac = (uint8_t) (cod_info->global_gain - s); FLOAT const sfpow34 = ipow20[sfac]; unsigned int const w = (unsigned int) cod_info->width[sfb]; @@ -527,7 +517,7 @@ quantize_x34(const algo_t * that) assert(cod_info->width[sfb] >= 0); j += w; ++sfb; - + i = (w <= m) ? w : m; remaining = (i & 0x03u); i >>= 2u; @@ -546,18 +536,24 @@ quantize_x34(const algo_t * that) if (remaining) { int tmp_l3[4]; x[0] = x[1] = x[2] = x[3] = 0; - switch( remaining ) { - case 3: x[2] = sfpow34 * xr34_orig[2]; - case 2: x[1] = sfpow34 * xr34_orig[1]; - case 1: x[0] = sfpow34 * xr34_orig[0]; + switch (remaining) { + case 3: + x[2] = sfpow34 * xr34_orig[2]; + case 2: + x[1] = sfpow34 * xr34_orig[1]; + case 1: + x[0] = sfpow34 * xr34_orig[0]; } k_34_4(x, tmp_l3); - switch( remaining ) { - case 3: l3[2] = tmp_l3[2]; - case 2: l3[1] = tmp_l3[1]; - case 1: l3[0] = tmp_l3[0]; + switch (remaining) { + case 3: + l3[2] = tmp_l3[2]; + case 2: + l3[1] = tmp_l3[1]; + case 1: + l3[0] = tmp_l3[0]; } l3 += remaining; @@ -567,23 +563,21 @@ quantize_x34(const algo_t * that) } - static const uint8_t max_range_short[SBMAX_s * 3] = { - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 0, 0, 0 + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 0, 0, 0 }; static const uint8_t max_range_long[SBMAX_l] = { - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0 + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0 }; static const uint8_t max_range_long_lsf_pretab[SBMAX_l] = { - 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - /* sfb=0..5 scalefac < 16 sfb>5 scalefac < 8 @@ -595,22 +589,21 @@ static const uint8_t max_range_long_lsf_pretab[SBMAX_l] = { */ static void -set_subblock_gain(gr_info * cod_info, const int mingain_s[3], int sf[]) -{ +set_subblock_gain(gr_info *cod_info, const int mingain_s[3], int sf[]) { const int maxrange1 = 15, maxrange2 = 7; const int ifqstepShift = (cod_info->scalefac_scale == 0) ? 1 : 2; - int *const sbg = cod_info->subblock_gain; + int *const sbg = cod_info->subblock_gain; unsigned int const psymax = (unsigned int) cod_info->psymax; unsigned int psydiv = 18; - int sbg0, sbg1, sbg2; + int sbg0, sbg1, sbg2; unsigned int sfb, i; - int min_sbg = 7; + int min_sbg = 7; if (psydiv > psymax) { psydiv = psymax; } for (i = 0; i < 3; ++i) { - int maxsf1 = 0, maxsf2 = 0, minsf = 1000; + int maxsf1 = 0, maxsf2 = 0, minsf = 1000; /* see if we should use subblock gain */ for (sfb = i; sfb < psydiv; sfb += 3) { /* part 1 */ int const v = -sf[sfb]; @@ -643,8 +636,7 @@ set_subblock_gain(gr_info * cod_info, const int mingain_s[3], int sf[]) } if (minsf > 0) { sbg[i] = minsf >> 3; - } - else { + } else { sbg[i] = 0; } if (maxsf1 > 0) { @@ -679,7 +671,6 @@ set_subblock_gain(gr_info * cod_info, const int mingain_s[3], int sf[]) } - /* ifqstep = ( cod_info->scalefac_scale == 0 ) ? 2 : 4; ol_sf = (cod_info->global_gain-210.0); @@ -688,13 +679,12 @@ set_subblock_gain(gr_info * cod_info, const int mingain_s[3], int sf[]) ol_sf -= ifqstep*pretab[sfb]; */ static void -set_scalefacs(gr_info * cod_info, const int *vbrsfmin, int sf[], const uint8_t * max_range) -{ +set_scalefacs(gr_info *cod_info, const int *vbrsfmin, int sf[], const uint8_t *max_range) { const int ifqstep = (cod_info->scalefac_scale == 0) ? 2 : 4; const int ifqstepShift = (cod_info->scalefac_scale == 0) ? 1 : 2; - int *const scalefac = cod_info->scalefac; + int *const scalefac = cod_info->scalefac; int const sfbmax = cod_info->sfbmax; - int sfb; + int sfb; int const *const sbg = cod_info->subblock_gain; int const *const window = cod_info->window; int const preflag = cod_info->preflag; @@ -706,7 +696,7 @@ set_scalefacs(gr_info * cod_info, const int *vbrsfmin, int sf[], const uint8_t * } for (sfb = 0; sfb < sfbmax; ++sfb) { int const gain = cod_info->global_gain - (sbg[window[sfb]] * 8) - - ((preflag ? pretab[sfb] : 0) * ifqstep); + - ((preflag ? pretab[sfb] : 0) * ifqstep); if (sf[sfb] < 0) { int const m = gain - vbrsfmin[sfb]; @@ -719,8 +709,7 @@ set_scalefacs(gr_info * cod_info, const int *vbrsfmin, int sf[], const uint8_t * if (scalefac[sfb] > 0 && (scalefac[sfb] << ifqstepShift) > m) { scalefac[sfb] = m >> ifqstepShift; } - } - else { + } else { scalefac[sfb] = 0; } } @@ -731,16 +720,16 @@ set_scalefacs(gr_info * cod_info, const int *vbrsfmin, int sf[], const uint8_t * #ifndef NDEBUG + static int -checkScalefactor(const gr_info * cod_info, const int vbrsfmin[SFBMAX]) -{ +checkScalefactor(const gr_info *cod_info, const int vbrsfmin[SFBMAX]) { int const ifqstep = cod_info->scalefac_scale == 0 ? 2 : 4; - int sfb; + int sfb; for (sfb = 0; sfb < cod_info->psymax; ++sfb) { const int s = - ((cod_info->scalefac[sfb] + - (cod_info->preflag ? pretab[sfb] : 0)) * ifqstep) + - cod_info->subblock_gain[cod_info->window[sfb]] * 8; + ((cod_info->scalefac[sfb] + + (cod_info->preflag ? pretab[sfb] : 0)) * ifqstep) + + cod_info->subblock_gain[cod_info->window[sfb]] * 8; if ((cod_info->global_gain - s) < vbrsfmin[sfb]) { /* @@ -759,6 +748,7 @@ checkScalefactor(const gr_info * cod_info, const int vbrsfmin[SFBMAX]) } return 1; } + #endif @@ -769,16 +759,15 @@ checkScalefactor(const gr_info * cod_info, const int vbrsfmin[SFBMAX]) ******************************************************************/ static void -short_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], - const int vbrsfmin[SFBMAX], int vbrmax) -{ +short_block_constrain(const algo_t *that, const int vbrsf[SFBMAX], + const int vbrsfmin[SFBMAX], int vbrmax) { gr_info *const cod_info = that->cod_info; lame_internal_flags const *const gfc = that->gfc; SessionConfig_t const *const cfg = &gfc->cfg; int const maxminsfb = that->mingain_l; - int mover, maxover0 = 0, maxover1 = 0, delta = 0; - int v, v0, v1; - int sfb; + int mover, maxover0 = 0, maxover1 = 0, delta = 0; + int v, v0, v1; + int sfb; int const psymax = cod_info->psymax; for (sfb = 0; sfb < psymax; ++sfb) { @@ -799,8 +788,7 @@ short_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], if (cfg->noise_shaping == 2) { /* allow scalefac_scale=1 */ mover = Min(maxover0, maxover1); - } - else { + } else { mover = maxover0; } if (delta > mover) { @@ -812,8 +800,7 @@ short_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], if (maxover0 == 0) { cod_info->scalefac_scale = 0; - } - else if (maxover1 == 0) { + } else if (maxover1 == 0) { cod_info->scalefac_scale = 1; } if (vbrmax < maxminsfb) { @@ -823,12 +810,11 @@ short_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], if (cod_info->global_gain < 0) { cod_info->global_gain = 0; - } - else if (cod_info->global_gain > 255) { + } else if (cod_info->global_gain > 255) { cod_info->global_gain = 255; } { - int sf_temp[SFBMAX]; + int sf_temp[SFBMAX]; for (sfb = 0; sfb < SFBMAX; ++sfb) { sf_temp[sfb] = vbrsf[sfb] - vbrmax; } @@ -839,7 +825,6 @@ short_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], } - /****************************************************************** * * long block scalefacs @@ -847,17 +832,16 @@ short_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], ******************************************************************/ static void -long_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], const int vbrsfmin[SFBMAX], - int vbrmax) -{ +long_block_constrain(const algo_t *that, const int vbrsf[SFBMAX], const int vbrsfmin[SFBMAX], + int vbrmax) { gr_info *const cod_info = that->cod_info; lame_internal_flags const *const gfc = that->gfc; SessionConfig_t const *const cfg = &gfc->cfg; uint8_t const *max_rangep; int const maxminsfb = that->mingain_l; - int sfb; - int maxover0, maxover1, maxover0p, maxover1p, mover, delta = 0; - int v, v0, v1, v0p, v1p, vm0p = 1, vm1p = 1; + int sfb; + int maxover0, maxover1, maxover0p, maxover1p, mover, delta = 0; + int v, v0, v1, v0p, v1p, vm0p = 1, vm1p = 1; int const psymax = cod_info->psymax; max_rangep = cfg->mode_gr == 2 ? max_range_long : max_range_long_lsf_pretab; @@ -891,7 +875,7 @@ long_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], const int vbr } } if (vm0p == 1) { - int gain = vbrmax - maxover0p; + int gain = vbrmax - maxover0p; if (gain < maxminsfb) { gain = maxminsfb; } @@ -905,7 +889,7 @@ long_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], const int vbr } } if (vm1p == 1) { - int gain = vbrmax - maxover1p; + int gain = vbrmax - maxover1p; if (gain < maxminsfb) { gain = maxminsfb; } @@ -947,32 +931,27 @@ long_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], const int vbr cod_info->scalefac_scale = 0; cod_info->preflag = 0; max_rangep = max_range_long; - } - else if (maxover0p == 0) { + } else if (maxover0p == 0) { cod_info->scalefac_scale = 0; cod_info->preflag = 1; - } - else if (maxover1 == 0) { + } else if (maxover1 == 0) { cod_info->scalefac_scale = 1; cod_info->preflag = 0; max_rangep = max_range_long; - } - else if (maxover1p == 0) { + } else if (maxover1p == 0) { cod_info->scalefac_scale = 1; cod_info->preflag = 1; - } - else { + } else { assert(0); /* this should not happen */ } cod_info->global_gain = vbrmax; if (cod_info->global_gain < 0) { cod_info->global_gain = 0; - } - else if (cod_info->global_gain > 255) { + } else if (cod_info->global_gain > 255) { cod_info->global_gain = 255; } { - int sf_temp[SFBMAX]; + int sf_temp[SFBMAX]; for (sfb = 0; sfb < SFBMAX; ++sfb) { sf_temp[sfb] = vbrsf[sfb] - vbrmax; } @@ -982,11 +961,9 @@ long_block_constrain(const algo_t * that, const int vbrsf[SFBMAX], const int vbr } - static void -bitcount(const algo_t * that) -{ - int rc = scale_bitcount(that->gfc, that->cod_info); +bitcount(const algo_t *that) { + int rc = scale_bitcount(that->gfc, that->cod_info); if (rc == 0) { return; @@ -997,26 +974,20 @@ bitcount(const algo_t * that) } - static int -quantizeAndCountBits(const algo_t * that) -{ +quantizeAndCountBits(const algo_t *that) { quantize_x34(that); that->cod_info->part2_3_length = noquant_count_bits(that->gfc, that->cod_info, 0); return that->cod_info->part2_3_length; } - - - static int -tryGlobalStepsize(const algo_t * that, const int sfwork[SFBMAX], - const int vbrsfmin[SFBMAX], int delta) -{ +tryGlobalStepsize(const algo_t *that, const int sfwork[SFBMAX], + const int vbrsfmin[SFBMAX], int delta) { FLOAT const xrpow_max = that->cod_info->xrpow_max; - int sftemp[SFBMAX], i, nbits; - int gain, vbrmax = 0; + int sftemp[SFBMAX], i, nbits; + int gain, vbrmax = 0; for (i = 0; i < SFBMAX; ++i) { gain = sfwork[i] + delta; if (gain < vbrsfmin[i]) { @@ -1038,17 +1009,15 @@ tryGlobalStepsize(const algo_t * that, const int sfwork[SFBMAX], } - static void -searchGlobalStepsizeMax(const algo_t * that, const int sfwork[SFBMAX], - const int vbrsfmin[SFBMAX], int target) -{ +searchGlobalStepsizeMax(const algo_t *that, const int sfwork[SFBMAX], + const int vbrsfmin[SFBMAX], int target) { gr_info const *const cod_info = that->cod_info; const int gain = cod_info->global_gain; - int curr = gain; - int gain_ok = 1024; - int nbits = LARGE_BITS; - int l = gain, r = 512; + int curr = gain; + int gain_ok = 1024; + int nbits = LARGE_BITS; + int l = gain, r = 512; assert(gain >= 0); while (l <= r) { @@ -1057,8 +1026,7 @@ searchGlobalStepsizeMax(const algo_t * that, const int sfwork[SFBMAX], if (nbits == 0 || (nbits + cod_info->part2_length) < target) { r = curr - 1; gain_ok = curr; - } - else { + } else { l = curr + 1; if (gain_ok == 1024) { gain_ok = curr; @@ -1072,11 +1040,9 @@ searchGlobalStepsizeMax(const algo_t * that, const int sfwork[SFBMAX], } - static int -sfDepth(const int sfwork[SFBMAX]) -{ - int m = 0; +sfDepth(const int sfwork[SFBMAX]) { + int m = 0; unsigned int i, j; for (j = SFBMAX, i = 0; j > 0; --j, ++i) { int const di = 255 - sfwork[i]; @@ -1093,8 +1059,7 @@ sfDepth(const int sfwork[SFBMAX]) static void -cutDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int cut) -{ +cutDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int cut) { unsigned int i, j; for (j = SFBMAX, i = 0; j > 0; --j, ++i) { int const x = sfwork[i]; @@ -1104,18 +1069,16 @@ cutDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int cut) static int -flattenDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int dm, int k, int p) -{ +flattenDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int dm, int k, int p) { unsigned int i, j; - int x, sfmax = 0; + int x, sfmax = 0; if (dm > 0) { for (j = SFBMAX, i = 0; j > 0; --j, ++i) { int const di = p - sfwork[i]; x = sfwork[i] + (k * di) / dm; if (x < 0) { x = 0; - } - else { + } else { if (x > 255) { x = 255; } @@ -1125,8 +1088,7 @@ flattenDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int dm, int k, sfmax = x; } } - } - else { + } else { for (j = SFBMAX, i = 0; j > 0u; --j, ++i) { x = sfwork[i]; sf_out[i] = x; @@ -1140,10 +1102,9 @@ flattenDistribution(const int sfwork[SFBMAX], int sf_out[SFBMAX], int dm, int k, static int -tryThatOne(algo_t const* that, const int sftemp[SFBMAX], const int vbrsfmin[SFBMAX], int vbrmax) -{ +tryThatOne(algo_t const *that, const int sftemp[SFBMAX], const int vbrsfmin[SFBMAX], int vbrmax) { FLOAT const xrpow_max = that->cod_info->xrpow_max; - int nbits = LARGE_BITS; + int nbits = LARGE_BITS; that->alloc(that, sftemp, vbrsfmin, vbrmax); bitcount(that); nbits = quantizeAndCountBits(that); @@ -1154,33 +1115,31 @@ tryThatOne(algo_t const* that, const int sftemp[SFBMAX], const int vbrsfmin[SFBM static void -outOfBitsStrategy(algo_t const* that, const int sfwork[SFBMAX], const int vbrsfmin[SFBMAX], int target) -{ - int wrk[SFBMAX]; +outOfBitsStrategy(algo_t const *that, const int sfwork[SFBMAX], const int vbrsfmin[SFBMAX], + int target) { + int wrk[SFBMAX]; int const dm = sfDepth(sfwork); int const p = that->cod_info->global_gain; - int nbits; + int nbits; /* PART 1 */ { - int bi = dm / 2; - int bi_ok = -1; - int bu = 0; - int bo = dm; + int bi = dm / 2; + int bi_ok = -1; + int bu = 0; + int bo = dm; for (;;) { int const sfmax = flattenDistribution(sfwork, wrk, dm, bi, p); nbits = tryThatOne(that, wrk, vbrsfmin, sfmax); if (nbits <= target) { bi_ok = bi; bo = bi - 1; - } - else { + } else { bu = bi + 1; } if (bu <= bo) { bi = (bu + bo) / 2; - } - else { + } else { break; } } @@ -1195,24 +1154,22 @@ outOfBitsStrategy(algo_t const* that, const int sfwork[SFBMAX], const int vbrsfm /* PART 2: */ { - int bi = (255 + p) / 2; - int bi_ok = -1; - int bu = p; - int bo = 255; + int bi = (255 + p) / 2; + int bi_ok = -1; + int bu = p; + int bo = 255; for (;;) { int const sfmax = flattenDistribution(sfwork, wrk, dm, dm, bi); nbits = tryThatOne(that, wrk, vbrsfmin, sfmax); if (nbits <= target) { bi_ok = bi; bo = bi - 1; - } - else { + } else { bu = bi + 1; } if (bu <= bo) { bi = (bu + bo) / 2; - } - else { + } else { break; } } @@ -1231,12 +1188,11 @@ outOfBitsStrategy(algo_t const* that, const int sfwork[SFBMAX], const int vbrsfm static int -reduce_bit_usage(lame_internal_flags * gfc, int gr, int ch +reduce_bit_usage(lame_internal_flags *gfc, int gr, int ch #if 0 - , const FLOAT xr34orig[576], const FLOAT l3_xmin[SFBMAX], int maxbits + , const FLOAT xr34orig[576], const FLOAT l3_xmin[SFBMAX], int maxbits #endif - ) -{ +) { SessionConfig_t const *const cfg = &gfc->cfg; gr_info *const cod_info = &gfc->l3_side.tt[gr][ch]; /* try some better scalefac storage @@ -1251,27 +1207,25 @@ reduce_bit_usage(lame_internal_flags * gfc, int gr, int ch } - - int -VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], - const FLOAT l3_xmin[2][2][SFBMAX], const int max_bits[2][2]) -{ +VBR_encode_frame(lame_internal_flags *gfc, const FLOAT xr34orig[2][2][576], + const FLOAT l3_xmin[2][2][SFBMAX], const int max_bits[2][2]) { SessionConfig_t const *const cfg = &gfc->cfg; - int sfwork_[2][2][SFBMAX]; - int vbrsfmin_[2][2][SFBMAX]; - algo_t that_[2][2]; + int sfwork_[2][2][SFBMAX]; + int vbrsfmin_[2][2][SFBMAX]; + algo_t that_[2][2]; int const ngr = cfg->mode_gr; int const nch = cfg->channels_out; - int max_nbits_ch[2][2] = {{0, 0}, {0 ,0}}; - int max_nbits_gr[2] = {0, 0}; - int max_nbits_fr = 0; - int use_nbits_ch[2][2] = {{MAX_BITS_PER_CHANNEL+1, MAX_BITS_PER_CHANNEL+1} - ,{MAX_BITS_PER_CHANNEL+1, MAX_BITS_PER_CHANNEL+1}}; - int use_nbits_gr[2] = { MAX_BITS_PER_GRANULE+1, MAX_BITS_PER_GRANULE+1 }; - int use_nbits_fr = MAX_BITS_PER_GRANULE+MAX_BITS_PER_GRANULE; - int gr, ch; - int ok, sum_fr; + int max_nbits_ch[2][2] = {{0, 0}, + {0, 0}}; + int max_nbits_gr[2] = {0, 0}; + int max_nbits_fr = 0; + int use_nbits_ch[2][2] = {{MAX_BITS_PER_CHANNEL + 1, MAX_BITS_PER_CHANNEL + 1}, + {MAX_BITS_PER_CHANNEL + 1, MAX_BITS_PER_CHANNEL + 1}}; + int use_nbits_gr[2] = {MAX_BITS_PER_GRANULE + 1, MAX_BITS_PER_GRANULE + 1}; + int use_nbits_fr = MAX_BITS_PER_GRANULE + MAX_BITS_PER_GRANULE; + int gr, ch; + int ok, sum_fr; /* set up some encoding parameters */ @@ -1282,14 +1236,14 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], use_nbits_ch[gr][ch] = 0; max_nbits_gr[gr] += max_bits[gr][ch]; max_nbits_fr += max_bits[gr][ch]; - that_[gr][ch].find = (cfg->full_outer_loop < 0) ? guess_scalefac_x34 : find_scalefac_x34; + that_[gr][ch].find = (cfg->full_outer_loop < 0) ? guess_scalefac_x34 + : find_scalefac_x34; that_[gr][ch].gfc = gfc; that_[gr][ch].cod_info = &gfc->l3_side.tt[gr][ch]; that_[gr][ch].xr34orig = xr34orig[gr][ch]; if (that_[gr][ch].cod_info->block_type == SHORT_TYPE) { that_[gr][ch].alloc = short_block_constrain; - } - else { + } else { that_[gr][ch].alloc = long_block_constrain; } } /* for ch */ @@ -1300,15 +1254,14 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], for (ch = 0; ch < nch; ++ch) { if (max_bits[gr][ch] > 0) { algo_t *that = &that_[gr][ch]; - int *sfwork = sfwork_[gr][ch]; - int *vbrsfmin = vbrsfmin_[gr][ch]; - int vbrmax; + int *sfwork = sfwork_[gr][ch]; + int *vbrsfmin = vbrsfmin_[gr][ch]; + int vbrmax; vbrmax = block_sf(that, l3_xmin[gr][ch], sfwork, vbrsfmin); that->alloc(that, sfwork, vbrsfmin, vbrmax); bitcount(that); - } - else { + } else { /* xr contains no energy * l3_enc, our encoding data, will be quantized to zero * continue with next channel @@ -1326,8 +1279,7 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], if (max_bits[gr][ch] > 0) { memset(&that->cod_info->l3_enc[0], 0, sizeof(that->cod_info->l3_enc)); (void) quantizeAndCountBits(that); - } - else { + } else { /* xr contains no energy * l3_enc, our encoding data, will be quantized to zero * continue with next channel @@ -1367,7 +1319,7 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], return use_nbits_fr; } } - + /* OK, we are in trouble and have to define how many bits are * to be used for each granule */ @@ -1380,28 +1332,25 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], for (ch = 0; ch < nch; ++ch) { if (use_nbits_ch[gr][ch] > MAX_BITS_PER_CHANNEL) { max_nbits_ch[gr][ch] = MAX_BITS_PER_CHANNEL; - } - else { + } else { max_nbits_ch[gr][ch] = use_nbits_ch[gr][ch]; } max_nbits_gr[gr] += max_nbits_ch[gr][ch]; } if (max_nbits_gr[gr] > MAX_BITS_PER_GRANULE) { - float f[2] = {0.0f, 0.0f}, s = 0.0f; + float f[2] = {0.0f, 0.0f}, s = 0.0f; for (ch = 0; ch < nch; ++ch) { if (max_nbits_ch[gr][ch] > 0) { f[ch] = sqrt(sqrt(max_nbits_ch[gr][ch])); s += f[ch]; - } - else { + } else { f[ch] = 0; } } for (ch = 0; ch < nch; ++ch) { if (s > 0) { max_nbits_ch[gr][ch] = MAX_BITS_PER_GRANULE * f[ch] / s; - } - else { + } else { max_nbits_ch[gr][ch] = 0; } } @@ -1432,21 +1381,19 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], } if (sum_fr > max_nbits_fr) { { - float f[2] = {0.0f, 0.0f}, s = 0.0f; + float f[2] = {0.0f, 0.0f}, s = 0.0f; for (gr = 0; gr < ngr; ++gr) { if (max_nbits_gr[gr] > 0) { f[gr] = sqrt(max_nbits_gr[gr]); s += f[gr]; - } - else { + } else { f[gr] = 0; } } for (gr = 0; gr < ngr; ++gr) { if (s > 0) { max_nbits_gr[gr] = max_nbits_fr * f[gr] / s; - } - else { + } else { max_nbits_gr[gr] = 0; } } @@ -1469,21 +1416,19 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], } } for (gr = 0; gr < ngr; ++gr) { - float f[2] = {0.0f, 0.0f}, s = 0.0f; + float f[2] = {0.0f, 0.0f}, s = 0.0f; for (ch = 0; ch < nch; ++ch) { if (max_nbits_ch[gr][ch] > 0) { f[ch] = sqrt(max_nbits_ch[gr][ch]); s += f[ch]; - } - else { + } else { f[ch] = 0; } } for (ch = 0; ch < nch; ++ch) { if (s > 0) { max_nbits_ch[gr][ch] = max_nbits_gr[gr] * f[ch] / s; - } - else { + } else { max_nbits_ch[gr][ch] = 0; } } @@ -1509,7 +1454,7 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], /* sanity check */ sum_fr = 0; for (gr = 0; gr < ngr; ++gr) { - int sum_gr = 0; + int sum_gr = 0; for (ch = 0; ch < nch; ++ch) { sum_gr += max_nbits_ch[gr][ch]; if (max_nbits_ch[gr][ch] > MAX_BITS_PER_CHANNEL) { @@ -1558,7 +1503,7 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], algo_t const *that = &that_[gr][ch]; use_nbits_ch[gr][ch] = 0; if (max_bits[gr][ch] > 0) { - int *sfwork = sfwork_[gr][ch]; + int *sfwork = sfwork_[gr][ch]; int const *vbrsfmin = vbrsfmin_[gr][ch]; cutDistribution(sfwork, sfwork, that->cod_info->global_gain); outOfBitsStrategy(that, sfwork, vbrsfmin, max_nbits_ch[gr][ch]); @@ -1577,6 +1522,6 @@ VBR_encode_frame(lame_internal_flags * gfc, const FLOAT xr34orig[2][2][576], } ERRORF(gfc, "INTERNAL ERROR IN VBR NEW CODE (1313), please send bug report\n" - "maxbits=%d usedbits=%d\n", max_nbits_fr, use_nbits_fr); + "maxbits=%d usedbits=%d\n", max_nbits_fr, use_nbits_fr); exit(-1); } diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.h new file mode 100644 index 0000000..8d3d302 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vbrquantize.h @@ -0,0 +1,28 @@ +/* + * MP3 VBR quantization + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_VBRQUANTIZE_H +#define LAME_VBRQUANTIZE_H + +int VBR_encode_frame(lame_internal_flags *gfc, const FLOAT xr34orig[2][2][576], + const FLOAT l3_xmin[2][2][SFBMAX], const int maxbits[2][2]); + +#endif /* LAME_VBRQUANTIZE_H */ diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/lame_intrin.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/lame_intrin.h new file mode 100644 index 0000000..63e91a6 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/lame_intrin.h @@ -0,0 +1,33 @@ +/* + * lame_intrin.h include file + * + * Copyright (c) 2006 Gabriel Bouvigne + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef LAME_INTRIN_H +#define LAME_INTRIN_H + + +void +init_xrpow_core_sse(gr_info *const cod_info, FLOAT xrpow[576], int upper, FLOAT *sum); + +void +fht_SSE2(FLOAT *, int); + +#endif diff --git a/library/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c similarity index 99% rename from library/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c index c61f76a..cda5e94 100644 --- a/library/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/vector/xmm_quantize_sub.c @@ -31,7 +31,6 @@ #include "lame_intrin.h" - #ifdef HAVE_XMMINTRIN_H #include @@ -236,5 +235,5 @@ fht_SSE2(FLOAT * fz, int n) } while (k4 < n); } -#endif /* HAVE_XMMINTRIN_H */ +#endif /* HAVE_XMMINTRIN_H */ diff --git a/library/src/main/cpp/lamemp3/version.c b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.c similarity index 87% rename from library/src/main/cpp/lamemp3/version.c rename to Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.c index 2943406..d88b4a8 100644 --- a/library/src/main/cpp/lamemp3/version.c +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.c @@ -51,8 +51,7 @@ \return a pointer to a string which describes the version of LAME. */ const char * -get_lame_version(void) -{ /* primary to write screen reports */ +get_lame_version(void) { /* primary to write screen reports */ /* Here we can also add informations about compile time configurations */ #if LAME_ALPHA_VERSION @@ -68,7 +67,7 @@ get_lame_version(void) STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) "." STR(LAME_PATCH_VERSION); #else static /*@observer@ */ const char *const str = - STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION); + STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION); #endif return str; @@ -83,8 +82,7 @@ get_lame_version(void) \return a pointer to the short version of the LAME version string. */ const char * -get_lame_short_version(void) -{ +get_lame_short_version(void) { /* adding date and time to version string makes it harder for output validation */ @@ -99,7 +97,7 @@ get_lame_short_version(void) STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) "." STR(LAME_PATCH_VERSION); #else static /*@observer@ */ const char *const str = - STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION); + STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION); #endif return str; @@ -113,8 +111,7 @@ get_lame_short_version(void) \return a pointer to the short version of the LAME version string. */ const char * -get_lame_very_short_version(void) -{ +get_lame_very_short_version(void) { /* adding date and time to version string makes it harder for output validation */ #if LAME_ALPHA_VERSION @@ -128,11 +125,11 @@ get_lame_very_short_version(void) #endif static /*@observer@ */ const char *const str = #if (LAME_PATCH_VERSION > 0) - "LAME" STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) P STR(LAME_PATCH_VERSION) + "LAME" STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) P STR(LAME_PATCH_VERSION) #else - "LAME" STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) P + "LAME" STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) P #endif - ; + ; return str; } @@ -144,13 +141,11 @@ get_lame_very_short_version(void) \param void \return a pointer to the short version of the LAME version string. */ -const char* -get_lame_tag_encoder_short_version(void) -{ +const char * +get_lame_tag_encoder_short_version(void) { static /*@observer@ */ const char *const str = /* FIXME: new scheme / new version counting / drop versioning here ? */ - "LAME" STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) P - ; + "LAME" STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) P; return str; } @@ -160,8 +155,7 @@ get_lame_tag_encoder_short_version(void) \return a pointer to a string which describes the version of GPSYCHO. */ const char * -get_psy_version(void) -{ +get_psy_version(void) { #if PSY_ALPHA_VERSION > 0 static /*@observer@ */ const char *const str = STR(PSY_MAJOR_VERSION) "." STR(PSY_MINOR_VERSION) @@ -172,7 +166,7 @@ get_psy_version(void) " (beta " STR(PSY_BETA_VERSION) ", " __DATE__ ")"; #else static /*@observer@ */ const char *const str = - STR(PSY_MAJOR_VERSION) "." STR(PSY_MINOR_VERSION); + STR(PSY_MAJOR_VERSION) "." STR(PSY_MINOR_VERSION); #endif return str; @@ -185,8 +179,7 @@ get_psy_version(void) \return a pointer to a string which is a URL for the LAME website. */ const char * -get_lame_url(void) -{ +get_lame_url(void) { static /*@observer@ */ const char *const str = LAME_URL; return str; @@ -201,8 +194,7 @@ get_lame_url(void) \param lvp */ void -get_lame_version_numerical(lame_version_t * lvp) -{ +get_lame_version_numerical(lame_version_t *lvp) { static /*@observer@ */ const char *const features = ""; /* obsolete */ /* generic version */ @@ -233,21 +225,20 @@ get_lame_version_numerical(lame_version_t * lvp) const char * -get_lame_os_bitness(void) -{ +get_lame_os_bitness(void) { static /*@observer@ */ const char *const strXX = ""; static /*@observer@ */ const char *const str32 = "32bits"; static /*@observer@ */ const char *const str64 = "64bits"; switch (sizeof(void *)) { - case 4: - return str32; + case 4: + return str32; - case 8: - return str64; + case 8: + return str64; - default: - return strXX; + default: + return strXX; } } diff --git a/Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.h b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.h new file mode 100644 index 0000000..f5fef50 --- /dev/null +++ b/Lame/LameMP3/CMake/src/main/cpp/lamemp3/version.h @@ -0,0 +1,68 @@ +/* + * Version numbering for LAME. + * + * Copyright (c) 1999 A.L. Faber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef LAME_VERSION_H +#define LAME_VERSION_H + + +/* + * To make a string from a token, use the # operator: + */ +#ifndef STR +# define __STR(x) #x +# define STR(x) __STR(x) +#endif + +# define LAME_URL "http://lame.sf.net" + + +# define LAME_MAJOR_VERSION 3 /* Major version number */ +# define LAME_MINOR_VERSION 100 /* Minor version number */ +# define LAME_TYPE_VERSION 2 /* 0:alpha 1:beta 2:release */ +# define LAME_PATCH_VERSION 0 /* Patch level */ +# define LAME_ALPHA_VERSION (LAME_TYPE_VERSION==0) +# define LAME_BETA_VERSION (LAME_TYPE_VERSION==1) +# define LAME_RELEASE_VERSION (LAME_TYPE_VERSION==2) + +# define PSY_MAJOR_VERSION 1 /* Major version number */ +# define PSY_MINOR_VERSION 0 /* Minor version number */ +# define PSY_ALPHA_VERSION 0 /* Set number if this is an alpha version, otherwise zero */ +# define PSY_BETA_VERSION 0 /* Set number if this is a beta version, otherwise zero */ + +#if LAME_ALPHA_VERSION +#define LAME_PATCH_LEVEL_STRING " alpha " STR(LAME_PATCH_VERSION) +#endif +#if LAME_BETA_VERSION +#define LAME_PATCH_LEVEL_STRING " beta " STR(LAME_PATCH_VERSION) +#endif +#if LAME_RELEASE_VERSION +#if LAME_PATCH_VERSION +#define LAME_PATCH_LEVEL_STRING " release " STR(LAME_PATCH_VERSION) +#else +#define LAME_PATCH_LEVEL_STRING "" +#endif +#endif + +# define LAME_VERSION_STRING STR(LAME_MAJOR_VERSION) "." STR(LAME_MINOR_VERSION) LAME_PATCH_LEVEL_STRING + +#endif /* LAME_VERSION_H */ + +/* End of version.h */ diff --git a/Lame/LameMP3/CMake/src/main/jniLibs/arm64-v8a/liblame.so b/Lame/LameMP3/CMake/src/main/jniLibs/arm64-v8a/liblame.so new file mode 100644 index 0000000000000000000000000000000000000000..2878b8a32ccbb7d6ace62dfeba91561f3e5f3bbd GIT binary patch literal 884208 zcmeFad3aPs7B*hpoj`ZO5+Fbbm~_Ho2LT~$QCT`+3yT;-SX?`ujqdC#1`uh2OBU1w zQE(Yq6ip&H=%A(@&=5Bib#P}KM+2f07BwhhqQrdfx%b?pav?L{^Zfq#{qdF0vF>^6 z)TvY3spZ}@>*p+*Ycv>y7EIz5L0ogGir6_}Ur}#<62dN`gc<)26CsMMZ%4|d4?%aD z6i|zWl0*G}52RGDSJSK4`zUf+oEV_$st?v|Q)44w%I7In^La|ud|KSh;#zE0)d-SO zBuN1UT|7cXg%&Haz$hm2tmX1_@ixw<#ah0&?+R1sIWb1fr;pG2sTs9c%XcI4QT_gJ z12>b1=kmI1&lN1F#agRUxq%?Ea^B*l;)>#f#X~nNTeGR>n=3#0^FwF-p1)m1w)8}X zwV?0t90b|}x&eF}VkhW+P+#yD5x)!a$Fml0!oy_nBM~n~{0ri*K#ibGP%5yy5MPP7 z7%_z-pgEx1fjvh6hiHyx0M7)y3cg88M7#)?4MZV_W0e!)Ej;`NS`LZ=Jr7ERObOyb z&_FytgIEjC^1~yDBUslpm^|qLri^g7O@}VD#Uw1b3yNbD7*ox1I$b= z2S^LI0*?X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