Projects
Multimedia
dcaenc
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
dcaenc.changes
Changed
@@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Wed Nov 06 2013 - joerg.lorenzen@ki.tng.de + +- update to version 2 + * Minor cleanups + * Support for 5.0 channel encoding + * Fixed infinite loop on too-high bitrates + * Fixed buffer overflow on attempts to encode a 7.1 file +- removed patch dcaenc-fix_missing_include.patch +- changed license to LGPL-2.1+ + +------------------------------------------------------------------- Mon Dec 19 23:11:48 CET 2011 - pascal.bleser@opensuse.org - initial version (1)
View file
dcaenc.spec
Changed
@@ -1,15 +1,14 @@ # vim: set sw=4 ts=4 et nu: Name: dcaenc -Version: 1 +Version: 2 %define soname 0 Release: 0.pm.1 Summary: DTS Encoder Source: http://aepatrakov.narod.ru/dcaenc/dcaenc-%{version}.tar.gz -Patch1: dcaenc-fix_missing_include.patch -URL: http://aepatrakov.narod.ru/dcaenc/ +Url: http://aepatrakov.narod.ru/dcaenc/ Group: Productivity/Multimedia/Sound/Editors and Convertors -License: GNU Lesser General Public License version 2.1 or later (LGPL v2.1 or later) +License: LGPL-2.1+ BuildRoot: %{_tmppath}/build-%{name}-%{version} BuildRequires: alsa-devel BuildRequires: gcc make glibc-devel pkgconfig @@ -79,7 +78,6 @@ %prep %setup -q -%patch1 %build %configure @@ -116,6 +114,7 @@ %defattr(-,root,root) %{_includedir}/dcaenc.h %{_libdir}/libdcaenc.so +%{_libdir}/pkgconfig/dcaenc.pc %changelog
View file
dcaenc-fix_missing_include.patch
Deleted
@@ -1,10 +0,0 @@ ---- main.c.orig 2011-12-19 23:13:25.591000310 +0100 -+++ main.c 2011-12-19 23:13:50.068000275 +0100 -@@ -20,6 +20,7 @@ - - #include <stdio.h> - #include <stdlib.h> -+#include <string.h> - #include "config.h" - #include "dcaenc.h" - #include "wavfile.h"
View file
dcaenc-1.tar.gz/AUTHORS -> dcaenc-2.tar.gz/AUTHORS
Changed
@@ -1,1 +1,6 @@ -Alexander E. Patrakov <patrakov@gmail.com> +Main author: Alexander E. Patrakov <patrakov@gmail.com> + +Other people who contributed at least one line of code: + +Charles Hannum +Colin Guthrie
View file
dcaenc-1.tar.gz/Makefile.am -> dcaenc-2.tar.gz/Makefile.am
Changed
@@ -3,6 +3,9 @@ AUTOMAKE_OPTIONS=foreign EXTRA_DIST = dcaenc.sym dca.conf +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dcaenc.pc + bin_PROGRAMS = dcaenc noinst_PROGRAMS = gentables lib_LTLIBRARIES = libdcaenc.la
View file
dcaenc-1.tar.gz/Makefile.in -> dcaenc-2.tar.gz/Makefile.in
Changed
@@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -42,21 +42,21 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ - INSTALL NEWS TODO config.guess config.sub depcomp install-sh \ - ltmain.sh missing + $(srcdir)/config.h.in $(srcdir)/dcaenc.pc.in \ + $(top_srcdir)/configure AUTHORS COPYING INSTALL NEWS TODO \ + config.guess config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = dcaenc.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -79,9 +79,15 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(alsaconfdir)" \ - "$(DESTDIR)$(includedir)" + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(plugin_LTLIBRARIES) @HAVE_ALSA_TRUE@libasound_module_pcm_dca_la_DEPENDENCIES = \ @HAVE_ALSA_TRUE@ libdcaenc.la @@ -129,7 +135,7 @@ $(dcaenc_SOURCES) $(gentables_SOURCES) DIST_SOURCES = $(am__libasound_module_pcm_dca_la_SOURCES_DIST) \ $(libdcaenc_la_SOURCES) $(dcaenc_SOURCES) $(gentables_SOURCES) -DATA = $(alsaconf_DATA) +DATA = $(alsaconf_DATA) $(pkgconfig_DATA) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags @@ -143,6 +149,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ @@ -266,6 +274,8 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign EXTRA_DIST = dcaenc.sym dca.conf +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dcaenc.pc lib_LTLIBRARIES = libdcaenc.la include_HEADERS = dcaenc.h libdcaenc_la_SOURCES = dcaenc.c \ @@ -294,7 +304,7 @@ .SUFFIXES: .SUFFIXES: .c .lo .o .obj -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -330,10 +340,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -345,6 +353,8 @@ distclean-hdr: -rm -f config.h stamp-h1 +dcaenc.pc: $(top_builddir)/config.status $(srcdir)/dcaenc.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @@ -529,9 +539,25 @@ @$(NORMAL_UNINSTALL) @list='$(alsaconf_DATA)'; test -n "$(alsaconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(alsaconfdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(alsaconfdir)" && rm -f $$files + dir='$(DESTDIR)$(alsaconfdir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @@ -549,9 +575,7 @@ @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -655,7 +679,7 @@ $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir @@ -663,7 +687,7 @@ $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -713,6 +737,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -741,8 +766,16 @@ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \
View file
dcaenc-1.tar.gz/NEWS -> dcaenc-2.tar.gz/NEWS
Changed
@@ -1,2 +1,8 @@ +dcaenc-2: 2012-01-28 + * Minor cleanups + * Support for 5.0 channel encoding + * Fixed infinite loop on too-high bitrates + * Fixed buffer overflow on attempts to encode a 7.1 file + dcaenc-1: 2011-09-17 * Initial release.
View file
dcaenc-1.tar.gz/README -> dcaenc-2.tar.gz/README
Changed
@@ -12,6 +12,31 @@ git clone git://gitorious.org/dtsenc/dtsenc.git +Windows-specific notes +====================== + +There is a fork of dcaenc specially targetted at Windows users. You can get +it from http://gitorious.org/~mulder/dtsenc/mulders-dtsenc . As compared to +this version, that fork adds a Visual Studio project file, a progress indicator +and support for Unicode file names on Windows. It also breaks Linux support. +Still, the original dcaenc can be compiled for Windows, here is how. + +The recommended compiler for dcaenc on Windows is MinGW. Get it from +http://sourceforge.net/projects/mingw/files/Installer/ . You may want to use +either the mingw-get.exe utility directly (just copy it to c:\mingw\bin, +install nothing else), or use a graphical installer. In the latter case, +install just the C compiler. + +After installation, add c:\mingw\bin and c:\mingw\msys\1.0\bin to the Path +environment variable (right-click My Computer -> Properties -> Advanced -> +Environment Variables) if it is not already there. Then install the required +MinGW components from the command prompt: + + mingw-get install mingw32-base mingw32-autotools + +For autotools to work, you also have to copy or rename the +c:\mingw\msys\1.0\etc\fstab.sample file to c:\mingw\msys\1.0\etc\fstab. + Installation ============ @@ -20,25 +45,48 @@ support for external plugins. See the file INSTALL for the generic installation instructions. -Quick summary: +Quick summary for UNIX-like systems: autoreconf -f -i -v # only if building from git - ./configure --prefix=/usr # with any other prefix, ALSA won't find the plugin + ./configure --prefix=/usr --libdir=??? # see below make su -c 'make install' # Or, on Ubuntu: sudo make install +The --libdir parameter is distribution- and architecture-specific, thus, the +default (/usr/lib) may be wrong for your system. This parameter influences +the shared library and ALSA plugin location. If you specify this parameter +incorrectly, ALSA will not find the plugin. You can verify that the value is +correct by looking if there are already any ALSA plugins for the same +architecture in $libdir/alsa-lib. Here are some values to consider: + + Most 32-bit x86 linux systems: /usr/lib + Most x86-64 linux systems: /usr/lib or /usr/lib64 + 32-bit libraries on most x86-64 linux systems: /usr/lib or /usr/lib32 + x86 Debian or Ubuntu (new versions): /usr/lib/i386-linux-gnu + x86-64 Debian or Ubuntu (new versions): /usr/lib/x86_64-linux-gnu + +Quick summary for Windows: + + bash + autoreconf -f -i -v # only if building from git + ./configure MAKE=mingw32-make + mingw32-make + Package contents ================ -The dcaenc package contains the libdcaenc.so shared library, the corresponding -dcaenc.h header, the dcaenc command line tool, and (optionally) the ALSA -plugin. +On UNIX-like systems, the dcaenc package contains the libdcaenc.so shared +library, the corresponding dcaenc.h header, the dcaenc command line tool, +and (optionally, on Linux only) the ALSA plugin. + +On Windows, you only get the command-line tool, even if you use the forked +version. The libdcaenc library ===================== The library may be useful if you want to create DTS streams in your own -application. +UNIX application. To do so, you have to call the following functions: @@ -56,9 +104,10 @@ those divided by 2 or 4. The channel configuration is one of the DCAENC_CHANNELS_* defines listed in the dcaenc.h header. Note that values greater than DCAENC_CHANNELS_3FRONT_2REAR always return an error now because -their encoding requires the Xch extension that is undocumented and thus not -implemented. Only non-LFE channels have to be specified here. The approximate -bitrate is specified in bits per second and may be rounded up by the library. +their encoding requires the XCH/XXCH extensions that became documented only in +September 2011 and thus were not implemented. Only non-LFE channels have to be +specified here. The approximate bitrate is specified in bits per second and +may be rounded slightly up or down by the library. The flags parameter should be a logical OR of zero or more of the DCAENC_FLAG_* defines. Their meanings: @@ -91,6 +140,11 @@ On any error, dcaenc_create() returns NULL. There is no way to find out the reason for the error. +int dcaenc_channel_config_to_count(int channel_config); + +Returns the number of channels used in a given channel configuration, or -1 +if the channel configuration is invalid or unsupported. + int dcaenc_bitrate(dcaenc_context c); Returns the actual bitrate that is used by the library. @@ -133,6 +187,15 @@ DCAENC_CHANNELS_STEREO_SUMDIFF: left+right, left-right DCAENC_CHANNELS_STEREO_TOTAL: left total, right total +Unfortunately, there is currently no API to query the order of channels by the +channel layout. This is because it is unclear what functionality related to +channel mapping should be exposed. E.g., should speaker IDs compatible +with ksmedia.h (as used in Windows and in WAVEFORMATEXTENSIBLE wav files) be +used, even though a mapping between these speaker IDs and the positions used +in the DTS specification is in some cases only approximate (e.g., there is no +"Surround Left 2" speaker in ksmedia.h). Please mail your suggestions +regarding this API to patrakov@gmail.com. + dcaenc_convert_s32() returns the number of bytes written to the output buffer. Right now, it is always the same as returned by dcaenc_output_size(), but this will change if variable bitrate encoding is added to the library. @@ -220,7 +283,11 @@ The card name can be found in the "aplay -L" output, and AES0=6 parameter marks the stream as non-audio (so that it doesn't get played by mistake -- -this would result in loud hiss that can damage loudspeakers). +this would result in loud hiss that can damage loudspeakers). Note, however, +that there is no known non-artificial use case for this. If you have a video +card that advertises its audio portion as the "hdmi" ALSA device, but still +has the same format limitations as SPDIF, or if you have any other reason to +define your own PCM, please send an email to patrakov@gmail.com. Unlike the AC3 encoder, there are no other configuration parameters. This is because it does not make sense to have them. The hard-coded settings (same @@ -258,6 +325,11 @@ priority = 3 direction = output +Debian and Ubuntu have a patched version of pulseaudio that uses the +/usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf file instead +for Intel and NVidia sound cards. If that file exists, add the above lines +there, too. + Later they may be added to the default profile upstream. After restarting PulseAudio, it will see an additional "DTS" output profile and allow you to select it in the volume control application such as pavucontrol or @@ -321,3 +393,11 @@ Mikhail Elovskikh cryptonymous from the linux.org.ru forum rulet from the linux.org.ru forum + +The following people contributed useful information: + + Adam Thomas-Murphy + +The following people reported bugs: + + LoRd_MuldeR from https://gitorious.org/~mulder
View file
dcaenc-1.tar.gz/aclocal.m4 -> dcaenc-2.tar.gz/aclocal.m4
Changed
@@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -19,172 +20,15 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])# PKG_CHECK_MODULES - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -194,7 +38,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -210,19 +54,21 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
View file
dcaenc-1.tar.gz/alsaplugin.c -> dcaenc-2.tar.gz/alsaplugin.c
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
View file
dcaenc-1.tar.gz/configure -> dcaenc-2.tar.gz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for dcaenc 1. +# Generated by GNU Autoconf 2.68 for dcaenc 2. # # Report bugs to <patrakov@gmail.com>. # @@ -570,8 +570,8 @@ # Identity of this package. PACKAGE_NAME='dcaenc' PACKAGE_TARNAME='dcaenc' -PACKAGE_VERSION='1' -PACKAGE_STRING='dcaenc 1' +PACKAGE_VERSION='2' +PACKAGE_STRING='dcaenc 2' PACKAGE_BUGREPORT='patrakov@gmail.com' PACKAGE_URL='http://aepatrakov.narod.ru/dcaenc/' @@ -648,6 +648,7 @@ am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -1300,7 +1301,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dcaenc 1 to adapt to many kinds of systems. +\`configure' configures dcaenc 2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1370,7 +1371,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dcaenc 1:";; + short | recursive ) echo "Configuration of dcaenc 2:";; esac cat <<\_ACEOF @@ -1480,7 +1481,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dcaenc configure 1 +dcaenc configure 2 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1939,7 +1940,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dcaenc $as_me 1, which was +It was created by dcaenc $as_me 2, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2760,7 +2761,7 @@ # Define the identity of the package. PACKAGE='dcaenc' - VERSION='1' + VERSION='2' cat >>confdefs.h <<_ACEOF @@ -3017,6 +3018,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3830,6 +3832,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3889,7 +3892,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -11874,6 +11877,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -11933,7 +11937,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -12606,7 +12610,7 @@ LIBS="$ac_save_LIBS" -ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files Makefile dcaenc.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -13150,7 +13154,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dcaenc $as_me 1, which was +This file was extended by dcaenc $as_me 2, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13217,7 +13221,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dcaenc config.status 1 +dcaenc config.status 2 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -13627,6 +13631,7 @@ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "dcaenc.pc") CONFIG_FILES="$CONFIG_FILES dcaenc.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac
View file
dcaenc-1.tar.gz/configure.ac -> dcaenc-2.tar.gz/configure.ac
Changed
@@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) -AC_INIT([dcaenc],[1],[patrakov@gmail.com],,[http://aepatrakov.narod.ru/dcaenc/]) +AC_INIT([dcaenc],[2],[patrakov@gmail.com],,[http://aepatrakov.narod.ru/dcaenc/]) AC_CONFIG_SRCDIR([dcaenc.c]) AC_CONFIG_HEADERS([config.h]) @@ -48,5 +48,5 @@ LT_LIB_M LIBS="$ac_save_LIBS" -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile dcaenc.pc]) AC_OUTPUT
View file
dcaenc-1.tar.gz/dcaenc.c -> dcaenc-2.tar.gz/dcaenc.c
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include <assert.h> +#include "config.h" #include "dcaenc.h" #include "dcaenc_private.h" #include "int_data.h" @@ -30,10 +31,21 @@ #define div_round_up(a, b) (((a) + (b) - 1) / (b)) #define round_up(a, b) ((((a) + (b) - 1) / (b)) * (b)) +int dcaenc_channel_config_to_count(int channel_config) +{ + if (channel_config > DCAENC_CHANNELS_3FRONT_2REAR) + return -1; + + if (channel_config < 0) + return -1; + + return channels_table[channel_config]; +} + dcaenc_context dcaenc_create(int sample_rate, int channel_config, int approx_bitrate, int flags) { - int i, frame_bits, bit_step, fir, useful_bitrate; + int i, frame_bits, bit_step, fir, useful_bitrate, min_frame_bits; dcaenc_context result; i = 0; @@ -47,6 +59,11 @@ if (approx_bitrate > 6144000) return NULL; + if (channel_config < 0) + return NULL; + if (channel_config > DCAENC_CHANNELS_3FRONT_2REAR) + return NULL; + if (flags & DCAENC_FLAG_28BIT) useful_bitrate = div_round_up(approx_bitrate * 7, 8); @@ -60,7 +77,7 @@ /* Round frame_bits up to the next permitted value */ frame_bits = round_up(frame_bits, bit_step); - int min_frame_bits = 132 + (493 + 28 * 32) * channels_table[channel_config]; + min_frame_bits = 132 + (493 + 28 * 32) * channels_table[channel_config]; if (flags & DCAENC_FLAG_LFE) min_frame_bits += 72; @@ -453,10 +470,14 @@ } static const int snr_fudge = 128; +static const int USED_1ABITS = 1; +static const int USED_NABITS = 2; +static const int USED_26ABITS = 4; -static void init_quantization_noise(dcaenc_context c, int noise) +static int init_quantization_noise(dcaenc_context c, int noise) { int ch, band; + int ret = 0; c->consumed_bits = 132 + 493 * c->fullband_channels; if (c->flags & DCAENC_FLAG_LFE) @@ -472,10 +493,19 @@ - c->band_masking_cb[band] - noise; - c->abits[band][ch] = (snr_cb >= 1312) ? 26 - : (snr_cb >= 222) ? (8 + mul32(snr_cb - 222, 69000000)) - : (snr_cb >= 0) ? (2 + mul32(snr_cb, 106000000)) - : 1; + if (snr_cb >= 1312) { + c->abits[band][ch] = 26; + ret |= USED_26ABITS; + } else if (snr_cb >= 222) { + c->abits[band][ch] = 8 + mul32(snr_cb - 222, 69000000); + ret |= USED_NABITS; + } else if (snr_cb >= 0) { + c->abits[band][ch] = 2 + mul32(snr_cb, 106000000); + ret |= USED_NABITS; + } else { + c->abits[band][ch] = 1; + ret |= USED_1ABITS; + } } } @@ -484,36 +514,41 @@ c->consumed_bits += bit_consumption[c->abits[band][ch]]; } + return ret; } static void dcaenc_assign_bits(dcaenc_context c) { /* Find the bounds where the binary search should work */ - int low, high; + int low, high, down; + int used_abits = 0; init_quantization_noise(c, c->worst_quantization_noise); low = high = c->worst_quantization_noise; if (c->consumed_bits > c->frame_bits) { while (c->consumed_bits > c->frame_bits) { + assert(("Too low bitrate should have been rejected in dcaenc_create", used_abits != USED_1ABITS)); low = high; high += snr_fudge; - init_quantization_noise(c, high); + used_abits = init_quantization_noise(c, high); } } else { while (c->consumed_bits <= c->frame_bits) { high = low; + if (used_abits == USED_26ABITS) + goto out; /* The requested bitrate is too high, pad with zeros */ low -= snr_fudge; - init_quantization_noise(c, low); + used_abits = init_quantization_noise(c, low); } } /* Now do a binary search between low and high to see what fits */ - int down; for (down = snr_fudge >> 1; down; down >>= 1) { init_quantization_noise(c, high - down); if (c->consumed_bits <= c->frame_bits) high -= down; } init_quantization_noise(c, high); +out: c->worst_quantization_noise = high; if (high > c->worst_noise_ever) c->worst_noise_ever = high; @@ -538,8 +573,8 @@ static void bitstream_put(dcaenc_context c, uint32_t bits, int nbits) { - assert(bits < (1 << nbits)); int max_bits = (c->flags & DCAENC_FLAG_28BIT) ? 28 : 32; + assert(bits < (1 << nbits)); c->wrote += nbits; bits &= ~(0xffffffff << nbits); if (nbits + c->wbits >= max_bits) { @@ -608,12 +643,15 @@ static int dcaenc_calc_one_scale(int32_t peak_cb, int abits, softfloat *quant) { - assert(peak_cb <= 0); - assert(peak_cb >= -2047); - int32_t peak = cb_to_level[-peak_cb]; + int32_t peak; int our_nscale, try_remove; softfloat our_quant; + + assert(peak_cb <= 0); + assert(peak_cb >= -2047); + our_nscale = 127; + peak = cb_to_level[-peak_cb]; for (try_remove = 64; try_remove > 0; try_remove >>= 1) { if (scalefactor_inv[our_nscale - try_remove].e + stepsize_inv[abits].e <= 17)
View file
dcaenc-1.tar.gz/dcaenc.h -> dcaenc-2.tar.gz/dcaenc.h
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -48,6 +48,8 @@ #define DCAENC_CHANNELS_4FRONT_4REAR 14 #define DCAENC_CHANNELS_5FRONT_3REAR 15 +int dcaenc_channel_config_to_count(int channel_config); + dcaenc_context dcaenc_create(int sample_rate, int channel_config, int approx_bitrate, int flags); int dcaenc_bitrate(dcaenc_context c); int dcaenc_input_size(dcaenc_context c);
View file
dcaenc-2.tar.gz/dcaenc.pc.in
Added
@@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: dcaenc +Description: dcaenc is an encoder for DTS Coherent Acoustics audio format +Version: @VERSION@ +Requires: +Conflicts: +Libs: -L${libdir} -ldcaenc +Cflags: -I${includedir} +
View file
dcaenc-1.tar.gz/dcaenc.sym -> dcaenc-2.tar.gz/dcaenc.sym
Changed
@@ -1,3 +1,4 @@ +dcaenc_channel_config_to_count dcaenc_create dcaenc_input_size dcaenc_output_size
View file
dcaenc-1.tar.gz/dcaenc_private.h -> dcaenc-2.tar.gz/dcaenc_private.h
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
View file
dcaenc-1.tar.gz/float_data.h -> dcaenc-2.tar.gz/float_data.h
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
View file
dcaenc-1.tar.gz/gentables.c -> dcaenc-2.tar.gz/gentables.c
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,6 +24,7 @@ #include <math.h> #include <stdio.h> #include <stdint.h> +#include "config.h" #include "int_data.h" #include "float_data.h" @@ -218,6 +219,7 @@ int main(int argc, char *argv[]) { printf("/* GENERATED FILE, DO NOT EDIT */\n\n"); + printf("#include \"config.h\"\n"); printf("#include \"math_tables.h\"\n\n"); print_lfe_fir(); print_subband_fir();
View file
dcaenc-1.tar.gz/int_data.h -> dcaenc-2.tar.gz/int_data.h
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
View file
dcaenc-2.tar.gz/m4/pkg.m4
Added
@@ -0,0 +1,159 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES
View file
dcaenc-1.tar.gz/main.c -> dcaenc-2.tar.gz/main.c
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,11 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "config.h" #include "dcaenc.h" #include "wavfile.h" -extern const int32_t prototype_filter[512]; - int main(int argc, char *argv[]) { dcaenc_context c; @@ -38,15 +37,19 @@ int samples_total; static const int channel_map[6] = {DCAENC_CHANNELS_MONO, DCAENC_CHANNELS_STEREO, 0, - DCAENC_CHANNELS_2FRONT_2REAR, 0, DCAENC_CHANNELS_3FRONT_2REAR }; + DCAENC_CHANNELS_2FRONT_2REAR, DCAENC_CHANNELS_3FRONT_2REAR, DCAENC_CHANNELS_3FRONT_2REAR }; if (argc != 4) { if (argc == 2 && !strcmp(argv[1], "--version")) { - printf(PACKAGE_NAME "-" PACKAGE_VERSION "\n"); - printf(PACKAGE_URL "\n"); + fprintf(stderr, PACKAGE_NAME "-" PACKAGE_VERSION "\n"); + fprintf(stderr, PACKAGE_URL "\n\n"); + fprintf(stderr, "Copyrignt (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com>\n"); + fprintf(stderr, "License: GNU LGPL version 2.1 or later <http://gnu.org/licenses/lgpl.html>\n"); + fprintf(stderr, "This is free software: you are free to change and redistribute it.\n"); + fprintf(stderr, "There is NO WARRANTY, to the extent permitted by law.\n"); return 0; } else { - printf("Usage: dcaenc input.wav output.dts bits_per_second\n"); + fprintf(stderr, "Usage: dcaenc input.wav output.dts bits_per_second\n"); return 1; } }
View file
dcaenc-1.tar.gz/math_tables.h -> dcaenc-2.tar.gz/math_tables.h
Changed
@@ -1,3 +1,23 @@ +/* + * This file is part of dcaenc. + * + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> + * + * dcaenc 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. + * + * dcaenc 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 dcaenc; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef MATH_TABLES_H #define MATH_TABLES_H
View file
dcaenc-1.tar.gz/softfloat.h -> dcaenc-2.tar.gz/softfloat.h
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
View file
dcaenc-1.tar.gz/wavfile.c -> dcaenc-2.tar.gz/wavfile.c
Changed
@@ -1,7 +1,7 @@ /* * This file is part of dcaenc. * - * Copyright (c) 2008-2011 Alexander E. Patrakov <patrakov@gmail.com> + * Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com> * * dcaenc is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -95,7 +95,7 @@ /* wChannels */ v = (uint32_t)fmt[2] | ((uint32_t)fmt[3] << 8); - if (v != 1 && v != 2 && v != 4 && v !=6) + if (v != 1 && v != 2 && v != 4 && v != 5 && v !=6) goto err3; result->channels = v; /* dwSamplesPerSec */ @@ -189,6 +189,13 @@ for (ch = 0; ch < f->channels; ch++) *(samples++) = smpte_sample[ch]; break; + case 5: + *(samples++) = smpte_sample[2]; + *(samples++) = smpte_sample[0]; + *(samples++) = smpte_sample[1]; + *(samples++) = smpte_sample[3]; + *(samples++) = smpte_sample[4]; + break; case 6: *(samples++) = smpte_sample[2]; *(samples++) = smpte_sample[0];
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.