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
6fc47e5f
Commit
6fc47e5f
authored
Dec 04, 2017
by
Yaowu Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support of separte delta Qs for chroma channels
Change-Id: Iae7c054def0c0d5b5af52263f0c4d2e1e346282d
parent
ebcee0b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
av1/common/onyxc_int.h
av1/common/onyxc_int.h
+4
-0
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+14
-2
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+14
-2
No files found.
av1/common/onyxc_int.h
View file @
6fc47e5f
...
...
@@ -325,6 +325,10 @@ typedef struct AV1Common {
int
v_dc_delta_q
;
int
u_ac_delta_q
;
int
v_ac_delta_q
;
#if CONFIG_EXT_QM
int
separate_uv_delta_q
;
#endif
// The dequantizers below are true dequntizers used only in the
// dequantization process. They have the same coefficient
// shift/scale as TX.
...
...
av1/decoder/decodeframe.c
View file @
6fc47e5f
...
...
@@ -1242,10 +1242,19 @@ static void setup_quantization(AV1_COMMON *const cm,
struct
aom_read_bit_buffer
*
rb
)
{
cm
->
base_qindex
=
aom_rb_read_literal
(
rb
,
QINDEX_BITS
);
cm
->
y_dc_delta_q
=
read_delta_q
(
rb
);
int
diff_uv_delta
=
0
;
#if CONFIG_EXT_QM
if
(
cm
->
separate_uv_delta_q
)
diff_uv_delta
=
aom_rb_read_bit
(
rb
);
#endif
cm
->
u_dc_delta_q
=
read_delta_q
(
rb
);
cm
->
u_ac_delta_q
=
read_delta_q
(
rb
);
cm
->
v_dc_delta_q
=
cm
->
u_dc_delta_q
;
cm
->
v_ac_delta_q
=
cm
->
u_ac_delta_q
;
if
(
diff_uv_delta
)
{
cm
->
v_dc_delta_q
=
read_delta_q
(
rb
);
cm
->
v_ac_delta_q
=
read_delta_q
(
rb
);
}
else
{
cm
->
v_dc_delta_q
=
cm
->
u_dc_delta_q
;
cm
->
v_ac_delta_q
=
cm
->
u_ac_delta_q
;
}
cm
->
dequant_bit_depth
=
cm
->
bit_depth
;
#if CONFIG_AOM_QM
cm
->
using_qmatrix
=
aom_rb_read_bit
(
rb
);
...
...
@@ -2423,6 +2432,9 @@ static void read_bitdepth_colorspace_sampling(AV1_COMMON *cm,
"4:4:4 color not supported in profile 0 or 2"
);
}
}
#if CONFIG_EXT_QM
cm
->
separate_uv_delta_q
=
aom_rb_read_bit
(
rb
);
#endif
}
#if CONFIG_REFERENCE_BUFFER || CONFIG_OBU
...
...
av1/encoder/bitstream.c
View file @
6fc47e5f
...
...
@@ -2661,10 +2661,19 @@ static void encode_quantization(const AV1_COMMON *const cm,
struct
aom_write_bit_buffer
*
wb
)
{
aom_wb_write_literal
(
wb
,
cm
->
base_qindex
,
QINDEX_BITS
);
write_delta_q
(
wb
,
cm
->
y_dc_delta_q
);
assert
(
cm
->
u_dc_delta_q
==
cm
->
v_dc_delta_q
);
int
diff_uv_delta
=
(
cm
->
u_dc_delta_q
!=
cm
->
v_dc_delta_q
)
||
(
cm
->
u_ac_delta_q
!=
cm
->
v_ac_delta_q
);
#if CONFIG_EXT_QM
if
(
cm
->
separate_uv_delta_q
)
aom_wb_write_bit
(
wb
,
diff_uv_delta
);
#else
assert
(
!
diff_uv_delta
);
#endif
write_delta_q
(
wb
,
cm
->
u_dc_delta_q
);
assert
(
cm
->
u_ac_delta_q
==
cm
->
v_ac_delta_q
);
write_delta_q
(
wb
,
cm
->
u_ac_delta_q
);
if
(
diff_uv_delta
)
{
write_delta_q
(
wb
,
cm
->
v_dc_delta_q
);
write_delta_q
(
wb
,
cm
->
v_ac_delta_q
);
}
#if CONFIG_AOM_QM
aom_wb_write_bit
(
wb
,
cm
->
using_qmatrix
);
if
(
cm
->
using_qmatrix
)
{
...
...
@@ -3497,6 +3506,9 @@ static void write_bitdepth_colorspace_sampling(
assert
(
cm
->
profile
==
PROFILE_1
||
cm
->
profile
==
PROFILE_3
);
aom_wb_write_bit
(
wb
,
0
);
// unused
}
#if CONFIG_EXT_QM
aom_wb_write_bit
(
wb
,
cm
->
separate_uv_delta_q
);
#endif
}
#if CONFIG_REFERENCE_BUFFER || CONFIG_OBU
...
...
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