vp9_quantize.h 2.87 KB
Newer Older
John Koleszar's avatar
John Koleszar committed
1
/*
2
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
John Koleszar's avatar
John Koleszar committed
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
6
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
7
 *  in the file PATENTS.  All contributing project authors may
8
 *  be found in the AUTHORS file in the root of the source tree.
John Koleszar's avatar
John Koleszar committed
9
10
 */

11
12
#ifndef VP9_ENCODER_VP9_QUANTIZE_H_
#define VP9_ENCODER_VP9_QUANTIZE_H_
John Koleszar's avatar
John Koleszar committed
13

14
#include "vp9/encoder/vp9_block.h"
John Koleszar's avatar
John Koleszar committed
15
16

#define prototype_quantize_block(sym) \
John Koleszar's avatar
John Koleszar committed
17
  void (sym)(BLOCK *b,BLOCKD *d)
John Koleszar's avatar
John Koleszar committed
18

19
#define prototype_quantize_block_pair(sym) \
John Koleszar's avatar
John Koleszar committed
20
  void (sym)(BLOCK *b1, BLOCK *b2, BLOCKD *d1, BLOCKD *d2)
21
22

#define prototype_quantize_mb(sym) \
John Koleszar's avatar
John Koleszar committed
23
  void (sym)(MACROBLOCK *x)
Tero Rintaluoma's avatar
Tero Rintaluoma committed
24

25
#if ARCH_X86 || ARCH_X86_64
26
#include "x86/vp9_quantize_x86.h"
27
28
#endif

John Koleszar's avatar
John Koleszar committed
29
#if ARCH_ARM
30
#include "arm/vp9_quantize_arm.h"
John Koleszar's avatar
John Koleszar committed
31
32
#endif

Deb Mukherjee's avatar
Deb Mukherjee committed
33
34
#define prototype_quantize_block_type(sym) \
  void (sym)(BLOCK *b, BLOCKD *d, TX_TYPE type)
35
extern prototype_quantize_block_type(vp9_ht_quantize_b_4x4);
John Koleszar's avatar
John Koleszar committed
36

37
38
#ifndef vp9_quantize_quantb_4x4
#define vp9_quantize_quantb_4x4 vp9_regular_quantize_b_4x4
39
#endif
40
extern prototype_quantize_block(vp9_quantize_quantb_4x4);
41

42
43
#ifndef vp9_quantize_quantb_4x4_pair
#define vp9_quantize_quantb_4x4_pair vp9_regular_quantize_b_4x4_pair
44
#endif
45
extern prototype_quantize_block_pair(vp9_quantize_quantb_4x4_pair);
46

47
48
#ifndef vp9_quantize_quantb_8x8
#define vp9_quantize_quantb_8x8 vp9_regular_quantize_b_8x8
49
#endif
50
extern prototype_quantize_block(vp9_quantize_quantb_8x8);
51

52
53
#ifndef vp9_quantize_quantb_16x16
#define vp9_quantize_quantb_16x16 vp9_regular_quantize_b_16x16
Daniel Kang's avatar
Daniel Kang committed
54
#endif
55
extern prototype_quantize_block(vp9_quantize_quantb_16x16);
Daniel Kang's avatar
Daniel Kang committed
56

57
58
#ifndef vp9_quantize_quantb_2x2
#define vp9_quantize_quantb_2x2 vp9_regular_quantize_b_2x2
59
#endif
60
extern prototype_quantize_block(vp9_quantize_quantb_2x2);
61

62
63
#ifndef vp9_quantize_mb_4x4
#define vp9_quantize_mb_4x4 vp9_quantize_mb_4x4_c
64
#endif
65
66
extern prototype_quantize_mb(vp9_quantize_mb_4x4);
void vp9_quantize_mb_8x8(MACROBLOCK *x);
67

68
69
#ifndef vp9_quantize_mbuv_4x4
#define vp9_quantize_mbuv_4x4 vp9_quantize_mbuv_4x4_c
70
#endif
71
extern prototype_quantize_mb(vp9_quantize_mbuv_4x4);
72

73
74
#ifndef vp9_quantize_mby_4x4
#define vp9_quantize_mby_4x4 vp9_quantize_mby_4x4_c
75
#endif
76
extern prototype_quantize_mb(vp9_quantize_mby_4x4);
Tero Rintaluoma's avatar
Tero Rintaluoma committed
77

78
79
extern prototype_quantize_mb(vp9_quantize_mby_8x8);
extern prototype_quantize_mb(vp9_quantize_mbuv_8x8);
80

81
void vp9_quantize_mb_16x16(MACROBLOCK *x);
82
extern prototype_quantize_block(vp9_quantize_quantb_16x16);
83
extern prototype_quantize_mb(vp9_quantize_mby_16x16);
Daniel Kang's avatar
Daniel Kang committed
84

85
struct VP9_COMP;
86

87
extern void vp9_set_quantizer(struct VP9_COMP *cpi, int Q);
88

89
extern void vp9_frame_init_quantizer(struct VP9_COMP *cpi);
90

91
extern void vp9_update_zbin_extra(struct VP9_COMP *cpi, MACROBLOCK *x);
92

93
extern void vp9_mb_init_quantizer(struct VP9_COMP *cpi, MACROBLOCK *x);
94

95
extern void vp9_init_quantizer(struct VP9_COMP *cpi);
96

John Koleszar's avatar
John Koleszar committed
97
#endif