Commit Graph

46 Commits

Author SHA1 Message Date
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
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
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
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
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
Vignesh Venkatasubramanian
c182ed97d1 Fix lint issue in hdr_util.h
Change-Id: Iba19ad153f9187c3942d406e41da04703f7dd5c7
2016-04-29 11:47:04 -07:00
Frank Galligan
196708a95f Change MaxLumaSampleRate to be based on frame resolution.
MaxLumaSampleRate generation code now takes into account the frame
resolution of every frame.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1203

Change-Id: I666fa2f21971ff4fb80219ef29dee3254cbb370c
2016-04-29 08:15:37 -07:00
Frank Galligan
47f2843e79 Add parsing support for new features in CodecPrivate.
Adds support for parsing bit depth and chroma subsampling features.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1198

Change-Id: I8d11829f5d43a518cbe0e5c0bdd4fd37db7b6266
2016-04-27 09:27:24 -07:00
Frank Galligan
e3c9576716 Add VP9 level output to webm_info.
Removed building webm_info from Makefile.unix as it now requires c++11.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1188

Change-Id: Ia142f0c3cd580f397449d2ffa8788f78fb7faff0
2016-04-26 22:16:31 -07:00
Frank Galligan
bbaaf2da8d Add class to gather VP9 level stats.
See http://www.webmproject.org/vp9/profiles/ for more information
on VP9 levels.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1188

Change-Id: I91448069bbd4740106a159014db6935365af75ca
2016-04-21 13:02:25 -07:00
Frank Galligan
8bb68c2b3e Add file to parse data from VP9 frames.
This class will parse and collect some data from VP9 frame
headers.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1188

Change-Id: Ie19e0f4a2f7e89d0378a66ce2e8e939250ddc383
2016-04-18 12:21:58 -07:00
Frank Galligan
296429a7dc Add support to parse VP9 profile.
This is the VP9 profile contained in the CodecPrivate data.

Change-Id: If5fd5667bfc86ff596354457539da363367128db
2016-04-18 12:15:59 -07:00
Frank Galligan
a1dc4f2f22 Fix parsing of VP9 level.
The VP9 level is contained in the CodecPrivate data.

Change-Id: I65475363ee230b422a8cdce8172f6262cb3329e7
2016-04-12 23:00:03 -07:00
Vignesh Venkatasubramanian
039df94e87 Add TEST_TMPDIR environment variable
Honor TEST_TMPDIR environment variable for creating temporary test
files in non-windows platforms. This helps in environments where
we cannot create a temporary file in the current directory.

Change-Id: I39e0a19580635d752171e0573dd21ec838cb81a4
2016-04-07 10:55:28 -07:00
Tom Finegan
5c50e310e7 Add support for parsing VPx track codec private data.
Currently only the VP9 profile level is supported.

http://www.webmproject.org/vp9/profiles/

Change-Id: Iff7238e104621b53fdd51a67d752bd72b2dbbacb
2016-04-04 11:16:33 -07:00
Tom Finegan
a1cba3409a Support cross compile for windows via mingw64.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1170

Change-Id: I8430600ceb610fbf1ecff34f0a2d2c1a57627692
2016-04-01 19:11:12 -04:00
Tom Finegan
596f5e0544 Add webm_info.
Migrated from the webm-tools repository with minor tweaks to
fix its build in the new location.

Last location/revision:
https://chromium.googlesource.com/webm/webm-tools
a7e97e8f0a913ddd97444392bb8816f44a4821a1

Change-Id: Icfad43d9fdd37fc413a6a28b57b370c97c7c28df
2016-04-01 12:07:38 -04:00
Tom Finegan
59614b8fae msvc/libwebm_util: Fix floating point to int conversion warning.
Change-Id: I3f813df344989b0200a49215ab0562d896577425
2016-03-31 10:32:35 -07:00
Tom Finegan
cbe5c40d12 Restore original namespaces for mkvmuxer and mkvparser.
Wrapping mkvmuxer and mkvparser in the libwebm namespace is no
longer necessary now that the tree reorganization is complete.
Put mkvmuxer and mkvparser namespaces back in the global
namespace to avoid unnecessary churn in downstream code.

Change-Id: I13a4fe0143d20bb2bb6038078c68636ff2af0c29
2016-03-21 14:41:49 -07:00
Tom Finegan
504e0f2d5b Mass file extension update.
- Use .cc and .h everywhere.
- Update includes/include guards.
- Remove extra makefile targets necessitated by previous mix
  of cpp/cc.

Change-Id: I7aad29152d4177937f8f42927c16c6572228c104
2016-03-21 14:41:47 -07:00
Tom Finegan
01db4c2d83 webmids: Move to common/ sub dir.
Change-Id: I87d0cbd78203a6680108e9e36588ff35e7ae8a4e
2016-03-21 14:41:24 -07:00
Tom Finegan
f578419a01 mkvmuxer: Move sources to mkvmuxer/ sub dir.
Change-Id: I22dff1e2ece102c294081ab2ec8600fdb872922e
2016-03-21 14:41:19 -07:00
Tom Finegan
008aa63d6a mkvparser: move to mkvparser sub dir.
Move mkvparser and mkvreader to mkvparser/.

