OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 if (!vp9_read_sync_code(&rb)) | 148 if (!vp9_read_sync_code(&rb)) |
149 return VPX_CODEC_UNSUP_BITSTREAM; | 149 return VPX_CODEC_UNSUP_BITSTREAM; |
150 | 150 |
151 if (profile > PROFILE_1) | 151 if (profile > PROFILE_1) |
152 rb.bit_offset += 1; // Bit-depth 10 or 12 | 152 rb.bit_offset += 1; // Bit-depth 10 or 12 |
153 colorspace = vp9_rb_read_literal(&rb, 3); | 153 colorspace = vp9_rb_read_literal(&rb, 3); |
154 if (colorspace != sRGB) { | 154 if (colorspace != sRGB) { |
155 rb.bit_offset += 1; // [16,235] (including xvycc) vs [0,255] range | 155 rb.bit_offset += 1; // [16,235] (including xvycc) vs [0,255] range |
156 if (profile == PROFILE_1 || profile == PROFILE_3) { | 156 if (profile == PROFILE_1 || profile == PROFILE_3) { |
157 rb.bit_offset += 2; // subsampling x/y | 157 rb.bit_offset += 2; // subsampling x/y |
158 rb.bit_offset += 1; // has extra plane | 158 rb.bit_offset += 1; // unused |
159 } | 159 } |
160 } else { | 160 } else { |
161 if (profile == PROFILE_1 || profile == PROFILE_3) { | 161 if (profile == PROFILE_1 || profile == PROFILE_3) { |
162 rb.bit_offset += 1; // has extra plane | 162 rb.bit_offset += 1; // unused |
163 } else { | 163 } else { |
164 // RGB is only available in version 1 | 164 // RGB is only available in version 1 |
165 return VPX_CODEC_UNSUP_BITSTREAM; | 165 return VPX_CODEC_UNSUP_BITSTREAM; |
166 } | 166 } |
167 } | 167 } |
168 vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h); | 168 vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h); |
169 } else { | 169 } else { |
170 intra_only_flag = show_frame ? 0 : vp9_rb_read_bit(&rb); | 170 intra_only_flag = show_frame ? 0 : vp9_rb_read_bit(&rb); |
171 rb.bit_offset += error_resilient ? 0 : 2; // reset_frame_context | 171 rb.bit_offset += error_resilient ? 0 : 2; // reset_frame_context |
172 | 172 |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 { // NOLINT | 709 { // NOLINT |
710 NOT_IMPLEMENTED, // vpx_codec_enc_cfg_map_t | 710 NOT_IMPLEMENTED, // vpx_codec_enc_cfg_map_t |
711 NOT_IMPLEMENTED, // vpx_codec_encode_fn_t | 711 NOT_IMPLEMENTED, // vpx_codec_encode_fn_t |
712 NOT_IMPLEMENTED, // vpx_codec_get_cx_data_fn_t | 712 NOT_IMPLEMENTED, // vpx_codec_get_cx_data_fn_t |
713 NOT_IMPLEMENTED, // vpx_codec_enc_config_set_fn_t | 713 NOT_IMPLEMENTED, // vpx_codec_enc_config_set_fn_t |
714 NOT_IMPLEMENTED, // vpx_codec_get_global_headers_fn_t | 714 NOT_IMPLEMENTED, // vpx_codec_get_global_headers_fn_t |
715 NOT_IMPLEMENTED, // vpx_codec_get_preview_frame_fn_t | 715 NOT_IMPLEMENTED, // vpx_codec_get_preview_frame_fn_t |
716 NOT_IMPLEMENTED // vpx_codec_enc_mr_get_mem_loc_fn_t | 716 NOT_IMPLEMENTED // vpx_codec_enc_mr_get_mem_loc_fn_t |
717 } | 717 } |
718 }; | 718 }; |
OLD | NEW |