Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
e8747866
Commit
e8747866
authored
May 07, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
May 07, 2013
Browse files
Merge "Renaming Y1 and UV quant prefixes to y_ and uv_." into experimental
parents
80997b3a
1e7cf5d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_int.h
View file @
e8747866
...
...
@@ -259,17 +259,17 @@ enum BlockSize {
typedef
struct
VP9_COMP
{
DECLARE_ALIGNED
(
16
,
short
,
Y1
quant
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
unsigned
char
,
Y1
quant_shift
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
Y1
zbin
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
Y1
round
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
y_
quant
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
unsigned
char
,
y_
quant_shift
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
y_
zbin
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
y_
round
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
UV
quant
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
unsigned
char
,
UV
quant_shift
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
UV
zbin
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
UV
round
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
uv_
quant
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
unsigned
char
,
uv_
quant_shift
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
uv_
zbin
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
uv_
round
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
zrun_zbin_boost_y
1
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
zrun_zbin_boost_y
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
short
,
zrun_zbin_boost_uv
[
QINDEX_RANGE
][
16
]);
MACROBLOCK
mb
;
...
...
vp9/encoder/vp9_quantize.c
View file @
e8747866
...
...
@@ -162,16 +162,17 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
}
// dc values
quant_val
=
vp9_dc_quant
(
q
,
cpi
->
common
.
y_dc_delta_q
);
invert_quant
(
cpi
->
Y1
quant
[
q
]
+
0
,
cpi
->
Y1
quant_shift
[
q
]
+
0
,
quant_val
);
cpi
->
Y1
zbin
[
q
][
0
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_val
,
7
);
cpi
->
Y1
round
[
q
][
0
]
=
(
qrounding_factor
*
quant_val
)
>>
7
;
invert_quant
(
cpi
->
y_
quant
[
q
]
+
0
,
cpi
->
y_
quant_shift
[
q
]
+
0
,
quant_val
);
cpi
->
y_
zbin
[
q
][
0
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_val
,
7
);
cpi
->
y_
round
[
q
][
0
]
=
(
qrounding_factor
*
quant_val
)
>>
7
;
cpi
->
common
.
y_dequant
[
q
][
0
]
=
quant_val
;
cpi
->
zrun_zbin_boost_y1
[
q
][
0
]
=
(
quant_val
*
zbin_boost
[
0
])
>>
7
;
cpi
->
zrun_zbin_boost_y
[
q
][
0
]
=
(
quant_val
*
zbin_boost
[
0
])
>>
7
;
quant_val
=
vp9_dc_quant
(
q
,
cpi
->
common
.
uv_dc_delta_q
);
invert_quant
(
cpi
->
UV
quant
[
q
]
+
0
,
cpi
->
UV
quant_shift
[
q
]
+
0
,
quant_val
);
cpi
->
UV
zbin
[
q
][
0
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_val
,
7
);
cpi
->
UV
round
[
q
][
0
]
=
(
qrounding_factor
*
quant_val
)
>>
7
;
invert_quant
(
cpi
->
uv_
quant
[
q
]
+
0
,
cpi
->
uv_
quant_shift
[
q
]
+
0
,
quant_val
);
cpi
->
uv_
zbin
[
q
][
0
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_val
,
7
);
cpi
->
uv_
round
[
q
][
0
]
=
(
qrounding_factor
*
quant_val
)
>>
7
;
cpi
->
common
.
uv_dequant
[
q
][
0
]
=
quant_val
;
cpi
->
zrun_zbin_boost_uv
[
q
][
0
]
=
(
quant_val
*
zbin_boost
[
0
])
>>
7
;
...
...
@@ -183,16 +184,16 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
for
(
i
=
1
;
i
<
16
;
i
++
)
{
int
rc
=
vp9_default_zig_zag1d_4x4
[
i
];
invert_quant
(
cpi
->
Y1
quant
[
q
]
+
rc
,
cpi
->
Y1
quant_shift
[
q
]
+
rc
,
quant_val
);
cpi
->
Y1
zbin
[
q
][
rc
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_val
,
7
);
cpi
->
Y1
round
[
q
][
rc
]
=
(
qrounding_factor
*
quant_val
)
>>
7
;
cpi
->
zrun_zbin_boost_y
1
[
q
][
i
]
=
invert_quant
(
cpi
->
y_
quant
[
q
]
+
rc
,
cpi
->
y_
quant_shift
[
q
]
+
rc
,
quant_val
);
cpi
->
y_
zbin
[
q
][
rc
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_val
,
7
);
cpi
->
y_
round
[
q
][
rc
]
=
(
qrounding_factor
*
quant_val
)
>>
7
;
cpi
->
zrun_zbin_boost_y
[
q
][
i
]
=
ROUND_POWER_OF_TWO
(
quant_val
*
zbin_boost
[
i
],
7
);
invert_quant
(
cpi
->
UV
quant
[
q
]
+
rc
,
cpi
->
UV
quant_shift
[
q
]
+
rc
,
invert_quant
(
cpi
->
uv_
quant
[
q
]
+
rc
,
cpi
->
uv_
quant_shift
[
q
]
+
rc
,
quant_uv_val
);
cpi
->
UV
zbin
[
q
][
rc
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_uv_val
,
7
);
cpi
->
UV
round
[
q
][
rc
]
=
(
qrounding_factor
*
quant_uv_val
)
>>
7
;
cpi
->
uv_
zbin
[
q
][
rc
]
=
ROUND_POWER_OF_TWO
(
qzbin_factor
*
quant_uv_val
,
7
);
cpi
->
uv_
round
[
q
][
rc
]
=
(
qrounding_factor
*
quant_uv_val
)
>>
7
;
cpi
->
zrun_zbin_boost_uv
[
q
][
i
]
=
ROUND_POWER_OF_TWO
(
quant_uv_val
*
zbin_boost
[
i
],
7
);
}
...
...
@@ -210,11 +211,11 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
zbin_extra
=
(
cpi
->
common
.
y_dequant
[
qindex
][
1
]
*
(
cpi
->
zbin_mode_boost
+
x
->
act_zbin_adj
))
>>
7
;
x
->
plane
[
0
].
quant
=
cpi
->
Y1
quant
[
qindex
];
x
->
plane
[
0
].
quant_shift
=
cpi
->
Y1
quant_shift
[
qindex
];
x
->
plane
[
0
].
zbin
=
cpi
->
Y1
zbin
[
qindex
];
x
->
plane
[
0
].
round
=
cpi
->
Y1
round
[
qindex
];
x
->
plane
[
0
].
zrun_zbin_boost
=
cpi
->
zrun_zbin_boost_y
1
[
qindex
];
x
->
plane
[
0
].
quant
=
cpi
->
y_
quant
[
qindex
];
x
->
plane
[
0
].
quant_shift
=
cpi
->
y_
quant_shift
[
qindex
];
x
->
plane
[
0
].
zbin
=
cpi
->
y_
zbin
[
qindex
];
x
->
plane
[
0
].
round
=
cpi
->
y_
round
[
qindex
];
x
->
plane
[
0
].
zrun_zbin_boost
=
cpi
->
zrun_zbin_boost_y
[
qindex
];
x
->
plane
[
0
].
zbin_extra
=
(
int16_t
)
zbin_extra
;
x
->
e_mbd
.
plane
[
0
].
dequant
=
cpi
->
common
.
y_dequant
[
qindex
];
...
...
@@ -223,10 +224,10 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
(
cpi
->
zbin_mode_boost
+
x
->
act_zbin_adj
))
>>
7
;
for
(
i
=
1
;
i
<
3
;
i
++
)
{
x
->
plane
[
i
].
quant
=
cpi
->
UV
quant
[
qindex
];
x
->
plane
[
i
].
quant_shift
=
cpi
->
UV
quant_shift
[
qindex
];
x
->
plane
[
i
].
zbin
=
cpi
->
UV
zbin
[
qindex
];
x
->
plane
[
i
].
round
=
cpi
->
UV
round
[
qindex
];
x
->
plane
[
i
].
quant
=
cpi
->
uv_
quant
[
qindex
];
x
->
plane
[
i
].
quant_shift
=
cpi
->
uv_
quant_shift
[
qindex
];
x
->
plane
[
i
].
zbin
=
cpi
->
uv_
zbin
[
qindex
];
x
->
plane
[
i
].
round
=
cpi
->
uv_
round
[
qindex
];
x
->
plane
[
i
].
zrun_zbin_boost
=
cpi
->
zrun_zbin_boost_uv
[
qindex
];
x
->
plane
[
i
].
zbin_extra
=
(
int16_t
)
zbin_extra
;
x
->
e_mbd
.
plane
[
i
].
dequant
=
cpi
->
common
.
uv_dequant
[
qindex
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment