Commit Graph

62 Commits

Author SHA1 Message Date
James Zern
faf76029b0 Merge "vp9_header_parser: make SetFrame private" 2018-02-02 19:46:59 +00:00
Tom Finegan
8e88e04b07 webm2pes: Avoid OOB reads caused by invalid superframe index.
BUG=webm:1492

Change-Id: Ibd5781731fe8f6fcdf5f1cc6e5807d17b3b92d4d
2018-02-02 07:06:43 -08:00
James Zern
a5837e4dd0 vp9_header_parser: make SetFrame private
and call it from ParseUncompressedHeader. this avoids attempts to parse
a stale buffer should SetFrame fail.

BUG=webm:1493

Change-Id: I441ae9d0db3f0a01d73902a8f5b06812e2e93422
2018-02-02 00:39:52 -08:00
Lisa Velden
d707c67276 Replace uses of deprecated std::auto_ptr with std::unique_ptr.
Change-Id: I8d67fc6f3ce168f4d8b6330549f766dbf5374d61
2018-01-24 11:37:37 +01:00
Tom Finegan
1653953c39 Silence -Wdeprecated-declarations in GCC 4.7+.
Change-Id: I63a8bdb0649452a8e50b579f61bc4ea5d7e294f7
2017-12-18 11:35:40 -08:00
Hui Su
9e37f34e48 Update VP9 level definition
Add luma picture max width and height constraint.

BUG=b/65412009

Change-Id: I25545eb632b29c4241e335896e6f284102e27623
2017-12-07 16:34:18 -08:00
Tom Finegan
7baf4cb898 Merge "Fix include-what-you-use warning in common/file_util.cc." 2017-09-19 18:40:18 +00:00
Tom Finegan
e590bc2d5a Fix include-what-you-use warning in common/file_util.cc.
Add include for <string>.

Change-Id: I053fb2e6e36889e819703c601b2df8c6d313817f
2017-09-19 11:38:58 -07:00
Tom Finegan
27eb0b9002 Fix builds with mingw x86 and x86_64.
- Deal with tmpnam_s() preproc issues in file_util.cc
  when building with mingw-w64..
- Add stdint.h include in mkvmuxer.cc.

Change-Id: I819a27e6d805d772a6e1863982a2eeafd27b2a0d
2017-09-18 13:19:17 -07:00
Neil Birkbeck
2e76d22782 Add command line support for projection_type
Add command line for projection_type, projection_pose_{yaw,pitch,roll}.
Use a file for projection_private data to allow setting the contents
for cubemap, equirect, or mesh.

Change-Id: I45f20c68a5d01150d0fb3882ad1c587a8b9f63f2
2017-08-07 18:15:01 -07:00
James Zern
84e82579f7 disable -Wdeprecated-declarations in legacy code
this avoids downstream projects from needing to add this flag to their
build.

BUG=webm:1445

Change-Id: I03f3cc20496bc52245b6c3c013ae3c13936f4b4f
2017-06-20 19:18:42 -07:00
James Zern
85f7e2e428 webm_info,PrintVP9Info: validate alt ref sizes
fixes out of bounds reads with corrupted bitstreams

BUG=webm:1416,webm:1417

Change-Id: Ia643708b4b74d153a7b1dee1c4cbcab7f79d7111
2017-04-21 15:15:26 -07:00
James Zern
9b97ca197d vp9_header_parser_tests: check parser return
ensure ParseUncompressedHeader() succeeds with valid bitstreams

Change-Id: I1e3900fc08f3b6b2e86bc2f59fd8fd96bc26ad0f
2017-04-21 15:15:26 -07:00
Frank Galligan
c97e3e7d60 Add support to output sub-sample encryption information.
See http://wiki.webmproject.org/encryption/webm-subsample-encryption
for the format.

Change-Id: Ia5d6f3566b92c46911704108d3e86cd0fac9ee34
2016-10-13 09:04:52 -07:00
Tom Finegan
027861614c mkvmuxer: Colour accessors/mutators.
Make data members of Colour and children private, and add
accessors and mutators for the changes members.

Change-Id: I203f6b4e8047cd4dae5c1b662649b535e05148fd
2016-08-30 18:13:51 -07:00
Tom Finegan
483a0ff800 mkvmuxer: Add Projection element support.
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: Ia935ba975a0f01c1fb2919325ab7f70254c2ed10
2016-08-29 14:29:25 -07: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
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