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

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

Issue 54923004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 1 month 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 #include "vp9/common/vp9_enums.h"
19 20
20 21
21 // Constants and Macros used by all idct/dct functions 22 // Constants and Macros used by all idct/dct functions
22 #define DCT_CONST_BITS 14 23 #define DCT_CONST_BITS 14
23 #define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1)) 24 #define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1))
24 25
25 #define WHT_UPSCALE_FACTOR 2 26 #define UNIT_QUANT_SHIFT 2
27 #define UNIT_QUANT_FACTOR (1 << UNIT_QUANT_SHIFT)
26 28
27 #define pair_set_epi16(a, b) \ 29 #define pair_set_epi16(a, b) \
28 _mm_set1_epi32(((uint16_t)(a)) + (((uint16_t)(b)) << 16)) 30 _mm_set_epi16(b, a, b, a, b, a, b, a)
29 31
30 #define pair_set_epi32(a, b) \ 32 #define pair_set_epi32(a, b) \
31 _mm_set_epi32(b, a, b, a) 33 _mm_set_epi32(b, a, b, a)
32 34
33 // Constants: 35 // Constants:
34 // for (int i = 1; i< 32; ++i) 36 // for (int i = 1; i< 32; ++i)
35 // printf("static const int cospi_%d_64 = %.0f;\n", i, 37 // printf("static const int cospi_%d_64 = %.0f;\n", i,
36 // round(16384 * cos(i*M_PI/64))); 38 // round(16384 * cos(i*M_PI/64)));
37 // Note: sin(k*Pi/64) = cos((32-k)*Pi/64) 39 // Note: sin(k*Pi/64) = cos((32-k)*Pi/64)
38 static const int cospi_1_64 = 16364; 40 static const int cospi_1_64 = 16364;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 static const int sinpi_2_9 = 9929; 74 static const int sinpi_2_9 = 9929;
73 static const int sinpi_3_9 = 13377; 75 static const int sinpi_3_9 = 13377;
74 static const int sinpi_4_9 = 15212; 76 static const int sinpi_4_9 = 15212;
75 77
76 static INLINE int dct_const_round_shift(int input) { 78 static INLINE int dct_const_round_shift(int input) {
77 int rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS); 79 int rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS);
78 assert(INT16_MIN <= rv && rv <= INT16_MAX); 80 assert(INT16_MIN <= rv && rv <= INT16_MAX);
79 return rv; 81 return rv;
80 } 82 }
81 83
82 typedef void (*transform_1d)(int16_t*, int16_t*); 84 typedef void (*transform_1d)(const int16_t*, int16_t*);
83 85
84 typedef struct { 86 typedef struct {
85 transform_1d cols, rows; // vertical and horizontal 87 transform_1d cols, rows; // vertical and horizontal
86 } transform_2d; 88 } transform_2d;
87 89
90 void vp9_iwht4x4_add(const int16_t *input, uint8_t *dest, int stride, int eob);
91
92 void vp9_idct4x4_add(const int16_t *input, uint8_t *dest, int stride, int eob);
93 void vp9_idct8x8_add(const int16_t *input, uint8_t *dest, int stride, int eob);
94 void vp9_idct16x16_add(const int16_t *input, uint8_t *dest, int stride, int
95 eob);
96 void vp9_idct32x32_add(const int16_t *input, uint8_t *dest, int stride,
97 int eob);
98
99 void vp9_iht4x4_add(TX_TYPE tx_type, const int16_t *input, uint8_t *dest,
100 int stride, int eob);
101 void vp9_iht8x8_add(TX_TYPE tx_type, const int16_t *input, uint8_t *dest,
102 int stride, int eob);
103 void vp9_iht16x16_add(TX_TYPE tx_type, const int16_t *input, uint8_t *dest,
104 int stride, int eob);
105
106
88 #endif // VP9_COMMON_VP9_IDCT_H_ 107 #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