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
f1c39594
Commit
f1c39594
authored
12 years ago
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eatgv: use fixed-width types where appropriate.
parent
c59211b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
eatgv.c
libavcodec/eatgv.c
+8
-8
No files found.
libavcodec/eatgv.c
View file @
f1c39594
...
...
@@ -42,10 +42,10 @@ typedef struct TgvContext {
AVFrame
frame
;
AVFrame
last_frame
;
int
width
,
height
;
u
nsigned
in
t
palette
[
AVPALETTE_COUNT
];
u
int32_
t
palette
[
AVPALETTE_COUNT
];
int
(
*
mv_codebook
)[
2
];
u
nsigned
char
(
*
block_codebook
)[
16
];
u
int8_t
(
*
block_codebook
)[
16
];
int
num_mvs
;
///< current length of mv_codebook
int
num_blocks_packed
;
///< current length of block_codebook
}
TgvContext
;
...
...
@@ -64,11 +64,11 @@ static av_cold int tgv_decode_init(AVCodecContext *avctx)
* @return 0 on success, -1 on critical buffer underflow
*/
static
int
unpack
(
const
uint8_t
*
src
,
const
uint8_t
*
src_end
,
u
nsigned
char
*
dst
,
int
width
,
int
height
)
u
int8_t
*
dst
,
int
width
,
int
height
)
{
u
nsigned
char
*
dst_end
=
dst
+
width
*
height
;
u
int8_t
*
dst_end
=
dst
+
width
*
height
;
int
size
,
size1
,
size2
,
offset
,
run
;
u
nsigned
char
*
dst_start
=
dst
;
u
int8_t
*
dst_start
=
dst
;
if
(
src
[
0
]
&
0x01
)
src
+=
5
;
...
...
@@ -148,7 +148,7 @@ static int tgv_decode_inter(TgvContext *s, const uint8_t *buf,
int
i
,
j
,
x
,
y
;
GetBitContext
gb
;
int
mvbits
;
const
u
nsigned
char
*
blocks_raw
;
const
u
int8_t
*
blocks_raw
;
if
(
buf
+
12
>
buf_end
)
return
AVERROR_INVALIDDATA
;
...
...
@@ -172,7 +172,7 @@ static int tgv_decode_inter(TgvContext *s, const uint8_t *buf,
}
if
(
num_blocks_packed
>
s
->
num_blocks_packed
)
{
s
->
block_codebook
=
av_realloc
(
s
->
block_codebook
,
num_blocks_packed
*
16
*
sizeof
(
unsigned
char
)
);
s
->
block_codebook
=
av_realloc
(
s
->
block_codebook
,
num_blocks_packed
*
16
);
s
->
num_blocks_packed
=
num_blocks_packed
;
}
...
...
@@ -211,7 +211,7 @@ static int tgv_decode_inter(TgvContext *s, const uint8_t *buf,
for
(
y
=
0
;
y
<
s
->
avctx
->
height
/
4
;
y
++
)
for
(
x
=
0
;
x
<
s
->
avctx
->
width
/
4
;
x
++
)
{
unsigned
int
vector
=
get_bits
(
&
gb
,
vector_bits
);
const
u
nsigned
char
*
src
;
const
u
int8_t
*
src
;
int
src_stride
;
if
(
vector
<
num_mvs
)
{
...
...
This diff is collapsed.
Click to expand it.
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