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
e4d6f9bf
Commit
e4d6f9bf
authored
Jun 21, 2017
by
Sebastien Alaiwan
Committed by
Frédéric BARBIER
Jun 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify flow of control
Change-Id: Idded8f8774c10c53fba59e7b834583399e57225c
parent
a1d0c4d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
av1/av1_cx_iface.c
av1/av1_cx_iface.c
+37
-37
No files found.
av1/av1_cx_iface.c
View file @
e4d6f9bf
...
...
@@ -1225,47 +1225,47 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
return
AOM_CODEC_ERROR
;
}
#endif
if
(
frame_size
)
{
// Pack invisible frames with the next visible frame
if
(
!
cpi
->
common
.
show_frame
)
{
if
(
ctx
->
pending_cx_data
==
0
)
ctx
->
pending_cx_data
=
cx_data
;
ctx
->
pending_cx_data_sz
+=
frame_size
;
ctx
->
pending_frame_sizes
[
ctx
->
pending_frame_count
++
]
=
frame_size
;
cx_data
+=
frame_size
;
cx_data_sz
-=
frame_size
;
continue
;
}
// Add the frame packet to the list of returned packets.
aom_codec_cx_pkt_t
pkt
;
pkt
.
kind
=
AOM_CODEC_CX_FRAME_PKT
;
pkt
.
data
.
frame
.
pts
=
ticks_to_timebase_units
(
timebase
,
dst_time_stamp
);
pkt
.
data
.
frame
.
duration
=
(
unsigned
long
)
ticks_to_timebase_units
(
timebase
,
dst_end_time_stamp
-
dst_time_stamp
);
pkt
.
data
.
frame
.
flags
=
get_frame_pkt_flags
(
cpi
,
lib_flags
);
if
(
ctx
->
pending_cx_data
)
{
ctx
->
pending_frame_sizes
[
ctx
->
pending_frame_count
++
]
=
frame_size
;
ctx
->
pending_cx_data_sz
+=
frame_size
;
frame_size
+=
write_superframe_index
(
ctx
);
pkt
.
data
.
frame
.
buf
=
ctx
->
pending_cx_data
;
pkt
.
data
.
frame
.
sz
=
ctx
->
pending_cx_data_sz
;
ctx
->
pending_cx_data
=
NULL
;
ctx
->
pending_cx_data_sz
=
0
;
ctx
->
pending_frame_count
=
0
;
}
else
{
pkt
.
data
.
frame
.
buf
=
cx_data
;
pkt
.
data
.
frame
.
sz
=
frame_size
;
}
pkt
.
data
.
frame
.
partition_id
=
-
1
;
aom_codec_pkt_list_add
(
&
ctx
->
pkt_list
.
head
,
&
pkt
);
if
(
!
frame_size
)
continue
;
// Pack invisible frames with the next visible frame
if
(
!
cpi
->
common
.
show_frame
)
{
if
(
ctx
->
pending_cx_data
==
0
)
ctx
->
pending_cx_data
=
cx_data
;
ctx
->
pending_cx_data_sz
+=
frame_size
;
ctx
->
pending_frame_sizes
[
ctx
->
pending_frame_count
++
]
=
frame_size
;
cx_data
+=
frame_size
;
cx_data_sz
-=
frame_size
;
continue
;
}
// Add the frame packet to the list of returned packets.
aom_codec_cx_pkt_t
pkt
;
pkt
.
kind
=
AOM_CODEC_CX_FRAME_PKT
;
pkt
.
data
.
frame
.
pts
=
ticks_to_timebase_units
(
timebase
,
dst_time_stamp
);
pkt
.
data
.
frame
.
duration
=
(
uint32_t
)
ticks_to_timebase_units
(
timebase
,
dst_end_time_stamp
-
dst_time_stamp
);
pkt
.
data
.
frame
.
flags
=
get_frame_pkt_flags
(
cpi
,
lib_flags
);
if
(
ctx
->
pending_cx_data
)
{
ctx
->
pending_frame_sizes
[
ctx
->
pending_frame_count
++
]
=
frame_size
;
ctx
->
pending_cx_data_sz
+=
frame_size
;
frame_size
+=
write_superframe_index
(
ctx
);
pkt
.
data
.
frame
.
buf
=
ctx
->
pending_cx_data
;
pkt
.
data
.
frame
.
sz
=
ctx
->
pending_cx_data_sz
;
ctx
->
pending_cx_data
=
NULL
;
ctx
->
pending_cx_data_sz
=
0
;
ctx
->
pending_frame_count
=
0
;
}
else
{
pkt
.
data
.
frame
.
buf
=
cx_data
;
pkt
.
data
.
frame
.
sz
=
frame_size
;
}
pkt
.
data
.
frame
.
partition_id
=
-
1
;
aom_codec_pkt_list_add
(
&
ctx
->
pkt_list
.
head
,
&
pkt
);
cx_data
+=
frame_size
;
cx_data_sz
-=
frame_size
;
}
}
...
...
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