Commit Graph

800 Commits

Author SHA1 Message Date
Michael Bradshaw
dae3d48a6f Merge "Remove docs saying binary elements default to 0" 2016-08-25 18:36:29 +00:00
Michael Bradshaw
39137d7385 Remove docs saying binary elements default to 0
They don't have a real default, and certainly not an integer value of 0.

Change-Id: I839291b9960315241068f99a0926fca3ca27ac18
2016-08-25 11:19:52 -07:00
Tom Finegan
2349904020 Merge "Fix legacy Makefile." 2016-08-25 17:52:16 +00:00
Michael Bradshaw
16e5d2a369 Merge "Do not skip over unknown elements at the root level" 2016-08-25 17:43:34 +00:00
Michael Bradshaw
80685d3865 Do not skip over unknown elements at the root level
OnUnknownElement() should be called to handle them.

Change-Id: Iebd99631f094e95d0c3e75952930962e15826bac
2016-08-24 17:37:03 -07:00
Tom Finegan
c1475044b4 Fix legacy Makefile.
- Replace definition of EXES var (fixes all target building
  nothing).
- Update mkvmuxer/mkvmuxer sample target dependencies and
  exe names.

Change-Id: I2951e0b60ae8dc18b2a7cae28fa28624967df987
2016-08-24 12:21:56 -07:00
Tom Finegan
58711e8c3e mkvparser_sample: Fix version info string.
Change-Id: I87dfe753358aede2eb5219cfef7456151cb3a7e7
2016-08-24 12:03:08 -07:00
Tom Finegan
837746f4d2 mkvparser_tests: Add invalid block test.
Add test that confirms expected failure when a block
that ends beyond the current cluster is encountered.

Change-Id: I27abcab6d00b78c14b7ca00f51c97e43c5cdd34c
2016-08-23 17:55:52 -07:00
Tom Finegan
207cd80a86 Disambiguate sample sources and targets.
sample => mkvparser_sample
sample_muxer => mkvmuxer_sample

Change-Id: Iba6a1276da9c1bb4a46fc5c4521392f89f08a59e
2016-08-23 17:55:52 -07:00
Tom Finegan
a112d71cd0 mkvparser_tests: Refactor invalid file loading code.
Combine duped loading code into one method.

Change-Id: I3c4f9b7003f032a04b734f452f3c684d1af8e841
2016-08-23 17:55:49 -07:00
Tom Finegan
5dea33eacc Disambiguate test source and target names.
Rename source files and targets to better reflect what is
actually being tested.

muxer_tests => mkvmuxer_tests
parser_tests => mkvparser_tests

Change-Id: I921901f37d269f294b96ba20732b31c27f81945b
2016-08-23 10:29:30 -07:00
Tom Finegan
125049eecd parser_tests: Add another truncated chapter string test.
Causes mkvparser to fail in a slightly different way.

Change-Id: Id60fd43e6d0ef1871842367d19db52f60a8721cc
2016-08-19 12:44:43 -07:00
Tom Finegan
1de8d4cb4f parser_tests: Add truncated chapter string test.
Change-Id: I1714fbfea5bab61cca61cd32a0a0d30315ed56fc
2016-08-19 12:13:14 -07:00
Tom Finegan
ff8c2b6af7 parser_tests: Move cue validation to test_util.
And tidy it up a bit.

Change-Id: I68e7f16ad2aa922fdb064802e8986a6955364c32
2016-08-19 11:57:08 -07:00
Tom Finegan
4b0690faa2 parser_tests: Add invalid lacing test.
Also fixes leak this test exposed in mkvparser::Cluster.

Change-Id: I06ae11b72bc89219b6b2b407b4cc215982e3ae65
2016-08-19 11:57:05 -07:00
Tom Finegan
64ae831047 Merge "mkvmuxer: Set default doc type version to 4." 2016-08-12 21:59:33 +00:00
Tom Finegan
a351196dbb Merge "webm_parser: Reference more files in CMakeLists.txt." 2016-08-11 21:52:39 +00:00
Tom Finegan
9828e39874 mkvmuxer: Set default doc type version to 4.
mkvmuxer can write matroska v4 elements in all modes, but does
not always confirm that the doc type is high enough for all
elements written. The main culprits are Colour and its
children. Avoid problems by using 4 as the default version.
This avoids problems in all cases but those where users who
know what they are doing have written the EBML header manually.

Update the test files because the new default causes the file
compare abuse in the muxer tests to fail.

Update expected doc type version in the parsing tests.

BUG=webm:1201

