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 |
11 #include <stdlib.h> | 11 #include <stdlib.h> |
12 #include <string.h> | 12 #include <string.h> |
13 | 13 |
14 #include "./vpx_config.h" | 14 #include "./vpx_config.h" |
15 #include "./vpx_version.h" | 15 #include "./vpx_version.h" |
16 | 16 |
17 #include "vpx/internal/vpx_codec_internal.h" | 17 #include "vpx/internal/vpx_codec_internal.h" |
18 #include "vpx/vp8dx.h" | 18 #include "vpx/vp8dx.h" |
19 #include "vpx/vpx_decoder.h" | 19 #include "vpx/vpx_decoder.h" |
20 #include "vpx_dsp/bitreader_buffer.h" | 20 #include "vpx_dsp/bitreader_buffer.h" |
| 21 #include "vpx_dsp/vpx_dsp_common.h" |
21 #include "vpx_util/vpx_thread.h" | 22 #include "vpx_util/vpx_thread.h" |
22 | 23 |
23 #include "vp9/common/vp9_alloccommon.h" | 24 #include "vp9/common/vp9_alloccommon.h" |
24 #include "vp9/common/vp9_frame_buffers.h" | 25 #include "vp9/common/vp9_frame_buffers.h" |
25 | 26 |
26 #include "vp9/decoder/vp9_decoder.h" | 27 #include "vp9/decoder/vp9_decoder.h" |
27 #include "vp9/decoder/vp9_decodeframe.h" | 28 #include "vp9/decoder/vp9_decodeframe.h" |
28 | 29 |
29 #include "vp9/vp9_iface_common.h" | 30 #include "vp9/vp9_iface_common.h" |
30 | 31 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 int intra_only_flag = 0; | 177 int intra_only_flag = 0; |
177 uint8_t clear_buffer[9]; | 178 uint8_t clear_buffer[9]; |
178 | 179 |
179 if (data + data_sz <= data) | 180 if (data + data_sz <= data) |
180 return VPX_CODEC_INVALID_PARAM; | 181 return VPX_CODEC_INVALID_PARAM; |
181 | 182 |
182 si->is_kf = 0; | 183 si->is_kf = 0; |
183 si->w = si->h = 0; | 184 si->w = si->h = 0; |
184 | 185 |
185 if (decrypt_cb) { | 186 if (decrypt_cb) { |
186 data_sz = MIN(sizeof(clear_buffer), data_sz); | 187 data_sz = VPXMIN(sizeof(clear_buffer), data_sz); |
187 decrypt_cb(decrypt_state, data, clear_buffer, data_sz); | 188 decrypt_cb(decrypt_state, data, clear_buffer, data_sz); |
188 data = clear_buffer; | 189 data = clear_buffer; |
189 } | 190 } |
190 | 191 |
191 { | 192 { |
192 int show_frame; | 193 int show_frame; |
193 int error_resilient; | 194 int error_resilient; |
194 struct vpx_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL }; | 195 struct vpx_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL }; |
195 const int frame_marker = vpx_rb_read_literal(&rb, 2); | 196 const int frame_marker = vpx_rb_read_literal(&rb, 2); |
196 const BITSTREAM_PROFILE profile = vp9_read_profile(&rb); | 197 const BITSTREAM_PROFILE profile = vp9_read_profile(&rb); |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 0, | 1123 0, |
1123 NULL, // vpx_codec_enc_cfg_map_t | 1124 NULL, // vpx_codec_enc_cfg_map_t |
1124 NULL, // vpx_codec_encode_fn_t | 1125 NULL, // vpx_codec_encode_fn_t |
1125 NULL, // vpx_codec_get_cx_data_fn_t | 1126 NULL, // vpx_codec_get_cx_data_fn_t |
1126 NULL, // vpx_codec_enc_config_set_fn_t | 1127 NULL, // vpx_codec_enc_config_set_fn_t |
1127 NULL, // vpx_codec_get_global_headers_fn_t | 1128 NULL, // vpx_codec_get_global_headers_fn_t |
1128 NULL, // vpx_codec_get_preview_frame_fn_t | 1129 NULL, // vpx_codec_get_preview_frame_fn_t |
1129 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t | 1130 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t |
1130 } | 1131 } |
1131 }; | 1132 }; |
OLD | NEW |