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
cdf8c903
Commit
cdf8c903
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: Replace dirac parse codes with better ones
parent
7424a6d0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
dirac.h
libavcodec/dirac.h
+22
-0
diracdec.c
libavcodec/diracdec.c
+3
-14
No files found.
libavcodec/dirac.h
View file @
cdf8c903
...
@@ -34,6 +34,28 @@
...
@@ -34,6 +34,28 @@
#include "avcodec.h"
#include "avcodec.h"
#include "get_bits.h"
#include "get_bits.h"
/**
* Parse code values:
*
* Dirac Specification ->
* 9.6.1 Table 9.1
*
* VC-2 Specification ->
* 10.4.1 Table 10.1
*/
enum
DiracParseCodes
{
DIRAC_PCODE_SEQ_HEADER
=
0x00
,
DIRAC_PCODE_END_SEQ
=
0x10
,
DIRAC_PCODE_AUX
=
0x20
,
DIRAC_PCODE_PAD
=
0x30
,
DIRAC_PCODE_PICTURE_CODED
=
0x08
,
DIRAC_PCODE_PICTURE_RAW
=
0x48
,
DIRAC_PCODE_PICTURE_LOW_DEL
=
0xC8
,
DIRAC_PCODE_PICTURE_HQ
=
0xE8
,
DIRAC_PCODE_MAGIC
=
0x42424344
,
};
typedef
struct
DiracVersionInfo
{
typedef
struct
DiracVersionInfo
{
int
major
;
int
major
;
int
minor
;
int
minor
;
...
...
libavcodec/diracdec.c
View file @
cdf8c903
...
@@ -230,17 +230,6 @@ typedef struct DiracContext {
...
@@ -230,17 +230,6 @@ typedef struct DiracContext {
DiracFrame
all_frames
[
MAX_FRAMES
];
DiracFrame
all_frames
[
MAX_FRAMES
];
}
DiracContext
;
}
DiracContext
;
/**
* Dirac Specification ->
* Parse code values. 9.6.1 Table 9.1
*/
enum
dirac_parse_code
{
pc_seq_header
=
0x00
,
pc_eos
=
0x10
,
pc_aux_data
=
0x20
,
pc_padding
=
0x30
,
};
enum
dirac_subband
{
enum
dirac_subband
{
subband_ll
=
0
,
subband_ll
=
0
,
subband_hl
=
1
,
subband_hl
=
1
,
...
@@ -1945,7 +1934,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
...
@@ -1945,7 +1934,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
init_get_bits
(
&
s
->
gb
,
&
buf
[
13
],
8
*
(
size
-
DATA_UNIT_HEADER_SIZE
));
init_get_bits
(
&
s
->
gb
,
&
buf
[
13
],
8
*
(
size
-
DATA_UNIT_HEADER_SIZE
));
if
(
parse_code
==
pc_seq_header
)
{
if
(
parse_code
==
DIRAC_PCODE_SEQ_HEADER
)
{
if
(
s
->
seen_sequence_header
)
if
(
s
->
seen_sequence_header
)
return
0
;
return
0
;
...
@@ -1964,10 +1953,10 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
...
@@ -1964,10 +1953,10 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
return
ret
;
return
ret
;
s
->
seen_sequence_header
=
1
;
s
->
seen_sequence_header
=
1
;
}
else
if
(
parse_code
==
pc_eos
)
{
/* [DIRAC_STD] End of Sequence */
}
else
if
(
parse_code
==
DIRAC_PCODE_END_SEQ
)
{
/* [DIRAC_STD] End of Sequence */
free_sequence_buffers
(
s
);
free_sequence_buffers
(
s
);
s
->
seen_sequence_header
=
0
;
s
->
seen_sequence_header
=
0
;
}
else
if
(
parse_code
==
pc_aux_data
)
{
}
else
if
(
parse_code
==
DIRAC_PCODE_AUX
)
{
if
(
buf
[
13
]
==
1
)
{
/* encoder implementation/version */
if
(
buf
[
13
]
==
1
)
{
/* encoder implementation/version */
int
ver
[
3
];
int
ver
[
3
];
/* versions older than 1.0.8 don't store quant delta for
/* versions older than 1.0.8 don't store quant delta for
...
...
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