Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
7458f117
Commit
7458f117
authored
Jun 28, 2016
by
Sarah Parker
Committed by
Gerrit Code Review
Jun 28, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Quantization fix for new-quant/var-tx" into nextgenv2
parents
487bdac2
f3dfa0c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
28 deletions
+26
-28
vp10/encoder/encodemb.c
vp10/encoder/encodemb.c
+12
-12
vp10/encoder/rdopt.c
vp10/encoder/rdopt.c
+14
-16
No files found.
vp10/encoder/encodemb.c
View file @
7458f117
...
...
@@ -510,7 +510,7 @@ void vp10_xform_quant_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
fwd_txfm_param
.
tx_type
=
tx_type
;
fwd_txfm_param
.
tx_size
=
tx_size
;
fwd_txfm_param
.
fwd_txfm_opt
=
fwd_txfm_opt_list
[
VP10_XFORM_QUANT_
B
];
fwd_txfm_param
.
fwd_txfm_opt
=
fwd_txfm_opt_list
[
VP10_XFORM_QUANT_
FP
];
fwd_txfm_param
.
rd_transform
=
x
->
use_lp32x32fdct
;
fwd_txfm_param
.
lossless
=
xd
->
lossless
[
xd
->
mi
[
0
]
->
mbmi
.
segment_id
];
...
...
@@ -1020,8 +1020,8 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
if
(
x
->
skip_txfm
[
plane
][
blk_index
]
==
SKIP_TXFM_NONE
)
{
// full forward transform and quantization
#if CONFIG_NEW_QUANT
vp10_xform_quant_nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
vp10_xform_quant_
fp_
nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
#else
vp10_xform_quant
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
VP10_XFORM_QUANT_FP
);
...
...
@@ -1029,8 +1029,8 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
}
else
if
(
x
->
skip_txfm
[
plane
][
blk_index
]
==
SKIP_TXFM_AC_ONLY
)
{
// fast path forward transform and quantization
#if CONFIG_NEW_QUANT
vp10_xform_quant_dc_nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
vp10_xform_quant_dc_
fp_
nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
#else
vp10_xform_quant
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
VP10_XFORM_QUANT_DC
);
...
...
@@ -1045,8 +1045,8 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
}
}
else
{
#if CONFIG_NEW_QUANT
vp10_xform_quant_nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
vp10_xform_quant_
fp_
nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
#else
vp10_xform_quant
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
VP10_XFORM_QUANT_FP
);
...
...
@@ -1163,11 +1163,11 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
#if CONFIG_NEW_QUANT
ctx
=
0
;
vp10_xform_quant_nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
vp10_xform_quant_
fp_
nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
#else
vp10_xform_quant
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
VP10_XFORM_QUANT_
B
);
tx_size
,
VP10_XFORM_QUANT_
FP
);
#endif // CONFIG_NEW_QUANT
if
(
p
->
eobs
[
block
]
>
0
)
{
...
...
@@ -1340,8 +1340,8 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col,
if
(
args
->
enable_optimize_b
)
{
#if CONFIG_NEW_QUANT
vp10_xform_quant_nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
vp10_xform_quant_
fp_
nuq
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
ctx
);
#else // CONFIG_NEW_QUANT
vp10_xform_quant
(
x
,
plane
,
block
,
blk_row
,
blk_col
,
plane_bsize
,
tx_size
,
VP10_XFORM_QUANT_FP
);
...
...
vp10/encoder/rdopt.c
View file @
7458f117
...
...
@@ -1251,8 +1251,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
SKIP_TXFM_NONE) {
// full forward transform and quantization
#if CONFIG_NEW_QUANT
vp10_xform_quant_nuq(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, ctx);
vp10_xform_quant_
fp_
nuq(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, ctx);
#else
vp10_xform_quant(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, VP10_XFORM_QUANT_FP);
...
...
@@ -1267,12 +1267,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
tran_low_t *const coeff = BLOCK_OFFSET(x->plane[plane].coeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(xd->plane[plane].dqcoeff, block);
#if CONFIG_NEW_QUANT
if (x->quant_fp)
vp10_xform_quant_dc_fp_nuq(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, ctx);
else
vp10_xform_quant_dc_nuq(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, ctx);
vp10_xform_quant_dc_fp_nuq(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, ctx);
#else
vp10_xform_quant(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, VP10_XFORM_QUANT_DC);
...
...
@@ -1303,12 +1299,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
} else {
// full forward transform and quantization
#if CONFIG_NEW_QUANT
if (x->quant_fp)
vp10_xform_quant_fp_nuq(x, plane, block, blk_row, blk_col, plane_bsize,
tx_size, ctx);
else
vp10_xform_quant_nuq(x, plane, block, blk_row, blk_col, plane_bsize,
tx_size, ctx);
vp10_xform_quant_fp_nuq(x, plane, block, blk_row, blk_col, plane_bsize,
tx_size, ctx);
#else
vp10_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, tx_size,
VP10_XFORM_QUANT_FP);
...
...
@@ -3064,8 +3056,14 @@ void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
if (xd->mb_to_right_edge < 0)
max_blocks_wide += xd->mb_to_right_edge >> (5 + pd->subsampling_x);
vp10_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, tx_size,
VP10_XFORM_QUANT_FP);
#if CONFIG_NEW_QUANT
vp10_xform_quant_fp_nuq(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, coeff_ctx);
#else
vp10_xform_quant(x, plane, block, blk_row, blk_col,
plane_bsize, tx_size, VP10_XFORM_QUANT_FP);
#endif // CONFIG_NEW_QUANT
vp10_optimize_b(x, plane, block, tx_size, coeff_ctx);
// TODO(any): Use dist_block to compute distortion
...
...
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