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

Side by Side Diff: source/libvpx/vp8/decoder/decodeframe.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « source/libvpx/vp8/decoder/dboolhuff.c ('k') | source/libvpx/vp8/decoder/error_concealment.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/decoder/dboolhuff.c ('k') | source/libvpx/vp8/decoder/error_concealment.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698