Skip to content

Commit 18e4942

Browse files
author
Marc-Antoine Arnaud
committed
update to release 2.4.10
1 parent 5a1cfcf commit 18e4942

File tree

197 files changed

+4065
-97050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+4065
-97050
lines changed

README

+105-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
$Id: README,v 1.89 2014/01/06 18:59:41 mikey Exp $
2+
$Id: README,v 1.96 2015/02/23 21:59:40 jhurst Exp $
33

44
The asdcplib library is a set of objects that offer
55
simplified access to files conforming to the sound and
@@ -129,6 +129,17 @@ blackwave - Write a WAVE file full of zeros, Used to make filler
129129

130130
j2c-test - Displays information about JP2K codestreams.
131131

132+
Experimental feature: Prototype for High Dynamic Range is a wrapper
133+
for the IMF application that allows JPEG-2000 codestreams to be paired
134+
with opaque blobs of metadata. AS-02 support must be enabled to
135+
build this feature, so --enable-as-02 must be enabled if
136+
--enable-phdr is to be used. The following executable programs will be
137+
built:
138+
139+
phdr-wrap - Writes AS-02 PHDR Essence Component files.
140+
141+
phdr-unwrap - Extracts essence from AS-02 PHDR Essence Component files.
142+
132143

133144
Documentation
134145

@@ -140,6 +151,99 @@ command-line utilities all respond to -h.
140151

141152
Change History
142153