Change-Id: I18c4575483f628344034d81b7d90d3aa86c163ff
2016-03-18 10:22:22 -07:00
Tom Finegan
e64bf75688 Namespace reorg: Make everything a child of libwebm.
(that is not already)
Some details:
- mkvmuxer and mkvparser wrapped by libwebm
- Matroska element constants moved from mkvmuxer to libwebm
- integer types moved from mkvmuxer to libwebm

Change-Id: Ic91e887e50adbc2d735bf6264534a5d01135df31
2016-03-18 10:22:16 -07:00
clang-format
91ca780522 reapply clang-format
Change-Id: Ic04e8429b07fe9b7dc15dc836d16ba9f30317ee2
2016-03-16 12:18:08 -07:00
Tom Finegan
110e79790b iwyu/libwebm_util: Update includes.
Include what you use analysis based include update.

Change-Id: I272351418ac19e66989ea7ba23b01561ff7a8ed4
2016-03-10 09:21:48 -08:00
Tom Finegan
b15b8ef1a0 iwyu/file_util: Update includes.
Include what you use analysis based include update.

Change-Id: I1aafbf5d9781a04e4b05f8e63ee72c6070df7b2b
2016-03-10 09:21:48 -08:00
Tom Finegan
3dfba9576a iwyu/hdr_util: Update includes.
Include what you use analysis based include update.

Change-Id: Iaa744570fe3e8f9eddc0fdbd1528c0689a3c40cb
2016-03-10 09:21:46 -08:00
Tom Finegan
e09251510f file_util: Remove tmpnam() usage in MSVC.
Replace with windows/MSVC specific tmpnam_s().

Change-Id: I8c49e37c72630ebb14ea3c7734b96d0f79968772
2016-03-08 11:22:33 -08:00
Tom Finegan
1b895e97d0 Rename libwebm_utils to libwebm_util.
Use a single naming convention.

Change-Id: Ia48089b05e5a453a402d4b4e7f258a56bee8a001
2016-03-07 14:27:07 -08:00
Tom Finegan
e6a0033a8c Add file_util.
Move file utility classes and functions from testing/test_util to
common/file_util, and make them part of libwebm.

Change-Id: If5b25a63b20efacc16b0fecaa8876ade4ecc4b26
2016-03-07 14:27:03 -08:00
Tom Finegan
87f9beae01 Move hdr_util to common.
Change-Id: I383680b79d798fd77bb385e1b8087967962eb230
2016-03-07 11:32:02 -08:00
Tom Finegan
f4885281b0 libwebm_utils: Silence sign compare warning.
Change-Id: I5b8cab857f7a8a48979ee8be6bd156b854952c61
2016-02-26 08:57:43 -08:00
Tom Finegan
9b89187db0 Add missing include to libwebm_utils.h.
Was missing cstdint and breaking builds on less forgiving
target systems. Also, make std namespace usage consistent.

Change-Id: I961b3ad66f8650fdebbb76a957c914c1b06e2de5
2016-02-24 14:48:41 -08:00
Tom Finegan
e569ab0f7c webm2pes/ts: Fix gcc build.
Fix the build and tidy up a couple things along the way.

- Add -std=c++11 to CMakeLists.txt CXX flags.
- Add missing include to libwebm_utils.h (<memory>).
- Setup CMAKE_CXX_FLAGS properly (allow user override).
- Add missing URL for gtest repo to README.libwebm.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1136

Change-Id: I894729216737ff92f58a7b7601484ba8fba73b25
2016-01-25 12:18:56 -08:00
Tom Finegan
be35869ce3 libwebm_utils: Add FileDeleter.
Put the FILE clean up functor in a common place to avoid duplication.

Change-Id: I7bcb5b3e4df7aa37bb90920ecb8acccf94eeaa57
2015-12-17 08:50:23 -08:00
Tom Finegan
e8fca12fb6 webm2pes: Fix super frame splitting.
Super frame index is at the end of the frame; not the beginning. Adjust
length to process instead of offsetting the start point for breaking up
the super frame.

Change-Id: I71910f24cc060934bb974548a29617b985985ed9
2015-12-17 08:50:17 -08:00
Tom Finegan
3cb96b6e33 webm2pes: Move main() and helper functions into their own files.
- main() and Usage() to webm2pes_main.cc
- Other helpers to common/libwebm_utils.{cc,h}

Change-Id: I59e45f0e63449066b493c4e536e0be001372504c
2015-12-17 08:38:13 -08:00
Tom Finegan
4baaa2c9a3 Add framework build script: iosbuild.sh
Builds WebM.framework.

Change-Id: I6f71defa18a7cbb21e290dbbb819a85353912e53
2015-05-06 10:33:48 -07:00