Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
2123c5d6
Commit
2123c5d6
authored
Jan 15, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Jan 15, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Removing VpxInputContext dependency from {ivf, raw}_read_frame()."
parents
8b5133fc
0eac753d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
16 deletions
+7
-16
ivfdec.c
ivfdec.c
+2
-8
ivfdec.h
ivfdec.h
+2
-4
vpxdec.c
vpxdec.c
+3
-4
No files found.
ivfdec.c
View file @
2123c5d6
...
...
@@ -65,16 +65,10 @@ int file_is_ivf(struct VpxInputContext *input_ctx) {
return
is_ivf
;
}
int
ivf_read_frame
(
struct
VpxInputContext
*
input_ctx
,
uint8_t
**
buffer
,
size_t
*
bytes_read
,
size_t
*
buffer_size
)
{
int
ivf_read_frame
(
FILE
*
infile
,
uint8_t
**
buffer
,
size_t
*
bytes_read
,
size_t
*
buffer_size
)
{
char
raw_header
[
IVF_FRAME_HDR_SZ
]
=
{
0
};
size_t
frame_size
=
0
;
FILE
*
infile
=
input_ctx
->
file
;
if
(
input_ctx
->
file_type
!=
FILE_TYPE_IVF
)
return
0
;
if
(
fread
(
raw_header
,
IVF_FRAME_HDR_SZ
,
1
,
infile
)
!=
1
)
{
if
(
!
feof
(
infile
))
...
...
ivfdec.h
View file @
2123c5d6
...
...
@@ -18,10 +18,8 @@ extern "C" {
int
file_is_ivf
(
struct
VpxInputContext
*
input
);
int
ivf_read_frame
(
struct
VpxInputContext
*
input
,
uint8_t
**
buffer
,
size_t
*
bytes_read
,
size_t
*
buffer_size
);
int
ivf_read_frame
(
FILE
*
infile
,
uint8_t
**
buffer
,
size_t
*
bytes_read
,
size_t
*
buffer_size
);
#ifdef __cplusplus
}
/* extern "C" */
...
...
vpxdec.c
View file @
2123c5d6
...
...
@@ -167,11 +167,10 @@ void usage_exit() {
exit
(
EXIT_FAILURE
);
}
static
int
raw_read_frame
(
struct
VpxInputContext
*
input_ctx
,
uint8_t
**
buffer
,
static
int
raw_read_frame
(
FILE
*
infile
,
uint8_t
**
buffer
,
size_t
*
bytes_read
,
size_t
*
buffer_size
)
{
char
raw_hdr
[
RAW_FRAME_HDR_SZ
];
size_t
frame_size
=
0
;
FILE
*
infile
=
input_ctx
->
file
;
if
(
fread
(
raw_hdr
,
RAW_FRAME_HDR_SZ
,
1
,
infile
)
!=
1
)
{
if
(
!
feof
(
infile
))
...
...
@@ -221,10 +220,10 @@ static int read_frame(struct VpxDecInputContext *input, uint8_t **buf,
return
webm_read_frame
(
input
->
webm_ctx
,
buf
,
bytes_in_buffer
,
buffer_size
);
case
FILE_TYPE_RAW
:
return
raw_read_frame
(
input
->
vpx_input_ctx
,
return
raw_read_frame
(
input
->
vpx_input_ctx
->
file
,
buf
,
bytes_in_buffer
,
buffer_size
);
case
FILE_TYPE_IVF
:
return
ivf_read_frame
(
input
->
vpx_input_ctx
,
return
ivf_read_frame
(
input
->
vpx_input_ctx
->
file
,
buf
,
bytes_in_buffer
,
buffer_size
);
default:
return
1
;
...
...
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