Change-Id: I4c69000af4c1d5efe66315c17f3953344ef04993
2016-08-11 14:20:53 -07:00
Tom Finegan
5495a59d38 webm_parser: Reference more files in CMakeLists.txt.
Some includes were missed in the first pass when webm_parser
was added to CMakeLists.txt. Add the missing includes from
webm_parser/include/webm.

Change-Id: I193debe8018155ff9f0ab1d1326330069333948e
2016-08-11 08:48:45 -07:00
Tom Finegan
0c0ecd0f24 vpxpes_parser: Add start code emulation prevention support.
Remove bytes inserted to avoid start code emulation. Operates on:
- PES optional header
- BCMV header
- payloads.

Transforms the following byte sequences as noted (left converts to
right):
  0x00 0x00 0x03 0x01  =>  0x00 0x00 0x01
  0x00 0x00 0x03 0x03  =>  0x00 0x00 0x03

Change-Id: I09ae2d5bf03dfc1ade785ee89a773509eca8330c
2016-08-11 08:45:31 -07:00
Tom Finegan
639a4bc3b1 webm2pes: Remove debug printfs().
Change-Id: I13ba6590c63e7fef14efee812095ac704ef8b69e
2016-08-10 14:56:33 -07:00
Tom Finegan
9a51102cb5 webm2pes: fflush() in the correct conversion function.
Change-Id: I79db8b24178d4e7ba205995525b74a09efef8a04
2016-08-10 14:56:33 -07:00
Tom Finegan
dc7f15559f webm2pes: Track total bytes written.
Change-Id: I78807280cbd05f642215c83d5db4d04837c06438
2016-08-10 14:56:33 -07:00
Tom Finegan
d518128266 webm_parser: Enable usage of werror.
Mass warning clean up. Mainly:
- Explicit casts of numeric literals to avoid signed/unsigned compare
  warnings.
- Commenting out of unused function arg names.

Change-Id: I0e70393a5743ae984035d43712c724d4ccd12f9d
2016-08-10 08:56:57 -07:00
Tom Finegan
e1fe7627c8 webm2pes: Add test for mux/demux of large input.
Change-Id: I253aa49aa3757682dbba83bd9ba6dd1e93d7ccce
2016-08-08 11:15:29 -07:00
Tom Finegan
1b24a792e3 vpxpes_parser: Read and store PTS when present.
Change-Id: I11acb45b26eeea6f5945c04bb447937ba2ffca9f
2016-08-08 11:15:23 -07:00
Tom Finegan
6cf0a0f400 vpxpes_parser: Store frame payloads.
libwebm_util:
- Add 90khz -> nanosecond conversion.

vpxpes_parser:
- Get rid of VpxPesParser::VpxFrame and use VideoFrame.
- Store/Accumulate (when neccessary) PES payloads in
  VideoFrames.
- Change type of size constants from int to size_t.
- Return offset accounting for origin from FindStartCode().
- Check all PTS marker bits (instead of checking the second
  marker twice).

video_frame:
- Add nanosecond_pts mutator.

webm2pes:
- Write DTS/PTS presence flag correctly when PTS is not
  present.

Change-Id: I10f16cd03bb3a51205a25331527ddceb3769ba03
2016-08-08 11:14:03 -07:00
Tom Finegan
25d26028c1 webm_parser: Convert style to match the rest of libwebm
Remove webm_parser/clang-format-style.
Run clang-format -style=file -i for each source file.

Change-Id: Ieaf44bd323375cbcfec67014e94b7742d6bda14a
2016-07-27 14:31:28 -07:00
Tom Finegan
24be76dcb2 webm2pes: Replace VpxFrame with VideoFrame.
VideoFrame was created in order to get rid of the two
slightly different VpxFrame implementations. This patch
gets rid of Webm2Pes's version.

Change-Id: I5af29d5ca717121ee7ab30f28e42d2a43ea5abb0
2016-07-22 15:07:42 -07:00
Tom Finegan
b451c3ba96 Add a basic video frame storage class.
Includes simple tests.

Change-Id: I52276686d6c2bc7b62d260af37affe78aa4dcf50
2016-07-22 15:07:33 -07:00
Tom Finegan
05c90ebccc libwebm_util: Clarify error text in superframe parser.
Change-Id: Icb478d58306bc5e501df9585ece35c9747dd640d
2016-07-22 11:34:18 -07:00
Tom Finegan
e6415af941 webm2pes: Make WritePesPacket() a public method.
WritePesPacket() now takes a VpxFrame as input and a
PacketDataBuffer* as an output  parameter, and avoids
using members entirely. This facilitates deeper testing
of Webm2Pes without requiring friendship with test
classes and methods.

