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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include "decodemv.h" | 28 #include "decodemv.h" |
29 #include "vp8/common/extend.h" | 29 #include "vp8/common/extend.h" |
30 #if CONFIG_ERROR_CONCEALMENT | 30 #if CONFIG_ERROR_CONCEALMENT |
31 #include "error_concealment.h" | 31 #include "error_concealment.h" |
32 #endif | 32 #endif |
33 #include "vpx_mem/vpx_mem.h" | 33 #include "vpx_mem/vpx_mem.h" |
34 #include "vp8/common/threading.h" | 34 #include "vp8/common/threading.h" |
35 #include "decoderthreading.h" | 35 #include "decoderthreading.h" |
36 #include "dboolhuff.h" | 36 #include "dboolhuff.h" |
| 37 #include "vpx_dsp/vpx_dsp_common.h" |
37 | 38 |
38 #include <assert.h> | 39 #include <assert.h> |
39 #include <stdio.h> | 40 #include <stdio.h> |
40 | 41 |
41 void vp8cx_init_de_quantizer(VP8D_COMP *pbi) | 42 void vp8cx_init_de_quantizer(VP8D_COMP *pbi) |
42 { | 43 { |
43 int Q; | 44 int Q; |
44 VP8_COMMON *const pc = & pbi->common; | 45 VP8_COMMON *const pc = & pbi->common; |
45 | 46 |
46 for (Q = 0; Q < QINDEX_RANGE; Q++) | 47 for (Q = 0; Q < QINDEX_RANGE; Q++) |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 pc->version = 0; | 1015 pc->version = 0; |
1015 pc->show_frame = 1; | 1016 pc->show_frame = 1; |
1016 first_partition_length_in_bytes = 0; | 1017 first_partition_length_in_bytes = 0; |
1017 } | 1018 } |
1018 else | 1019 else |
1019 { | 1020 { |
1020 unsigned char clear_buffer[10]; | 1021 unsigned char clear_buffer[10]; |
1021 const unsigned char *clear = data; | 1022 const unsigned char *clear = data; |
1022 if (pbi->decrypt_cb) | 1023 if (pbi->decrypt_cb) |
1023 { | 1024 { |
1024 int n = (int)MIN(sizeof(clear_buffer), data_end - data); | 1025 int n = (int)VPXMIN(sizeof(clear_buffer), data_end - data); |
1025 pbi->decrypt_cb(pbi->decrypt_state, data, clear_buffer, n); | 1026 pbi->decrypt_cb(pbi->decrypt_state, data, clear_buffer, n); |
1026 clear = clear_buffer; | 1027 clear = clear_buffer; |
1027 } | 1028 } |
1028 | 1029 |
1029 pc->frame_type = (FRAME_TYPE)(clear[0] & 1); | 1030 pc->frame_type = (FRAME_TYPE)(clear[0] & 1); |
1030 pc->version = (clear[0] >> 1) & 7; | 1031 pc->version = (clear[0] >> 1) & 7; |
1031 pc->show_frame = (clear[0] >> 4) & 1; | 1032 pc->show_frame = (clear[0] >> 4) & 1; |
1032 first_partition_length_in_bytes = | 1033 first_partition_length_in_bytes = |
1033 (clear[0] | (clear[1] << 8) | (clear[2] << 16)) >> 5; | 1034 (clear[0] | (clear[1] << 8) | (clear[2] << 16)) >> 5; |
1034 | 1035 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 FILE *f = fopen("decompressor.VP8", "ab"); | 1390 FILE *f = fopen("decompressor.VP8", "ab"); |
1390 unsigned int size = pbi->bc2.pos + pbi->bc.pos + 8; | 1391 unsigned int size = pbi->bc2.pos + pbi->bc.pos + 8; |
1391 fwrite((void *) &size, 4, 1, f); | 1392 fwrite((void *) &size, 4, 1, f); |
1392 fwrite((void *) pbi->Source, size, 1, f); | 1393 fwrite((void *) pbi->Source, size, 1, f); |
1393 fclose(f); | 1394 fclose(f); |
1394 } | 1395 } |
1395 #endif | 1396 #endif |
1396 | 1397 |
1397 return 0; | 1398 return 0; |
1398 } | 1399 } |
OLD | NEW |