154+
155+
2015-02-23 - bug fixes
156+
o Fixed a new bug introduced by the fix to large numbers of subtitle ancillary
157+
resources.
158+
o Added support for generic Aux Data (ST 429-14) to asdcp-wrap.
159+
160+
161+
2015-02-19 - PHDR feature, bug fixes
162+
o Modified PCMParser and PCMParserList to return partial frame buffers at the
163+
end of a WAV input file. This was needed to allow wrapping all samples into
164+
an AS-02 audio file (which is clip-wrapped) in the case where the input file
165+
has an odd number of samples with respect to the frame buffer size being
166+
used. If there is more than one input file the length of the last buffer
167+
will be determined by PCMParserList to be the shortest of the input files.
168+
Prior to this change, partial samples in an input WAV file have been
169+
abandoned (i.e., not written out to the MXF file). As a result, AS-DCP
170+
applications will have to decide whether to abandon the partial last frame
171+
(usually detected by testing frame_buffer.Size() != frame_buffer.Capacity())
172+
or write it to the MXF file. Programs written to the old API will write the
173+
partial frame (i.e., new behavior.) This should not be harmful since the
174+
remainder of the buffer is zeroed and the output file will contain one
175+
additional edit unit compared to the previous version.
176+
o asdcp-wrap has been modified to test for the partial buffer and by default
177+
will complain and abandon the buffer (i.e., same behavior but with a warning
178+
message.) A new command line switch (-g) alters this behavior and writes
179+
the buffer to the MXF file (it still warns the user that this condition is
180+
present.)
181+
o as-02-wrap now wraps all samples from the input file to the MXF file. There
182+
is no padding, the clip is exactly the set of samples from the input.
183+
o as-02 unwrap is temporarily restricted to creating wav files that are
184+
aligned with the frame buffer size. This means that the output file will
185+
be longer than the original WAV input in the case where the input file has
186+
an odd number of samples with respect to the frame buffer size being used.
187+
The pad samples are zero (silence).
188+
o Modified CalcFramesFromDurationInSamples() to increment the count by one for
189+
the case where the input file has an odd number of samples with respect to
190+
the frame buffer size being used (previously it truncated the odd samples.)
191+
o Fixed ST 429-5 / ST 2067-5 wrapping to increase header space when ancillary
192+
resources are present (fixes a bug that cause the header to overflow the
193+
allotted space when large numbers of PNG files were present.)
194+
o Refactored GetXMLDocType() to use the XML parser.
195+
o Added ParseFirstFromString() method to Kumu::XMLElement
196+
o Removed Kumu::StringIsXML from the API.
197+
o Added ASDCP::MXF::RGBALayout type
198+
o Added J2CLayout property to JPEG2000PictureSubDescriptor
199+
o Changed km_token_split() to retain empty elements in the output list
200+
o Added PHDR wrapping for AS-02.
201+
o Added J2CLayout property to the JPEG2000PictureSubDescriptor. This
202+
support is preliminary: the Raw data type is being used instead of
203+
RGBALayout type, which will be in the next release.
204+
205+
206+
2014-10-2 - Bug fixes and enhancements, 2.2.6
207+
o Fixed erroneous 377-4 MCA identifier in AS_DCP_PCM dump routine
208+
o Fixed erroneous byte 13 in
209+
WaveAudioDescriptor_ReferenceAudioAlignmentLevel label
210+
o Added missing implementation of -W option to as-02.unwrap
211+
o Fixed erroneous use of d-cinema ChannelAssignment label in as-02-wrap
212+
213+
214+
2014-10-01 - Bug fixes and enhancements, 2.2.5
215+
o Finished AS-02 text wrap/unwrap
216+
o Fixed fractional seconds parsing for Timestamp objects
217+
o Updated KLVPacket to use 64-bit length; allows huge packets
218+
in AS-02 PCM files
219+
o cleaned up use of atoi() in the library
220+
221+
222+
2014-07-09 - Additional IMF/AS-02 support, bug fixes and enhancements, 2.1.4
223+
o Added IMF App 2 edit rates in AS_02 namespace: EditRate_29_97,
224+
EditRate_59_94.
225+
o Revised AEC CBC context objects to copy the key rather than
226+
keep the reference passed in to it.
227+
o Addressed a bug that would allow unimpeded iteration of component
228+
values in a JP2K::PictureDescriptor object.
229+
o Addressed a bug that was incorrectly recording the sequence Duration
230+
in MXF Track objects.
231+
o Added ASDCP::AtmosSyncChannelMixer::AppendSilenceChannels()
232+
o Added a QCD decoder to the j2c parser.
233+
o Altered ASDCP::KLVPacket::HasUL() to use version-blind matching.
234+
o Fixed an uninitialized variable in MemIOReader::ReadString() that
235+
caused unbounded reads.
236+
o Fixed broken ByteString::ArchiveLength() method
237+
o Fixed broken version numbers on SoundfieldGroupLinkID and
238+
GroupOfSoundfieldGroupsLinkID UL values.
239+
o Added DBOXMotionCodePrimaryStream and DBOXMotionCodeSecondaryStream UL
240+
values to the internal dictionary.
241+
o Added optional prefix handling to MCA label generator.
242+
o Re-factored MCA label generator to include additional
243+
metadata (Thanks to Mike Radford).
244+
o Added new options to as-02-wrap.
245+
246+
143247
2014-01-06 – Additional IMF/AS-02 support, bug fixes 2.1.1
144248
o Fixed missing-index-partion bugs for AS-02 files.
145249
o Moved LocalFilenameResolver into the AS_DCP public API so that it

configure

+37-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for asdcplib 2.1.1.
3+
# Generated by GNU Autoconf 2.69 for asdcplib 2.4.10.
44
#
55
# Report bugs to <[email protected]>.
66
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
590590
# Identity of this package.
591591
PACKAGE_NAME='asdcplib'
592592
PACKAGE_TARNAME='asdcplib'
593-
PACKAGE_VERSION='2.1.1'
594-
PACKAGE_STRING='asdcplib 2.1.1'
593+
PACKAGE_VERSION='2.4.10'
594+
PACKAGE_STRING='asdcplib 2.4.10'
595595
PACKAGE_BUGREPORT='[email protected]'
596596
PACKAGE_URL=''
597597

