diff --git a/Makefile.am b/Makefile.am index bfd4061b693343d8d42f7cec2143323840b89747..f5c5957017aad6b2d3f5b9449ed515397cde410f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,7 @@ pkginclude_HEADERS = src/opus.h src/opus_multistream.h celt/opus_types.h celt/op noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) -noinst_PROGRAMS = test_opus test_repacketizer +noinst_PROGRAMS = test_opus test_repacketizer opus_compare test_opus_SOURCES = src/test_opus.c @@ -36,6 +36,9 @@ test_repacketizer_SOURCES = src/test_repacketizer.c test_repacketizer_LDADD = libopus.la -lm +opus_compare_SOURCES = src/opus_compare.c +opus_compare_LDADD = -lm + if CUSTOM_MODES pkginclude_HEADERS += celt/opus_custom.h noinst_PROGRAMS += test_opus_custom diff --git a/Makefile.draft b/Makefile.draft index 37d62fc0f2689abf1691b2b4c63f89d67a372a03..f75b05ce4a5efdd972a2ae23c07efaebec4602a2 100644 --- a/Makefile.draft +++ b/Makefile.draft @@ -97,6 +97,9 @@ OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) TESTOPUS_SRCS_C = src/test_opus.c TESTOPUS_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUS_SRCS_C)) +OPUSCOMPARE_SRCS_C = src/opus_compare.c +OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) + LIBS = m LDLIBDIRS = ./ @@ -104,7 +107,7 @@ LDLIBDIRS = ./ # Rules default: all -all: $(TARGET) lib test_opus +all: $(TARGET) lib test_opus opus_compare lib: $(TARGET) @@ -114,5 +117,8 @@ $(TARGET): $(OBJS) test_opus$(EXESUFFIX): $(TESTOPUS_OBJS) $(TARGET) $(LINK.o.cmdline) +opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) + $(LINK.o.cmdline) + clean: - rm -f test_opus$(EXESUFFIX) $(TARGET) $(OBJS) $(TESTOPUS_OBJS) + rm -f test_opus$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) $(OBJS) $(TESTOPUS_OBJS) diff --git a/doc/build_draft.sh b/doc/build_draft.sh index 105dbd05af0ad1a38b58974f63349d9c686964d2..bb8706b19ca164fc1b33b71fdb8872d828746d59 100755 --- a/doc/build_draft.sh +++ b/doc/build_draft.sh @@ -23,6 +23,7 @@ for f in `cat "${toplevel}"/opus_sources.mk "${toplevel}"/celt_sources.mk \ cp -a "${toplevel}/${f}" "${destdir}/${f}" done cp -a "${toplevel}"/src/test_opus.c "${destdir}"/src/ +cp -a "${toplevel}"/src/opus_compare.c "${destdir}"/src/ cp -a "${toplevel}"/celt/test_opus_custom.c "${destdir}"/celt/ cp -a "${toplevel}"/celt/opus_custom.h "${destdir}"/celt/ cp -a "${toplevel}"/Makefile.draft "${destdir}"/Makefile @@ -36,13 +37,13 @@ tar czf opus_source.tar.gz "${destdir}" echo building base64 version cat opus_source.tar.gz| base64 -w 66 | sed 's/^/###/' > opus_source.base64 -echo '<figure>' > opus_compare_escaped.c -echo '<artwork>' >> opus_compare_escaped.c -echo '<![CDATA[' >> opus_compare_escaped.c -cat opus_compare.c >> opus_compare_escaped.c -echo ']]>' >> opus_compare_escaped.c -echo '</artwork>' >> opus_compare_escaped.c -echo '</figure>' >> opus_compare_escaped.c +#echo '<figure>' > opus_compare_escaped.c +#echo '<artwork>' >> opus_compare_escaped.c +#echo '<![CDATA[' >> opus_compare_escaped.c +#cat opus_compare.c >> opus_compare_escaped.c +#echo ']]>' >> opus_compare_escaped.c +#echo '</artwork>' >> opus_compare_escaped.c +#echo '</figure>' >> opus_compare_escaped.c echo running xml2rfc xml2rfc draft-ietf-codec-opus.xml draft-ietf-codec-opus.html & diff --git a/doc/draft-ietf-codec-opus.xml b/doc/draft-ietf-codec-opus.xml index 4bf79b9d873d386b0d8201b06bdebcc08c7e6128..a5f354076dc39dcc0d4d4a70f61bb3e2b5fd2114 100644 --- a/doc/draft-ietf-codec-opus.xml +++ b/doc/draft-ietf-codec-opus.xml @@ -5297,8 +5297,10 @@ the latter shall take precedence. <t> Compliance with this specification means that a decoder's output MUST be - within the thresholds specified by the opus_compare.c tool in - <xref target="opus-compare"/> compared to the reference implementation. + within the thresholds specified by the opus_compare.c tool (included + with the code) when compared to the reference implementation. Either the floating-point + implementation or the fixed-point implementation can be used as a reference and being + within the threshold for one of the two is sufficient. </t> <t> @@ -5591,12 +5593,14 @@ Development snapshots are provided at </section> +<!-- <section anchor="opus-compare" title="opus_compare.c"> <t> <?rfc include="opus_compare_escaped.c"?> </t> </section> - + --> + <section anchor="self-delimiting-framing" title="Self-Delimiting Framing"> <t> To use the internal framing described in <xref target="modes"/>, the decoder diff --git a/doc/opus_compare.c b/src/opus_compare.c similarity index 100% rename from doc/opus_compare.c rename to src/opus_compare.c