Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
f370db0c
Commit
f370db0c
authored
11 years ago
by
Dmitry Kovalev
Browse files
Options
Download
Patches
Plain Diff
Adding setup_quantization function.
Change-Id: I8fe25a905717a3cd2da5f87ba0403357536183cf
parent
2a6e09d8
v1.14.0-linphone
1.4.X
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/decoder/vp9_decodframe.c
+18
-21
vp9/decoder/vp9_decodframe.c
with
18 additions
and
21 deletions
vp9/decoder/vp9_decodframe.c
+
18
−
21
View file @
f370db0c
...
@@ -118,11 +118,10 @@ void vp9_init_de_quantizer(VP9D_COMP *pbi) {
...
@@ -118,11 +118,10 @@ void vp9_init_de_quantizer(VP9D_COMP *pbi) {
static
int
get_qindex
(
MACROBLOCKD
*
mb
,
int
segment_id
,
int
base_qindex
)
{
static
int
get_qindex
(
MACROBLOCKD
*
mb
,
int
segment_id
,
int
base_qindex
)
{
// Set the Q baseline allowing for any segment level adjustment
// Set the Q baseline allowing for any segment level adjustment
if
(
vp9_segfeature_active
(
mb
,
segment_id
,
SEG_LVL_ALT_Q
))
{
if
(
vp9_segfeature_active
(
mb
,
segment_id
,
SEG_LVL_ALT_Q
))
{
if
(
mb
->
mb_segment_abs_delta
==
SEGMENT_ABSDATA
)
const
int
data
=
vp9_get_segdata
(
mb
,
segment_id
,
SEG_LVL_ALT_Q
);
return
vp9_get_segdata
(
mb
,
segment_id
,
SEG_LVL_ALT_Q
);
// Abs Value
return
mb
->
mb_segment_abs_delta
==
SEGMENT_ABSDATA
?
else
data
:
// Abs value
return
clamp
(
base_qindex
+
vp9_get_segdata
(
mb
,
segment_id
,
SEG_LVL_ALT_Q
),
clamp
(
base_qindex
+
data
,
0
,
MAXQ
);
// Delta value
0
,
MAXQ
);
// Delta Value
}
else
{
}
else
{
return
base_qindex
;
return
base_qindex
;
}
}
...
@@ -1317,6 +1316,19 @@ static void setup_loopfilter(VP9_COMMON *pc, MACROBLOCKD *xd, vp9_reader *r) {
...
@@ -1317,6 +1316,19 @@ static void setup_loopfilter(VP9_COMMON *pc, MACROBLOCKD *xd, vp9_reader *r) {
}
}
}
}
static
void
setup_quantization
(
VP9D_COMP
*
pbi
,
vp9_reader
*
r
)
{
// Read the default quantizers
VP9_COMMON
*
const
pc
=
&
pbi
->
common
;
pc
->
base_qindex
=
vp9_read_literal
(
r
,
QINDEX_BITS
);
if
(
get_delta_q
(
r
,
&
pc
->
y1dc_delta_q
)
|
get_delta_q
(
r
,
&
pc
->
uvdc_delta_q
)
|
get_delta_q
(
r
,
&
pc
->
uvac_delta_q
))
vp9_init_de_quantizer
(
pbi
);
mb_init_dequantizer
(
pbi
,
&
pbi
->
mb
);
// MB level dequantizer setup
}
static
const
uint8_t
*
read_frame_size
(
VP9_COMMON
*
const
pc
,
const
uint8_t
*
data
,
static
const
uint8_t
*
read_frame_size
(
VP9_COMMON
*
const
pc
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
const
uint8_t
*
data_end
,
int
*
width
,
int
*
height
)
{
int
*
width
,
int
*
height
)
{
...
@@ -1619,22 +1631,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
...
@@ -1619,22 +1631,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
// Dummy read for now
// Dummy read for now
vp9_read_literal
(
&
header_bc
,
2
);
vp9_read_literal
(
&
header_bc
,
2
);
// Read the default quantizers.
setup_quantization
(
pbi
,
&
header_bc
);
{
int
q_update
=
0
;
pc
->
base_qindex
=
vp9_read_literal
(
&
header_bc
,
QINDEX_BITS
);
// AC 1st order Q = default
q_update
=
get_delta_q
(
&
header_bc
,
&
pc
->
y1dc_delta_q
)
|
get_delta_q
(
&
header_bc
,
&
pc
->
uvdc_delta_q
)
|
get_delta_q
(
&
header_bc
,
&
pc
->
uvac_delta_q
);
if
(
q_update
)
vp9_init_de_quantizer
(
pbi
);
// MB level dequantizer setup
mb_init_dequantizer
(
pbi
,
&
pbi
->
mb
);
}
// Determine if the golden frame or ARF buffer should be updated and how.
// Determine if the golden frame or ARF buffer should be updated and how.
// For all non key frames the GF and ARF refresh flags and sign bias
// For all non key frames the GF and ARF refresh flags and sign bias
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets