Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8dcc99dc
Commit
8dcc99dc
authored
Dec 09, 2015
by
Kieran Kunhya
Committed by
Rostislav Pehlivanov
Dec 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diracdec: Extract version parameters
parent
9f374c59
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
dirac.c
libavcodec/dirac.c
+1
-0
dirac.h
libavcodec/dirac.h
+6
-0
diracdec.c
libavcodec/diracdec.c
+2
-1
oggparsedirac.c
libavformat/oggparsedirac.c
+3
-1
No files found.
libavcodec/dirac.c
View file @
8dcc99dc
...
...
@@ -294,6 +294,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
/* [DIRAC_STD] 10. Sequence Header. sequence_header() */
int
avpriv_dirac_parse_sequence_header
(
AVCodecContext
*
avctx
,
GetBitContext
*
gb
,
dirac_source_params
*
source
,
DiracVersionInfo
*
version
,
int
*
bit_depth
)
{
unsigned
version_major
;
...
...
libavcodec/dirac.h
View file @
8dcc99dc
...
...
@@ -34,6 +34,11 @@
#include "avcodec.h"
#include "get_bits.h"
typedef
struct
DiracVersionInfo
{
int
major
;
int
minor
;
}
DiracVersionInfo
;
typedef
struct
dirac_source_params
{
unsigned
width
;
unsigned
height
;
...
...
@@ -56,6 +61,7 @@ typedef struct dirac_source_params {
int
avpriv_dirac_parse_sequence_header
(
AVCodecContext
*
avctx
,
GetBitContext
*
gb
,
dirac_source_params
*
source
,
DiracVersionInfo
*
version
,
int
*
bit_depth
);
#endif
/* AVCODEC_DIRAC_H */
libavcodec/diracdec.c
View file @
8dcc99dc
...
...
@@ -140,6 +140,7 @@ typedef struct DiracContext {
MpegvideoEncDSPContext
mpvencdsp
;
VideoDSPContext
vdsp
;
DiracDSPContext
diracdsp
;
DiracVersionInfo
version
;
GetBitContext
gb
;
dirac_source_params
source
;
int
seen_sequence_header
;
...
...
@@ -1914,7 +1915,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
/* [DIRAC_STD] 10. Sequence header */
ret
=
avpriv_dirac_parse_sequence_header
(
avctx
,
&
s
->
gb
,
&
s
->
source
,
&
s
->
bit_depth
);
&
s
->
version
,
&
s
->
bit_depth
);
if
(
ret
<
0
)
return
ret
;
...
...
libavformat/oggparsedirac.c
View file @
8dcc99dc
...
...
@@ -30,6 +30,7 @@ static int dirac_header(AVFormatContext *s, int idx)
struct
ogg_stream
*
os
=
ogg
->
streams
+
idx
;
AVStream
*
st
=
s
->
streams
[
idx
];
dirac_source_params
source
;
DiracVersionInfo
version
;
GetBitContext
gb
;
int
ret
,
bit_depth
;
...
...
@@ -41,7 +42,8 @@ static int dirac_header(AVFormatContext *s, int idx)
if
(
ret
<
0
)
return
ret
;
ret
=
avpriv_dirac_parse_sequence_header
(
st
->
codec
,
&
gb
,
&
source
,
&
bit_depth
);
ret
=
avpriv_dirac_parse_sequence_header
(
st
->
codec
,
&
gb
,
&
source
,
&
version
,
&
bit_depth
);
if
(
ret
<
0
)
return
ret
;
...
...
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