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

Side by Side Diff: source/libvpx/vp9/common/vp9_idct.h

Issue 23600008: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_findnearmv.c ('k') | source/libvpx/vp9/common/vp9_idct.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
11 #ifndef VP9_COMMON_VP9_IDCT_H_ 11 #ifndef VP9_COMMON_VP9_IDCT_H_
12 #define VP9_COMMON_VP9_IDCT_H_ 12 #define VP9_COMMON_VP9_IDCT_H_
13 13
14 #include <assert.h> 14 #include <assert.h>
15 15
16 #include "./vpx_config.h" 16 #include "./vpx_config.h"
17 #include "vpx/vpx_integer.h" 17 #include "vpx/vpx_integer.h"
18 #include "vp9/common/vp9_common.h" 18 #include "vp9/common/vp9_common.h"
19 19
20 20
21 // Constants and Macros used by all idct/dct functions 21 // Constants and Macros used by all idct/dct functions
22 #define DCT_CONST_BITS 14 22 #define DCT_CONST_BITS 14
23 #define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1)) 23 #define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1))
24 24
25 #define WHT_UPSCALE_FACTOR 2 25 #define WHT_UPSCALE_FACTOR 2
26 26
27 #define pair_set_epi16(a, b) \ 27 #define pair_set_epi16(a, b) \
28 _mm_set1_epi32(((uint16_t)(a)) + (((uint16_t)(b)) << 16)) 28 _mm_set1_epi32(((uint16_t)(a)) + (((uint16_t)(b)) << 16))
29 29
30 #define pair_set_epi32(a, b) \
31 _mm_set_epi32(b, a, b, a)
32
30 // Constants: 33 // Constants:
31 // for (int i = 1; i< 32; ++i) 34 // for (int i = 1; i< 32; ++i)
32 // printf("static const int cospi_%d_64 = %.0f;\n", i, 35 // printf("static const int cospi_%d_64 = %.0f;\n", i,
33 // round(16384 * cos(i*M_PI/64))); 36 // round(16384 * cos(i*M_PI/64)));
34 // Note: sin(k*Pi/64) = cos((32-k)*Pi/64) 37 // Note: sin(k*Pi/64) = cos((32-k)*Pi/64)
35 static const int cospi_1_64 = 16364; 38 static const int cospi_1_64 = 16364;
36 static const int cospi_2_64 = 16305; 39 static const int cospi_2_64 = 16305;
37 static const int cospi_3_64 = 16207; 40 static const int cospi_3_64 = 16207;
38 static const int cospi_4_64 = 16069; 41 static const int cospi_4_64 = 16069;
39 static const int cospi_5_64 = 15893; 42 static const int cospi_5_64 = 15893;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return rv; 79 return rv;
77 } 80 }
78 81
79 typedef void (*transform_1d)(int16_t*, int16_t*); 82 typedef void (*transform_1d)(int16_t*, int16_t*);
80 83
81 typedef struct { 84 typedef struct {
82 transform_1d cols, rows; // vertical and horizontal 85 transform_1d cols, rows; // vertical and horizontal
83 } transform_2d; 86 } transform_2d;
84 87
85 #endif // VP9_COMMON_VP9_IDCT_H_ 88 #endif // VP9_COMMON_VP9_IDCT_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_findnearmv.c ('k') | source/libvpx/vp9/common/vp9_idct.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698