Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
554d2c33
Commit
554d2c33
authored
Jul 11, 2017
by
Monty Montgomery
Committed by
Christopher Montgomery
Jul 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactor to match the 4x4 forward transform.
Change-Id: Ib5337dfa78b73059ad169ca98a07119aa991864b
parent
d032a447
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
av1/common/idct.c
av1/common/idct.c
+11
-6
av1/common/idct.h
av1/common/idct.h
+2
-2
av1/encoder/encodemb.c
av1/encoder/encodemb.c
+4
-4
No files found.
av1/common/idct.c
View file @
554d2c33
...
...
@@ -249,6 +249,10 @@ int get_inv_lgt8(transform_1d tx_orig, const INV_TXFM_PARAM *inv_txfm_param,
void
av1_iht4x4_16_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
INV_TXFM_PARAM
*
param
)
{
int
tx_type
=
param
->
tx_type
;
if
(
tx_type
==
DCT_DCT
)
{
aom_idct4x4_16_add
(
input
,
dest
,
stride
);
return
;
}
static
const
transform_2d
IHT_4
[]
=
{
{
aom_idct4_c
,
aom_idct4_c
},
// DCT_DCT = 0
{
aom_iadst4_c
,
aom_idct4_c
},
// ADST_DCT = 1
...
...
@@ -1303,15 +1307,17 @@ void av1_iht64x64_4096_add_c(const tran_low_t *input, uint8_t *dest, int stride,
// idct
void
av1_idct4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
)
{
const
INV_TXFM_PARAM
*
param
)
{
const
int
eob
=
param
->
eob
;
if
(
eob
>
1
)
a
om_idc
t4x4_16_add
(
input
,
dest
,
stride
);
a
v1_ih
t4x4_16_add
(
input
,
dest
,
stride
,
param
);
else
aom_idct4x4_1_add
(
input
,
dest
,
stride
);
}
void
av1_iwht4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
)
{
const
INV_TXFM_PARAM
*
param
)
{
const
int
eob
=
param
->
eob
;
if
(
eob
>
1
)
aom_iwht4x4_16_add
(
input
,
dest
,
stride
);
else
...
...
@@ -1427,15 +1433,14 @@ static void inv_txfm_add_2x2(const tran_low_t *input, uint8_t *dest, int stride,
static
void
inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
const
INV_TXFM_PARAM
*
param
)
{
const
TX_TYPE
tx_type
=
param
->
tx_type
;
const
int
eob
=
param
->
eob
;
if
(
param
->
lossless
)
{
assert
(
tx_type
==
DCT_DCT
);
av1_iwht4x4_add
(
input
,
dest
,
stride
,
eob
);
av1_iwht4x4_add
(
input
,
dest
,
stride
,
param
);
return
;
}
switch
(
tx_type
)
{
case
DCT_DCT
:
av1_idct4x4_add
(
input
,
dest
,
stride
,
eob
);
break
;
case
DCT_DCT
:
av1_idct4x4_add
(
input
,
dest
,
stride
,
param
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
...
...
av1/common/idct.h
View file @
554d2c33
...
...
@@ -76,9 +76,9 @@ typedef struct {
int
av1_get_tx_scale
(
const
TX_SIZE
tx_size
);
void
av1_iwht4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
const
INV_TXFM_PARAM
*
inv_txfm_param
);
void
av1_idct4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
const
INV_TXFM_PARAM
*
inv_txfm_param
);
void
av1_inv_txfm_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
INV_TXFM_PARAM
*
inv_txfm_param
);
...
...
av1/encoder/encodemb.c
View file @
554d2c33
...
...
@@ -822,6 +822,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
struct
macroblock_plane
*
const
p
=
&
x
->
plane
[
plane
];
struct
macroblockd_plane
*
const
pd
=
&
xd
->
plane
[
plane
];
tran_low_t
*
const
dqcoeff
=
BLOCK_OFFSET
(
pd
->
dqcoeff
,
block
);
INV_TXFM_PARAM
inv_txfm_param
;
uint8_t
*
dst
;
int
ctx
=
0
;
dst
=
&
pd
->
dst
...
...
@@ -857,12 +858,11 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
#endif // CONFIG_HIGHBITDEPTH
}
#endif // !CONFIG_PVQ
#if CONFIG_HIGHBITDEPTH
INV_TXFM_PARAM
inv_txfm_param
;
inv_txfm_param
.
bd
=
xd
->
bd
;
inv_txfm_param
.
tx_type
=
DCT_DCT
;
inv_txfm_param
.
eob
=
p
->
eobs
[
block
];
inv_txfm_param
.
lossless
=
xd
->
lossless
[
xd
->
mi
[
0
]
->
mbmi
.
segment_id
];
#if CONFIG_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
av1_highbd_inv_txfm_add_4x4
(
dqcoeff
,
dst
,
pd
->
dst
.
stride
,
&
inv_txfm_param
);
...
...
@@ -870,9 +870,9 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
}
#endif // CONFIG_HIGHBITDEPTH
if
(
xd
->
lossless
[
xd
->
mi
[
0
]
->
mbmi
.
segment_id
])
{
av1_iwht4x4_add
(
dqcoeff
,
dst
,
pd
->
dst
.
stride
,
p
->
eobs
[
block
]
);
av1_iwht4x4_add
(
dqcoeff
,
dst
,
pd
->
dst
.
stride
,
&
inv_txfm_param
);
}
else
{
av1_idct4x4_add
(
dqcoeff
,
dst
,
pd
->
dst
.
stride
,
p
->
eobs
[
block
]
);
av1_idct4x4_add
(
dqcoeff
,
dst
,
pd
->
dst
.
stride
,
&
inv_txfm_param
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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