Change-Id: I076db8900cc1a5c864b54f5fe3403fb05b4bd835
2016-07-20 17:36:46 -07:00
Tom Finegan
8f840ddaa3 webm2pes: Move frame read out of PES packet write method.
Makes writing tests easier by allowing caller to pass data
for packetizing directly into the method.

Change-Id: I553fa8c1636041c4a5ff043862918a5cdc9163ba
2016-07-20 14:00:36 -07:00
Tom Finegan
448af971d2 webm2pes: Restore frame fragmentation support.
Cap packet payload at 32 kB. Update test to expect non-zero
packet length.

Change-Id: Ibb68a4ef8d32c049c492ae546c631ef6376e3ffd
2016-07-18 14:32:02 -07:00
Tom Finegan
f8bb7149f5 cmake: Integrate new parsing API and tests.
Change-Id: I11e32bfffda12fa910c06bf7b8e3a0efbccf6054
2016-07-14 11:11:59 -07:00
Michael Bradshaw
cb8ce0b4b5 Add a new incremental parsing API
Change-Id: I6b921766836d58df0281fb23b2add3f62a478e14
2016-06-15 12:39:58 -07:00
Tom Finegan
900d322cc8 vpxpes_parser/webm2pes: BCMV and PTS fixes.
- Write BCMV length value big endian and include BCMV header
  size.
- Write PTS bits big endian.

Change-Id: I8cd72c233c21f5909438f5a3bb817e9477bdfcfb
2016-06-02 17:05:09 -07:00
Tom Finegan
4b735452bb webm2pes: Add start code emulation prevention.
- Make start codes reliable for VPx in PES.
- Stop setting the PES size field and stop splitting packets when
  larger than UINT16_MAX (always set 0; rely on start codes to find
  packet boundaries).

Change-Id: I402e91c26562e930f61543ca59223b83cc92be29
2016-06-02 17:05:07 -07:00
Frank Galligan
82903f36fa Add column tiles and frame parallel to webm_info
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1227

Change-Id: I23b1611a91074bfa0cff3b788baeff71bc68d034
2016-05-17 09:00:41 -07:00
Vignesh Venkatasubramanian
5d91edf9f1 style_clean_up: Remove unnecessary parentheses
Change-Id: Ie3645319fa4d5a1fd254b4511a60ef6f6036afe5
2016-05-13 10:41:16 -07:00
hui su
a95aa4b294 vp9_level_stats: correct total_uncompressed_bits_ calculation
Only consider display frames.

Change-Id: I9061ad90775f0467a661b0ac5d11dc22e477a7c3
2016-05-06 15:37:09 -07:00
Tom Finegan
f46566f19a mkvreader: Fix shorten-64-to-32 warning in 32 bit builds.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1207

Change-Id: Ie1c97a314fefdf14dce455da16f5a29218ba4cf8
2016-05-06 11:40:48 -07:00
Tom Finegan
76630ca4a3 mkvwriter: Fix shorten-64-to-32 warning in 32 bit builds.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1207

Change-Id: I2dc1ce59ebf8051c9661b919813d5ab7cb115da0
2016-05-06 11:40:44 -07:00
Tom Finegan
a8ffbd4ed2 webm2pes: Fix format specifier warnings.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1207

Change-Id: If60866f8e60969bc6cbaef8eee72a805270bf65d
2016-05-06 11:40:38 -07:00
Frank Galligan
21015480f6 Merge "Add MaxLumaSampleRate grace percent to stats." 2016-05-02 22:00:22 +00:00
Frank Galligan
faf89d4ed1 Add MaxLumaSampleRate grace percent to stats.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1206

Change-Id: I29a956871bd5aa0c7b493601ed23b44a08414d32
2016-04-30 16:59:42 -07:00
Frank Galligan
d31e6c970d Fix profile 2 in vp9_header_parser.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1208

Change-Id: Ie31adef15eac965e3fb587825f63ff320c1d59fe
2016-04-29 17:11:29 -07:00
Frank Galligan
4fc66dab83 Merge "Add flag to estimate last frame's duration to stats." 2016-04-29 22:30:12 +00:00
Frank Galligan
bd3ab3abe6 Add flag to estimate last frame's duration to stats.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1204

Change-Id: Ie73e2981951f9eb6140bdfb0a6839320e009b7fe
2016-04-29 14:19:58 -07:00
Vignesh Venkatasubramanian
c89b968ce5 Merge "Fix lint issue in hdr_util.h" 2016-04-29 19:31:52 +00:00