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
aa25f6a3
Commit
aa25f6a3
authored
11 years ago
by
Scott LaVarnway
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Remove unnecessary vp9_copy_memNxN() calls" into experimental
parents
815e95fb
02162f1b
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_dequantize.c
+80
-91
vp9/decoder/vp9_dequantize.c
with
80 additions
and
91 deletions
vp9/decoder/vp9_dequantize.c
+
80
−
91
View file @
aa25f6a3
...
@@ -127,9 +127,7 @@ void vp9_dequant_idct_add_c(int16_t *input, const int16_t *dq, uint8_t *pred,
...
@@ -127,9 +127,7 @@ void vp9_dequant_idct_add_c(int16_t *input, const int16_t *dq, uint8_t *pred,
// the idct halves ( >> 1) the pitch
// the idct halves ( >> 1) the pitch
vp9_short_idct4x4
(
input
,
output
,
4
<<
1
);
vp9_short_idct4x4
(
input
,
output
,
4
<<
1
);
vpx_memset
(
input
,
0
,
32
);
vpx_memset
(
input
,
0
,
32
);
vp9_add_residual_4x4
(
output
,
pred
,
pitch
,
dest
,
stride
);
vp9_add_residual_4x4
(
output
,
pred
,
pitch
,
dest
,
stride
);
}
else
{
}
else
{
vp9_dc_only_idct_add
(
input
[
0
]
*
dq
[
0
],
pred
,
dest
,
pitch
,
stride
);
vp9_dc_only_idct_add
(
input
[
0
]
*
dq
[
0
],
pred
,
dest
,
pitch
,
stride
);
...
@@ -164,9 +162,7 @@ void vp9_dequant_idct_add_lossless_c(int16_t *input, const int16_t *dq,
...
@@ -164,9 +162,7 @@ void vp9_dequant_idct_add_lossless_c(int16_t *input, const int16_t *dq,
input
[
i
]
*=
dq
[
i
];
input
[
i
]
*=
dq
[
i
];
vp9_short_iwalsh4x4_c
(
input
,
output
,
4
<<
1
);
vp9_short_iwalsh4x4_c
(
input
,
output
,
4
<<
1
);
vpx_memset
(
input
,
0
,
32
);
vpx_memset
(
input
,
0
,
32
);
vp9_add_residual_4x4
(
output
,
pred
,
pitch
,
dest
,
stride
);
vp9_add_residual_4x4
(
output
,
pred
,
pitch
,
dest
,
stride
);
}
else
{
}
else
{
vp9_dc_only_inv_walsh_add
(
input
[
0
]
*
dq
[
0
],
pred
,
dest
,
pitch
,
stride
);
vp9_dc_only_inv_walsh_add
(
input
[
0
]
*
dq
[
0
],
pred
,
dest
,
pitch
,
stride
);
...
@@ -204,52 +200,51 @@ void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq,
...
@@ -204,52 +200,51 @@ void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq,
// coefficients. Use eobs to decide what to do.
// coefficients. Use eobs to decide what to do.
// TODO(yunqingwang): "eobs = 1" case is also handled in vp9_short_idct8x8_c.
// TODO(yunqingwang): "eobs = 1" case is also handled in vp9_short_idct8x8_c.
// Combine that with code here.
// Combine that with code here.
if
(
eob
==
0
)
{
if
(
eob
)
{
// All 0 DCT coefficients
if
(
eob
==
1
)
{
vp9_copy_mem8x8
(
pred
,
pitch
,
dest
,
stride
);
// DC only DCT coefficient
}
else
if
(
eob
==
1
)
{
int16_t
in
=
input
[
0
];
// DC only DCT coefficient
int16_t
out
;
int16_t
in
=
input
[
0
];
int16_t
out
;
// Note: the idct1 will need to be modified accordingly whenever
// Note: the idct1 will need to be modified accordingly whenever
// vp9_short_idct8x8_c() is modified.
// vp9_short_idct8x8_c() is modified.
vp9_short_idct1_8x8_c
(
&
in
,
&
out
);
vp9_short_idct1_8x8_c
(
&
in
,
&
out
);
input
[
0
]
=
0
;
input
[
0
]
=
0
;
vp9_add_constant_residual_8x8
(
out
,
pred
,
pitch
,
dest
,
stride
);
vp9_add_constant_residual_8x8
(
out
,
pred
,
pitch
,
dest
,
stride
);
#if !CONFIG_SCATTERSCAN
#if !CONFIG_SCATTERSCAN
}
else
if
(
eob
<=
10
)
{
}
else
if
(
eob
<=
10
)
{
input
[
1
]
*=
dq
[
1
];
input
[
1
]
*=
dq
[
1
];
input
[
2
]
*=
dq
[
1
];
input
[
2
]
*=
dq
[
1
];
input
[
3
]
*=
dq
[
1
];
input
[
3
]
*=
dq
[
1
];
input
[
8
]
*=
dq
[
1
];
input
[
8
]
*=
dq
[
1
];
input
[
9
]
*=
dq
[
1
];
input
[
9
]
*=
dq
[
1
];
input
[
10
]
*=
dq
[
1
];
input
[
10
]
*=
dq
[
1
];
input
[
16
]
*=
dq
[
1
];
input
[
16
]
*=
dq
[
1
];
input
[
17
]
*=
dq
[
1
];
input
[
17
]
*=
dq
[
1
];
input
[
24
]
*=
dq
[
1
];
input
[
24
]
*=
dq
[
1
];
vp9_short_idct10_8x8
(
input
,
output
,
16
);
vp9_short_idct10_8x8
(
input
,
output
,
16
);
input
[
0
]
=
input
[
1
]
=
input
[
2
]
=
input
[
3
]
=
0
;
input
[
8
]
=
input
[
9
]
=
input
[
10
]
=
0
;
input
[
16
]
=
input
[
17
]
=
0
;
input
[
24
]
=
0
;
vp9_add_residual_8x8
(
output
,
pred
,
pitch
,
dest
,
stride
);
input
[
0
]
=
input
[
1
]
=
input
[
2
]
=
input
[
3
]
=
0
;
input
[
8
]
=
input
[
9
]
=
input
[
10
]
=
0
;
input
[
16
]
=
input
[
17
]
=
0
;
input
[
24
]
=
0
;
vp9_add_residual_8x8
(
output
,
pred
,
pitch
,
dest
,
stride
);
#endif
#endif
}
else
{
}
else
{
int
i
;
int
i
;
// recover quantizer for 4 4x4 blocks
// recover quantizer for 4 4x4 blocks
for
(
i
=
1
;
i
<
64
;
i
++
)
for
(
i
=
1
;
i
<
64
;
i
++
)
input
[
i
]
*=
dq
[
1
];
input
[
i
]
*=
dq
[
1
];
// the idct halves ( >> 1) the pitch
// the idct halves ( >> 1) the pitch
vp9_short_idct8x8
(
input
,
output
,
8
<<
1
);
vp9_short_idct8x8
(
input
,
output
,
8
<<
1
);
vpx_memset
(
input
,
0
,
128
);
vpx_memset
(
input
,
0
,
128
);
vp9_add_residual_8x8
(
output
,
pred
,
pitch
,
dest
,
stride
);
vp9_add_residual_8x8
(
output
,
pred
,
pitch
,
dest
,
stride
);
}
}
}
}
}
...
@@ -259,10 +254,7 @@ void vp9_dequant_iht_add_16x16_c(TX_TYPE tx_type, int16_t *input,
...
@@ -259,10 +254,7 @@ void vp9_dequant_iht_add_16x16_c(TX_TYPE tx_type, int16_t *input,
int
eob
)
{
int
eob
)
{
DECLARE_ALIGNED_ARRAY
(
16
,
int16_t
,
output
,
256
);
DECLARE_ALIGNED_ARRAY
(
16
,
int16_t
,
output
,
256
);
if
(
eob
==
0
)
{
if
(
eob
>
0
)
{
// All 0 DCT coefficients
vp9_copy_mem16x16
(
pred
,
pitch
,
dest
,
stride
);
}
else
if
(
eob
>
0
)
{
int
i
;
int
i
;
input
[
0
]
*=
dq
[
0
];
input
[
0
]
*=
dq
[
0
];
...
@@ -290,58 +282,55 @@ void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
...
@@ -290,58 +282,55 @@ void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
/* The calculation can be simplified if there are not many non-zero dct
/* The calculation can be simplified if there are not many non-zero dct
* coefficients. Use eobs to separate different cases. */
* coefficients. Use eobs to separate different cases. */
if
(
eob
==
0
)
{
if
(
eob
)
{
/* All 0 DCT coefficient */
if
(
eob
==
1
)
{
vp9_copy_mem16x16
(
pred
,
pitch
,
dest
,
stride
);
/* DC only DCT coefficient. */
}
else
if
(
eob
==
1
)
{
int16_t
in
=
input
[
0
]
*
dq
[
0
];
/* DC only DCT coefficient. */
int16_t
out
;
int16_t
in
=
input
[
0
]
*
dq
[
0
];
/* Note: the idct1 will need to be modified accordingly whenever
int16_t
out
;
* vp9_short_idct16x16() is modified. */
/* Note: the idct1 will need to be modified accordingly whenever
vp9_short_idct1_16x16_c
(
&
in
,
&
out
);
* vp9_short_idct16x16() is modified. */
input
[
0
]
=
0
;
vp9_short_idct1_16x16_c
(
&
in
,
&
out
);
input
[
0
]
=
0
;
vp9_add_constant_residual_16x16
(
out
,
pred
,
pitch
,
dest
,
stride
);
#if !CONFIG_SCATTERSCAN
}
else
if
(
eob
<=
10
)
{
input
[
0
]
*=
dq
[
0
];
input
[
1
]
*=
dq
[
1
];
vp9_add_constant_residual_16x16
(
out
,
pred
,
pitch
,
dest
,
stride
);
input
[
2
]
*=
dq
[
1
];
#if !CONFIG_SCATTERSCAN
input
[
3
]
*=
dq
[
1
];
}
else
if
(
eob
<=
10
)
{
input
[
16
]
*=
dq
[
1
];
input
[
0
]
*=
dq
[
0
];
input
[
17
]
*=
dq
[
1
];
input
[
18
]
*=
dq
[
1
];
input
[
1
]
*=
dq
[
1
];
input
[
32
]
*=
dq
[
1
];
input
[
2
]
*=
dq
[
1
];
input
[
33
]
*=
dq
[
1
];
input
[
3
]
*=
dq
[
1
];
input
[
48
]
*=
dq
[
1
];
input
[
16
]
*=
dq
[
1
];
input
[
17
]
*=
dq
[
1
];
input
[
18
]
*=
dq
[
1
];
input
[
32
]
*=
dq
[
1
];
input
[
33
]
*=
dq
[
1
];
input
[
48
]
*=
dq
[
1
];
// the idct halves ( >> 1) the pitch
// the idct halves ( >> 1) the pitch
vp9_short_idct10_16x16
(
input
,
output
,
32
);
vp9_short_idct10_16x16
(
input
,
output
,
32
);
input
[
0
]
=
input
[
1
]
=
input
[
2
]
=
input
[
3
]
=
0
;
input
[
0
]
=
input
[
1
]
=
input
[
2
]
=
input
[
3
]
=
0
;
input
[
16
]
=
input
[
17
]
=
input
[
18
]
=
0
;
input
[
16
]
=
input
[
17
]
=
input
[
18
]
=
0
;
input
[
32
]
=
input
[
33
]
=
0
;
input
[
32
]
=
input
[
33
]
=
0
;
input
[
48
]
=
0
;
input
[
48
]
=
0
;
vp9_add_residual_16x16
(
output
,
pred
,
pitch
,
dest
,
stride
);
vp9_add_residual_16x16
(
output
,
pred
,
pitch
,
dest
,
stride
);
#endif
#endif
}
else
{
}
else
{
int
i
;
int
i
;
input
[
0
]
*=
dq
[
0
];
// recover quantizer for 4 4x4 blocks
for
(
i
=
1
;
i
<
256
;
i
++
)
input
[
i
]
*=
dq
[
1
];
// the idct halves ( >> 1) the pitch
input
[
0
]
*=
dq
[
0
];
vp9_short_idct16x16
(
input
,
output
,
16
<<
1
);
vpx_memset
(
input
,
0
,
512
);
// recover quantizer for 4 4x4 blocks
for
(
i
=
1
;
i
<
256
;
i
++
)
input
[
i
]
*=
dq
[
1
];
vp9_add_residual_16x16
(
output
,
pred
,
pitch
,
dest
,
stride
);
// the idct halves ( >> 1) the pitch
vp9_short_idct16x16
(
input
,
output
,
16
<<
1
);
vpx_memset
(
input
,
0
,
512
);
vp9_add_residual_16x16
(
output
,
pred
,
pitch
,
dest
,
stride
);
}
}
}
}
}
...
...
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