Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
56c1b925
Commit
56c1b925
authored
Apr 08, 2013
by
Kostya Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dfa: implement missing TDLT coding method
parent
fc792308
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
dfa.c
libavcodec/dfa.c
+21
-4
No files found.
libavcodec/dfa.c
View file @
56c1b925
...
...
@@ -284,9 +284,26 @@ static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height
return
0
;
}
static
int
decode_
unk6
(
GetByteContext
*
gb
,
uint8_t
*
frame
,
int
width
,
int
height
)
static
int
decode_
tdlt
(
GetByteContext
*
gb
,
uint8_t
*
frame
,
int
width
,
int
height
)
{
return
AVERROR_PATCHWELCOME
;
const
uint8_t
*
frame_end
=
frame
+
width
*
height
;
int
segments
=
bytestream2_get_le32
(
gb
);
int
skip
,
copy
;
while
(
segments
--
)
{
if
(
bytestream2_get_bytes_left
(
gb
)
<
2
)
return
AVERROR_INVALIDDATA
;
copy
=
bytestream2_get_byteu
(
gb
)
*
2
;
skip
=
bytestream2_get_byteu
(
gb
)
*
2
;
if
(
frame_end
-
frame
<
copy
+
skip
||
bytestream2_get_bytes_left
(
gb
)
<
copy
)
return
AVERROR_INVALIDDATA
;
frame
+=
skip
;
bytestream2_get_buffer
(
gb
,
frame
,
copy
);
frame
+=
copy
;
}
return
0
;
}
static
int
decode_blck
(
GetByteContext
*
gb
,
uint8_t
*
frame
,
int
width
,
int
height
)
...
...
@@ -300,11 +317,11 @@ typedef int (*chunk_decoder)(GetByteContext *gb, uint8_t *frame, int width, int
static
const
chunk_decoder
decoder
[
8
]
=
{
decode_copy
,
decode_tsw1
,
decode_bdlt
,
decode_wdlt
,
decode_
unk6
,
decode_dsw1
,
decode_blck
,
decode_dds1
,
decode_
tdlt
,
decode_dsw1
,
decode_blck
,
decode_dds1
,
};
static
const
char
*
chunk_name
[
8
]
=
{
"COPY"
,
"TSW1"
,
"BDLT"
,
"WDLT"
,
"
????
"
,
"DSW1"
,
"BLCK"
,
"DDS1"
"COPY"
,
"TSW1"
,
"BDLT"
,
"WDLT"
,
"
TDLT
"
,
"DSW1"
,
"BLCK"
,
"DDS1"
};
static
int
dfa_decode_frame
(
AVCodecContext
*
avctx
,
...
...
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