Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: source/libvpx/vp9/vp9_dx_iface.c

Issue 394353005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/vp9_cx_iface.c ('k') | source/libvpx/vp9/vp9cx.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/vp9_dx_iface.c
===================================================================
--- source/libvpx/vp9/vp9_dx_iface.c (revision 284462)
+++ source/libvpx/vp9/vp9_dx_iface.c (working copy)
@@ -122,13 +122,12 @@
int error_resilient;
struct vp9_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL };
const int frame_marker = vp9_rb_read_literal(&rb, 2);
- const int version = vp9_rb_read_bit(&rb);
- (void) vp9_rb_read_bit(&rb); // unused version bit
+ const BITSTREAM_PROFILE profile = vp9_read_profile(&rb);
if (frame_marker != VP9_FRAME_MARKER)
return VPX_CODEC_UNSUP_BITSTREAM;
- if (version > 1) return VPX_CODEC_UNSUP_BITSTREAM;
+ if (profile >= MAX_PROFILES) return VPX_CODEC_UNSUP_BITSTREAM;
if (vp9_rb_read_bit(&rb)) { // show an existing frame
vp9_rb_read_literal(&rb, 3); // Frame buffer to show.
@@ -149,15 +148,17 @@
if (!vp9_read_sync_code(&rb))
return VPX_CODEC_UNSUP_BITSTREAM;
+ if (profile > PROFILE_1)
+ rb.bit_offset += 1; // Bit-depth 10 or 12
colorspace = vp9_rb_read_literal(&rb, 3);
if (colorspace != sRGB) {
rb.bit_offset += 1; // [16,235] (including xvycc) vs [0,255] range
- if (version == 1) {
+ if (profile == PROFILE_1 || profile == PROFILE_3) {
rb.bit_offset += 2; // subsampling x/y
rb.bit_offset += 1; // has extra plane
}
} else {
- if (version == 1) {
+ if (profile == PROFILE_1 || profile == PROFILE_3) {
rb.bit_offset += 1; // has extra plane
} else {
// RGB is only available in version 1
« no previous file with comments | « source/libvpx/vp9/vp9_cx_iface.c ('k') | source/libvpx/vp9/vp9cx.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698