Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
33833aef
Commit
33833aef
authored
Mar 28, 2016
by
Angie Chiang
Committed by
Gerrit Code Review
Mar 28, 2016
Browse files
Merge "Use vp10_[fwd/inv]_txfm2d_add_#x# for bd 10" into nextgenv2
parents
72e29c3a
d9a0cbb1
Changes
5
Hide whitespace changes
Inline
Side-by-side
vp10/common/idct.c
View file @
33833aef
...
...
@@ -15,6 +15,7 @@
#include "vp10/common/blockd.h"
#include "vp10/common/enums.h"
#include "vp10/common/idct.h"
#include "vp10/common/vp10_inv_txfm2d_cfg.h"
#include "vpx_dsp/inv_txfm.h"
#include "vpx_ports/mem.h"
...
...
@@ -1288,7 +1289,11 @@ void vp10_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_idct4x4_add
(
input
,
dest
,
stride
,
eob
,
bd
);
if
(
bd
==
10
)
vp10_inv_txfm2d_add_4x4
(
input
,
CONVERT_TO_SHORTPTR
(
dest
),
stride
,
&
inv_txfm_2d_cfg_dct_dct_4
,
bd
);
else
vp10_highbd_idct4x4_add
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
...
...
@@ -1327,7 +1332,11 @@ void vp10_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_idct8x8_add
(
input
,
dest
,
stride
,
eob
,
bd
);
if
(
bd
==
10
)
vp10_inv_txfm2d_add_8x8
(
input
,
CONVERT_TO_SHORTPTR
(
dest
),
stride
,
&
inv_txfm_2d_cfg_dct_dct_8
,
bd
);
else
vp10_highbd_idct8x8_add
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
...
...
@@ -1366,7 +1375,11 @@ void vp10_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_idct16x16_add
(
input
,
dest
,
stride
,
eob
,
bd
);
if
(
bd
==
10
)
vp10_inv_txfm2d_add_16x16
(
input
,
CONVERT_TO_SHORTPTR
(
dest
),
stride
,
&
inv_txfm_2d_cfg_dct_dct_16
,
bd
);
else
vp10_highbd_idct16x16_add
(
input
,
dest
,
stride
,
eob
,
bd
);
break
;
case
ADST_DCT
:
case
DCT_ADST
:
...
...
vp10/encoder/encodemb.c
View file @
33833aef
...
...
@@ -377,6 +377,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row,
src_diff
=
&
p
->
src_diff
[
4
*
(
blk_row
*
diff_stride
+
blk_col
)];
#if CONFIG_VP9_HIGHBITDEPTH
fwd_txfm_param
.
bd
=
xd
->
bd
;
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
highbd_fwd_txfm
(
src_diff
,
coeff
,
diff_stride
,
&
fwd_txfm_param
);
if
(
xform_quant_idx
!=
VP10_XFORM_QUANT_SKIP_QUANT
)
{
...
...
vp10/encoder/hybrid_fwd_txfm.c
View file @
33833aef
...
...
@@ -13,6 +13,7 @@
#include "./vpx_dsp_rtcd.h"
#include "vp10/common/idct.h"
#include "vp10/common/vp10_fwd_txfm2d_cfg.h"
#include "vp10/encoder/hybrid_fwd_txfm.h"
static
INLINE
void
fdct32x32
(
int
rd_transform
,
const
int16_t
*
src
,
...
...
@@ -184,7 +185,8 @@ static void fwd_txfm_32x32(int rd_transform, const int16_t *src_diff,
#if CONFIG_VP9_HIGHBITDEPTH
void
vp10_highbd_fwd_txfm_4x4
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
int
lossless
)
{
int
diff_stride
,
TX_TYPE
tx_type
,
int
lossless
,
const
int
bd
)
{
if
(
lossless
)
{
assert
(
tx_type
==
DCT_DCT
);
vp10_highbd_fwht4x4
(
src_diff
,
coeff
,
diff_stride
);
...
...
@@ -193,7 +195,12 @@ void vp10_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
switch
(
tx_type
)
{
case
DCT_DCT
:
vp10_highbd_fht4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
if
(
bd
==
10
)
{
vp10_fwd_txfm2d_4x4
(
src_diff
,
coeff
,
diff_stride
,
&
fwd_txfm_2d_cfg_dct_dct_4
,
bd
);
}
else
{
vp10_highbd_fht4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
);
}
break
;
case
ADST_DCT
:
case
DCT_ADST
:
...
...
@@ -228,10 +235,15 @@ void vp10_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
static
void
highbd_fwd_txfm_8x8
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
FWD_TXFM_OPT
fwd_txfm_opt
)
{
FWD_TXFM_OPT
fwd_txfm_opt
,
const
int
bd
)
{
(
void
)
fwd_txfm_opt
;
switch
(
tx_type
)
{
case
DCT_DCT
:
if
(
bd
==
10
)
{
vp10_fwd_txfm2d_8x8
(
src_diff
,
coeff
,
diff_stride
,
&
fwd_txfm_2d_cfg_dct_dct_8
,
bd
);
break
;
}
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
...
...
@@ -269,10 +281,15 @@ static void highbd_fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff,
static
void
highbd_fwd_txfm_16x16
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
FWD_TXFM_OPT
fwd_txfm_opt
)
{
FWD_TXFM_OPT
fwd_txfm_opt
,
const
int
bd
)
{
(
void
)
fwd_txfm_opt
;
switch
(
tx_type
)
{
case
DCT_DCT
:
if
(
bd
==
10
)
{
vp10_fwd_txfm2d_16x16
(
src_diff
,
coeff
,
diff_stride
,
&
fwd_txfm_2d_cfg_dct_dct_16
,
bd
);
break
;
}
case
ADST_DCT
:
case
DCT_ADST
:
case
ADST_ADST
:
...
...
@@ -310,7 +327,9 @@ static void highbd_fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff,
static
void
highbd_fwd_txfm_32x32
(
int
rd_transform
,
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
FWD_TXFM_OPT
fwd_txfm_opt
)
{
TX_TYPE
tx_type
,
FWD_TXFM_OPT
fwd_txfm_opt
,
const
int
bd
)
{
(
void
)
bd
;
switch
(
tx_type
)
{
case
DCT_DCT
:
if
(
fwd_txfm_opt
==
FWD_TXFM_OPT_NORMAL
)
...
...
@@ -381,20 +400,23 @@ void highbd_fwd_txfm(const int16_t *src_diff, tran_low_t *coeff,
const
TX_SIZE
tx_size
=
fwd_txfm_param
->
tx_size
;
const
int
rd_transform
=
fwd_txfm_param
->
rd_transform
;
const
int
lossless
=
fwd_txfm_param
->
lossless
;
const
int
bd
=
fwd_txfm_param
->
bd
;
switch
(
tx_size
)
{
case
TX_32X32
:
highbd_fwd_txfm_32x32
(
rd_transform
,
src_diff
,
coeff
,
diff_stride
,
tx_type
,
fwd_txfm_opt
);
fwd_txfm_opt
,
bd
);
break
;
case
TX_16X16
:
highbd_fwd_txfm_16x16
(
src_diff
,
coeff
,
diff_stride
,
tx_type
,
fwd_txfm_opt
);
fwd_txfm_opt
,
bd
);
break
;
case
TX_8X8
:
highbd_fwd_txfm_8x8
(
src_diff
,
coeff
,
diff_stride
,
tx_type
,
fwd_txfm_opt
);
highbd_fwd_txfm_8x8
(
src_diff
,
coeff
,
diff_stride
,
tx_type
,
fwd_txfm_opt
,
bd
);
break
;
case
TX_4X4
:
vp10_highbd_fwd_txfm_4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
,
lossless
);
vp10_highbd_fwd_txfm_4x4
(
src_diff
,
coeff
,
diff_stride
,
tx_type
,
lossless
,
bd
);
break
;
default:
assert
(
0
);
...
...
vp10/encoder/hybrid_fwd_txfm.h
View file @
33833aef
...
...
@@ -21,6 +21,9 @@ typedef struct FWD_TXFM_PARAM {
FWD_TXFM_OPT
fwd_txfm_opt
;
int
rd_transform
;
int
lossless
;
#if CONFIG_VP9_HIGHBITDEPTH
int
bd
;
#endif // CONFIG_VP9_HIGHBITDEPTH
}
FWD_TXFM_PARAM
;
#ifdef __cplusplus
...
...
@@ -36,7 +39,8 @@ void vp10_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
void
highbd_fwd_txfm
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
FWD_TXFM_PARAM
*
fwd_txfm_param
);
void
vp10_highbd_fwd_txfm_4x4
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
diff_stride
,
TX_TYPE
tx_type
,
int
lossless
);
int
diff_stride
,
TX_TYPE
tx_type
,
int
lossless
,
const
int
bd
);
#endif // CONFIG_VP9_HIGHBITDEPTH
static
INLINE
int
get_tx1d_size
(
TX_SIZE
tx_size
)
{
...
...
vp10/encoder/rdopt.c
View file @
33833aef
...
...
@@ -1970,7 +1970,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x,
const int coeff_ctx = combine_entropy_contexts(*(tempa + idx),
*(templ + idy));
#endif // CONFIG_VAR_TX
vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT, 1);
vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT, 1
, xd->bd
);
vp10_regular_quantize_b_4x4(x, 0, block, so->scan, so->iscan);
#if CONFIG_VAR_TX
ratey += cost_coeffs(x, 0, block, coeff_ctx, TX_4X4, so->scan,
...
...
@@ -1997,7 +1997,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x,
const int coeff_ctx = combine_entropy_contexts(*(tempa + idx),
*(templ + idy));
#endif // CONFIG_VAR_TX
vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, tx_type, 0);
vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, tx_type, 0
, xd->bd
);
vp10_regular_quantize_b_4x4(x, 0, block, so->scan, so->iscan);
#if CONFIG_VAR_TX
ratey += cost_coeffs(x, 0, block, coeff_ctx, TX_4X4, so->scan,
...
...
@@ -4303,7 +4303,7 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi,
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT,
xd->lossless[mi->mbmi.segment_id]);
xd->lossless[mi->mbmi.segment_id]
, xd->bd
);
} else {
vp10_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT,
xd->lossless[mi->mbmi.segment_id]);
...
...
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