Skip to content
GitLab
Menu
Projects
Groups
Snippets
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
d418f68e
Commit
d418f68e
authored
Oct 19, 2017
by
Sebastien Alaiwan
Browse files
Simplify FRAME_ID constants
Change-Id: I75890c0f64f93f48299895d1e0bcfbf91846a4ab
parent
06b40cc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
av1/common/onyxc_int.h
View file @
d418f68e
...
...
@@ -59,9 +59,9 @@ extern "C" {
#if CONFIG_REFERENCE_BUFFER
/* Constant values while waiting for the sequence header */
#define FRAME_ID_NUMBERS_PRESENT_FLAG 1
#define FRAME_ID_LENGTH
_MINUS7 8 // Allows frame id up to 2^15-1
#define DELTA_FRAME_ID_LENGTH
_MINUS2 12 // Allows frame id deltas up to 2^14-1
#endif
// CONFIG_REFERENCE_BUFFER
#define FRAME_ID_LENGTH
15
#define DELTA_FRAME_ID_LENGTH
14
#endif // CONFIG_REFERENCE_BUFFER
#if CONFIG_NO_FRAME_CONTEXT_SIGNALING
#define FRAME_CONTEXTS (FRAME_BUFFERS + 1)
...
...
av1/encoder/bitstream.c
View file @
d418f68e
...
...
@@ -3592,8 +3592,8 @@ void write_sequence_header(AV1_COMMON *const cm,
cm
->
large_scale_tile
?
0
:
#endif // CONFIG_EXT_TILE
FRAME_ID_NUMBERS_PRESENT_FLAG
;
seq_params
->
frame_id_length
=
FRAME_ID_LENGTH
_MINUS7
+
7
;
seq_params
->
delta_frame_id_length
=
DELTA_FRAME_ID_LENGTH
_MINUS2
+
2
;
seq_params
->
frame_id_length
=
FRAME_ID_LENGTH
;
seq_params
->
delta_frame_id_length
=
DELTA_FRAME_ID_LENGTH
;
aom_wb_write_bit
(
wb
,
seq_params
->
frame_id_numbers_present_flag
);
if
(
seq_params
->
frame_id_numbers_present_flag
)
{
...
...
@@ -4714,8 +4714,8 @@ static uint32_t write_sequence_header_obu(AV1_COMP *cpi, uint8_t *const dst) {
seq_params
->
frame_id_numbers_present_flag
=
FRAME_ID_NUMBERS_PRESENT_FLAG
;
aom_wb_write_literal
(
&
wb
,
seq_params
->
frame_id_numbers_present_flag
,
1
);
if
(
seq_params
->
frame_id_numbers_present_flag
)
{
seq_params
->
frame_id_length
=
FRAME_ID_LENGTH
_MINUS7
+
7
;
seq_params
->
delta_frame_id_length
=
DELTA_FRAME_ID_LENGTH
_MINUS2
+
2
;
seq_params
->
frame_id_length
=
FRAME_ID_LENGTH
;
seq_params
->
delta_frame_id_length
=
DELTA_FRAME_ID_LENGTH
;
// We must always have delta_frame_id_length < frame_id_length,
// in order for a frame to be referenced with a unique delta.
// Avoid wasting bits by using a coding that enforces this restriction.
...
...
av1/encoder/encoder.c
View file @
d418f68e
...
...
@@ -5398,7 +5398,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
if
(
cm
->
seq_params
.
frame_id_numbers_present_flag
)
{
/* Non-normative definition of current_frame_id ("frame counter" with
* wraparound) */
const
int
frame_id_length
=
FRAME_ID_LENGTH
_MINUS7
+
7
;
const
int
frame_id_length
=
FRAME_ID_LENGTH
;
if
(
cm
->
current_frame_id
==
-
1
)
{
int
lsb
,
msb
;
/* quasi-random initialization of current_frame_id for a key frame */
...
...
Write
Preview
Supports
Markdown
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