Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timothy B. Terriberry
rav1e
Commits
fd6bfc88
Commit
fd6bfc88
authored
6 years ago
by
Luca Barbato
Committed by
Thomas Daede
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix and improve the stats output
Store the frame_type in the packet and implement Display for it.
parent
2444eeaf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/api.rs
+9
-2
9 additions, 2 deletions
src/api.rs
src/bin/common.rs
+1
-2
1 addition, 2 deletions
src/bin/common.rs
with
10 additions
and
4 deletions
src/api.rs
+
9
−
2
View file @
fd6bfc88
...
...
@@ -69,7 +69,14 @@ pub enum EncoderStatus {
pub
struct
Packet
{
pub
data
:
Vec
<
u8
>
,
pub
rec
:
Frame
,
pub
number
:
usize
pub
number
:
usize
,
pub
frame_type
:
FrameType
}
impl
fmt
::
Display
for
Packet
{
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
<
'_
>
)
->
fmt
::
Result
{
write!
(
f
,
"Frame {} - {} - {} bytes"
,
self
.number
,
self
.frame_type
,
self
.data
.len
())
}
}
impl
Context
{
...
...
@@ -139,7 +146,7 @@ impl Context {
update_rec_buffer
(
&
mut
self
.fi
,
fs
);
Ok
(
Packet
{
data
,
rec
,
number
})
Ok
(
Packet
{
data
,
rec
,
number
,
frame_type
:
self
.fi.frame_type
})
}
else
{
unimplemented!
(
"Flushing not implemented"
)
}
...
...
This diff is collapsed.
Click to expand it.
src/bin/common.rs
+
1
−
2
View file @
fd6bfc88
...
...
@@ -126,10 +126,9 @@ pub fn process_frame(ctx: &mut Context,
_
=>
panic!
(
"unknown input bit depth!"
),
}
eprintln!
(
"{}"
,
ctx
);
let
_
=
ctx
.send_frame
(
input
);
let
pkt
=
ctx
.receive_packet
()
.unwrap
();
eprintln!
(
"{}"
,
pkt
);
write_ivf_frame
(
output_file
,
pkt
.number
as
u64
,
pkt
.data
.as_ref
());
if
let
Some
(
mut
y4m_enc
)
=
y4m_enc
{
let
pitch_y
=
if
bit_depth
>
8
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment