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
76a437a3
Commit
76a437a3
authored
11 years ago
by
Yaowu Xu
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Replacing init_dequantizer() with setup_plane_dequants()."
parents
872c6d85
d6606d1e
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
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
+12
-15
vp9/decoder/vp9_decodframe.c
with
12 additions
and
15 deletions
vp9/decoder/vp9_decodframe.c
+
12
−
15
View file @
76a437a3
...
...
@@ -77,14 +77,11 @@ static void read_tx_probs(struct tx_probs *tx_probs, vp9_reader *r) {
vp9_diff_update_prob
(
r
,
&
tx_probs
->
p32x32
[
i
][
j
]);
}
static
void
init
_dequant
izer
(
VP9_COMMON
*
cm
,
MACROBLOCKD
*
xd
)
{
static
void
setup_plane
_dequant
s
(
VP9_COMMON
*
cm
,
MACROBLOCKD
*
xd
,
int
q_index
)
{
int
i
;
const
int
segment_id
=
xd
->
mode_info_context
->
mbmi
.
segment_id
;
xd
->
q_index
=
vp9_get_qindex
(
&
cm
->
seg
,
segment_id
,
cm
->
base_qindex
);
xd
->
plane
[
0
].
dequant
=
cm
->
y_dequant
[
xd
->
q_index
];
xd
->
plane
[
0
].
dequant
=
cm
->
y_dequant
[
q_index
];
for
(
i
=
1
;
i
<
MAX_MB_PLANE
;
i
++
)
xd
->
plane
[
i
].
dequant
=
cm
->
uv_dequant
[
xd
->
q_index
];
xd
->
plane
[
i
].
dequant
=
cm
->
uv_dequant
[
q_index
];
}
static
void
decode_block
(
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
...
...
@@ -149,14 +146,17 @@ static void decode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
}
static
int
decode_tokens
(
VP9D_COMP
*
pbi
,
BLOCK_SIZE
bsize
,
vp9_reader
*
r
)
{
VP9_COMMON
*
const
cm
=
&
pbi
->
common
;
MACROBLOCKD
*
const
xd
=
&
pbi
->
mb
;
MB_MODE_INFO
*
const
mbmi
=
&
xd
->
mode_info_context
->
mbmi
;
if
(
xd
->
mode_info_context
->
mbmi
.
skip_coeff
)
{
reset_skip_context
(
xd
,
bsize
);
if
(
mbmi
->
skip_coeff
)
{
reset_skip_context
(
xd
,
bsize
);
return
-
1
;
}
else
{
if
(
pbi
->
common
.
seg
.
enabled
)
init_dequantizer
(
&
pbi
->
common
,
xd
);
if
(
cm
->
seg
.
enabled
)
setup_plane_dequants
(
cm
,
xd
,
vp9_get_qindex
(
&
cm
->
seg
,
mbmi
->
segment_id
,
cm
->
base_qindex
));
// TODO(dkovalev) if (!vp9_reader_has_error(r))
return
vp9_decode_tokens
(
pbi
,
r
,
bsize
);
...
...
@@ -173,6 +173,7 @@ static void set_offsets(VP9D_COMP *pbi, BLOCK_SIZE bsize,
xd
->
mode_info_context
=
cm
->
mi
+
offset
;
xd
->
mode_info_context
->
mbmi
.
sb_type
=
bsize
;
xd
->
mode_info_stride
=
cm
->
mode_info_stride
;
// Special case: if prev_mi is NULL, the previous mode info context
// cannot be used.
xd
->
prev_mode_info_context
=
cm
->
prev_mi
?
cm
->
prev_mi
+
offset
:
NULL
;
...
...
@@ -958,11 +959,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
"Truncated packet or corrupt header length"
);
xd
->
mode_info_context
=
cm
->
mi
;
xd
->
prev_mode_info_context
=
cm
->
prev_mi
;
xd
->
mode_info_stride
=
cm
->
mode_info_stride
;
init_dequantizer
(
cm
,
&
pbi
->
mb
);
setup_plane_dequants
(
cm
,
&
pbi
->
mb
,
cm
->
base_qindex
);
cm
->
fc
=
cm
->
frame_contexts
[
cm
->
frame_context_idx
];
...
...
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