@@ -636,6 +636,8 @@ ac_subst_vars='am__EXEEXT_FALSE
636636
am__EXEEXT_TRUE
637637
LTLIBOBJS
638638
LIBOBJS
639+
USE_PHDR_FALSE
640+
USE_PHDR_TRUE
639641
USE_AS_02_FALSE
640642
USE_AS_02_TRUE
641643
ENABLE_RANDOM_UUID_FALSE
@@ -809,6 +811,7 @@ enable_freedist
809811
enable_dev_headers
810812
enable_random_case_UUID
811813
enable_as_02
814+
enable_phdr
812815
'
813816
ac_precious_vars='build_alias
814817
host_alias
@@ -1364,7 +1367,7 @@ if test "$ac_init_help" = "long"; then
13641367
# Omit some internal or obsolete options to make the list less imposing.
13651368
# This message is too long to be a string in the A/UX 3.1 sh.
13661369
cat <<_ACEOF
1367-
\`configure' configures asdcplib 2.1.1 to adapt to many kinds of systems.
1370+
\`configure' configures asdcplib 2.4.10 to adapt to many kinds of systems.
13681371

13691372
Usage: $0 [OPTION]... [VAR=VALUE]...
13701373

@@ -1434,7 +1437,7 @@ fi
14341437

14351438
if test -n "$ac_init_help"; then
14361439
case $ac_init_help in
1437-
short | recursive ) echo "Configuration of asdcplib 2.1.1:";;
1440+
short | recursive ) echo "Configuration of asdcplib 2.4.10:";;
14381441
esac
14391442
cat <<\_ACEOF
14401443

@@ -1456,6 +1459,7 @@ Optional Features:
14561459
--enable-dev-headers install development headers
14571460
--enable-random-case-UUID encode randomly-cased UUID values when the environment variable KM_USE_RANDOM_UUID is set
14581461
--enable-as-02 enable support for SMPTE ST 2067-5 MXF files, A.K.A. AS-02
1462+
--enable-phdr enable support for Prototype for High Dyamic Range in AS-02
14591463

14601464
Optional Packages:
14611465
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1557,7 +1561,7 @@ fi
15571561
test -n "$ac_init_help" && exit $ac_status
15581562
if $ac_init_version; then
15591563
cat <<\_ACEOF
1560-
asdcplib configure 2.1.1
1564+
asdcplib configure 2.4.10
15611565
generated by GNU Autoconf 2.69
15621566

15631567
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1956,7 +1960,7 @@ cat >config.log <<_ACEOF
19561960
This file contains any messages produced by compilers while
19571961
running configure, to aid debugging if configure makes a mistake.
19581962

1959-
It was created by asdcplib $as_me 2.1.1, which was
1963+
It was created by asdcplib $as_me 2.4.10, which was
19601964
generated by GNU Autoconf 2.69. Invocation command line was
19611965

19621966
$ $0 $@
@@ -2783,7 +2787,7 @@ fi
27832787

27842788
# Define the identity of the package.
27852789
PACKAGE='asdcplib'
2786-
VERSION='2.1.1'
2790+
VERSION='2.4.10'
27872791

27882792

27892793
cat >>confdefs.h <<_ACEOF
@@ -16609,6 +16613,25 @@ else
1660916613
USE_AS_02_FALSE=
1661016614
fi
1661116615

16616+
# Check whether --enable-phdr was given.
16617+
if test "${enable_phdr+set}" = set; then :
16618+
enableval=$enable_phdr; case "${enableval}" in
16619+
yes) phdr_use=true ;;
16620+
no) phdr_use=false ;;
16621+
*) as_fn_error $? "bad value ${enableval} for --enable-phdr" "$LINENO" 5 ;;
16622+
esac
16623+
else
16624+
phdr_use=false
16625+
fi
16626+
16627+
if test x$phdr_use = xtrue; then
16628+
USE_PHDR_TRUE=
16629+
USE_PHDR_FALSE='#'
16630+
else
16631+
USE_PHDR_TRUE='#'
16632+
USE_PHDR_FALSE=
16633+
fi
16634+
1661216635

1661316636
# Checks for libraries.
1661416637
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
@@ -16895,6 +16918,10 @@ if test -z "${USE_AS_02_TRUE}" && test -z "${USE_AS_02_FALSE}"; then
1689516918
as_fn_error $? "conditional \"USE_AS_02\" was never defined.
1689616919
Usually this means the macro was only invoked conditionally." "$LINENO" 5
1689716920
fi
16921+
if test -z "${USE_PHDR_TRUE}" && test -z "${USE_PHDR_FALSE}"; then
16922+
as_fn_error $? "conditional \"USE_PHDR\" was never defined.
16923+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
16924+
fi
1689816925

1689916926
: "${CONFIG_STATUS=./config.status}"
1690016927
ac_write_fail=0
@@ -17292,7 +17319,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1729217319
# report actual input values of CONFIG_FILES etc. instead of their
1729317320
# values after options handling.
1729417321
ac_log="
17295-
This file was extended by asdcplib $as_me 2.1.1, which was
17322+
This file was extended by asdcplib $as_me 2.4.10, which was
1729617323
generated by GNU Autoconf 2.69. Invocation command line was
1729717324

1729817325
CONFIG_FILES = $CONFIG_FILES
@@ -17349,7 +17376,7 @@ _ACEOF
1734917376
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1735017377
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1735117378
ac_cs_version="\\
17352-
asdcplib config.status 2.1.1
17379+
asdcplib config.status 2.4.10
1735317380
configured by $0, generated by GNU Autoconf 2.69,
1735417381
with options \\"\$ac_cs_config\\"
1735517382

configure.ac

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- Autoconf -*-
22
# Process this file with autoconf to produce a configure script.
3-
# Copyright (c) 2007-2013 John Hurst. All rights reserved.
3+
# Copyright (c) 2007-2015 John Hurst. All rights reserved.
44
#
55
# Redistribution and use in source and binary forms, with or without
66
# modification, are permitted provided that the following conditions
@@ -37,7 +37,7 @@ AC_PREREQ([2.59])
3737
# For example, if asdcplib version 1.0.0 were modified to accomodate changes
3838
# in file format, and if no changes were made to AS_DCP.h, the new version would be
3939
# 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1.
40-
AC_INIT([asdcplib], [2.1.1], [[email protected]])
40+
AC_INIT([asdcplib], [2.4.10], [[email protected]])
4141

4242
AC_CONFIG_AUX_DIR([build-aux])
4343
AC_CONFIG_SRCDIR([src/KM_error.h])
@@ -105,6 +105,14 @@ AC_ARG_ENABLE([as-02],
105105
*) AC_MSG_ERROR([bad value ${enableval} for --enable-as-02]) ;;
106106
esac],[as_02_use=false])
107107
AM_CONDITIONAL([USE_AS_02], [test x$as_02_use = xtrue])
108+
AC_ARG_ENABLE([phdr],
109+
[ --enable-phdr enable support for Prototype for High Dyamic Range in AS-02],
110+
[case "${enableval}" in
111+
yes) phdr_use=true ;;
112+
no) phdr_use=false ;;
113+
*) AC_MSG_ERROR([bad value ${enableval} for --enable-phdr]) ;;
114+
esac],[phdr_use=false])
115+
AM_CONDITIONAL([USE_PHDR], [test x$phdr_use = xtrue])
108116

109117
# Checks for libraries.
110118
AC_CHECK_LIB([pthread], [pthread_create])

src/AS_02.h

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2011-2013, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
2+
Copyright (c) 2011-2014, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
33
John Hurst
44
55
All rights reserved.
@@ -27,7 +27,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2727
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*/
2929
/*! \file AS_02.h
30-
\version $Id: AS_02.h,v 1.15 2014/01/02 23:29:21 jhurst Exp $
30+
\version $Id: AS_02.h,v 1.18 2015/02/19 19:06:56 jhurst Exp $
3131
\brief AS-02 library, public interface
3232
3333
This module implements MXF AS-02 is a set of file access objects that
@@ -118,16 +118,27 @@ namespace AS_02
118118
}
119119

120120
// Returns number of frames for data described by ADesc, given a duration in samples and an edit rate
121-
inline ui32_t CalcFramesFromDurationInSamples(const ui32_t durationInSamples, const ASDCP::MXF::WaveAudioDescriptor& d,
121+
inline ui32_t CalcFramesFromDurationInSamples(const ui32_t duration_samples, const ASDCP::MXF::WaveAudioDescriptor& d,
122122
const ASDCP::Rational& edit_rate)
123123
{
124-
return static_cast<ui32_t>(static_cast<ui64_t>(durationInSamples) *
125-
static_cast<ui64_t>(d.AudioSamplingRate.Denominator * edit_rate.Numerator) /
126-
static_cast<ui64_t>(d.AudioSamplingRate.Numerator * edit_rate.Denominator));
124+
ui32_t spf = CalcSamplesPerFrame(d, edit_rate);
125+
ui32_t frames = duration_samples / spf;
126+
127+
if ( duration_samples % spf != 0 )
128+
{
129+
++frames;
130+
}
131+
132+
return frames;
127133
}
128134

129135
} // namespace MXF
130136

137+
138+
// IMF App 2 edit rates not already exposed in namespace ASDCP
139+
const ASDCP::Rational EditRate_29_97 = ASDCP::Rational(30000, 1001);
140+
const ASDCP::Rational EditRate_59_94 = ASDCP::Rational(60000, 1001);
141+
131142
//---------------------------------------------------------------------------------
132143
// Accessors in the MXFReader and MXFWriter classes below return these types to
133144
// provide direct access to MXF metadata structures declared in MXF.h and Metadata.h

src/AS_02_JP2K.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2727
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*/
2929
/*! \file AS_02_JP2K.cpp
30-
\version $Id: AS_02_JP2K.cpp,v 1.13 2014/01/02 23:29:21 jhurst Exp $
30+
\version $Id: AS_02_JP2K.cpp,v 1.14 2014/09/21 13:27:43 jhurst Exp $
3131
\brief AS-02 library, JPEG 2000 essence reader and writer implementation
3232
*/
3333

@@ -264,7 +264,8 @@ AS_02::JP2K::MXFWriter::h__Writer::OpenWrite(const std::string& filename,
264264
{
265265
if ( ! m_State.Test_BEGIN() )
266266
{
267-
return RESULT_STATE;
267+
KM_RESULT_STATE_HERE();
268+
return RESULT_STATE;
268269
}
269270

270271
if ( m_IndexStrategy != AS_02::IS_FOLLOW )
@@ -319,7 +320,8 @@ AS_02::JP2K::MXFWriter::h__Writer::SetSourceStream(const std::string& label, con
319320
assert(m_Dict);
320321
if ( ! m_State.Test_INIT() )
321322
{
322-
return RESULT_STATE;
323+
KM_RESULT_STATE_HERE();
324+
return RESULT_STATE;
323325
}
324326

325327
memcpy(m_EssenceUL, m_Dict->ul(MDD_JPEG2000Essence), SMPTE_UL_LENGTH);
@@ -378,7 +380,10 @@ Result_t
378380
AS_02::JP2K::MXFWriter::h__Writer::Finalize()
379381
{
380382
if ( ! m_State.Test_RUNNING() )
381-
return RESULT_STATE;
383+
{
384+
KM_RESULT_STATE_HERE();
385+
return RESULT_STATE;
386+
}
382387

383388
Result_t result = m_State.Goto_FINAL();
384389

0 commit comments

Comments
 (0)