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
e37e5335
Commit
e37e5335
authored
Feb 01, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const
Originally committed as revision 11785 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
14ff144c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
vmdav.c
libavcodec/vmdav.c
+12
-12
No files found.
libavcodec/vmdav.c
View file @
e37e5335
...
@@ -61,7 +61,7 @@ typedef struct VmdVideoContext {
...
@@ -61,7 +61,7 @@ typedef struct VmdVideoContext {
AVFrame
frame
;
AVFrame
frame
;
AVFrame
prev_frame
;
AVFrame
prev_frame
;
unsigned
char
*
buf
;
const
unsigned
char
*
buf
;
int
size
;
int
size
;
unsigned
char
palette
[
PALETTE_COUNT
*
4
];
unsigned
char
palette
[
PALETTE_COUNT
*
4
];
...
@@ -74,9 +74,9 @@ typedef struct VmdVideoContext {
...
@@ -74,9 +74,9 @@ typedef struct VmdVideoContext {
#define QUEUE_SIZE 0x1000
#define QUEUE_SIZE 0x1000
#define QUEUE_MASK 0x0FFF
#define QUEUE_MASK 0x0FFF
static
void
lz_unpack
(
unsigned
char
*
src
,
unsigned
char
*
dest
,
int
dest_len
)
static
void
lz_unpack
(
const
unsigned
char
*
src
,
unsigned
char
*
dest
,
int
dest_len
)
{
{
unsigned
char
*
s
;
const
unsigned
char
*
s
;
unsigned
char
*
d
;
unsigned
char
*
d
;
unsigned
char
*
d_end
;
unsigned
char
*
d_end
;
unsigned
char
queue
[
QUEUE_SIZE
];
unsigned
char
queue
[
QUEUE_SIZE
];
...
@@ -144,10 +144,10 @@ static void lz_unpack(unsigned char *src, unsigned char *dest, int dest_len)
...
@@ -144,10 +144,10 @@ static void lz_unpack(unsigned char *src, unsigned char *dest, int dest_len)
}
}
}
}
static
int
rle_unpack
(
unsigned
char
*
src
,
unsigned
char
*
dest
,
static
int
rle_unpack
(
const
unsigned
char
*
src
,
unsigned
char
*
dest
,
int
src_len
,
int
dest_len
)
int
src_len
,
int
dest_len
)
{
{
unsigned
char
*
ps
;
const
unsigned
char
*
ps
;
unsigned
char
*
pd
;
unsigned
char
*
pd
;
int
i
,
l
;
int
i
,
l
;
unsigned
char
*
dest_end
=
dest
+
dest_len
;
unsigned
char
*
dest_end
=
dest
+
dest_len
;
...
@@ -190,9 +190,9 @@ static void vmd_decode(VmdVideoContext *s)
...
@@ -190,9 +190,9 @@ static void vmd_decode(VmdVideoContext *s)
unsigned
char
r
,
g
,
b
;
unsigned
char
r
,
g
,
b
;
/* point to the start of the encoded data */
/* point to the start of the encoded data */
unsigned
char
*
p
=
s
->
buf
+
16
;
const
unsigned
char
*
p
=
s
->
buf
+
16
;
unsigned
char
*
pb
;
const
unsigned
char
*
pb
;
unsigned
char
meth
;
unsigned
char
meth
;
unsigned
char
*
dp
;
/* pointer to current frame */
unsigned
char
*
dp
;
/* pointer to current frame */
unsigned
char
*
pp
;
/* pointer to previous frame */
unsigned
char
*
pp
;
/* pointer to previous frame */
...
@@ -368,7 +368,7 @@ static int vmdvideo_decode_init(AVCodecContext *avctx)
...
@@ -368,7 +368,7 @@ static int vmdvideo_decode_init(AVCodecContext *avctx)
static
int
vmdvideo_decode_frame
(
AVCodecContext
*
avctx
,
static
int
vmdvideo_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
void
*
data
,
int
*
data_size
,
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
VmdVideoContext
*
s
=
avctx
->
priv_data
;
VmdVideoContext
*
s
=
avctx
->
priv_data
;
...
@@ -457,7 +457,7 @@ static int vmdaudio_decode_init(AVCodecContext *avctx)
...
@@ -457,7 +457,7 @@ static int vmdaudio_decode_init(AVCodecContext *avctx)
}
}
static
void
vmdaudio_decode_audio
(
VmdAudioContext
*
s
,
unsigned
char
*
data
,
static
void
vmdaudio_decode_audio
(
VmdAudioContext
*
s
,
unsigned
char
*
data
,
uint8_t
*
buf
,
int
stereo
)
const
uint8_t
*
buf
,
int
stereo
)
{
{
int
i
;
int
i
;
int
chan
=
0
;
int
chan
=
0
;
...
@@ -475,7 +475,7 @@ static void vmdaudio_decode_audio(VmdAudioContext *s, unsigned char *data,
...
@@ -475,7 +475,7 @@ static void vmdaudio_decode_audio(VmdAudioContext *s, unsigned char *data,
}
}
static
int
vmdaudio_loadsound
(
VmdAudioContext
*
s
,
unsigned
char
*
data
,
static
int
vmdaudio_loadsound
(
VmdAudioContext
*
s
,
unsigned
char
*
data
,
uint8_t
*
buf
,
int
silence
)
const
uint8_t
*
buf
,
int
silence
)
{
{
int
bytes_decoded
=
0
;
int
bytes_decoded
=
0
;
int
i
;
int
i
;
...
@@ -522,13 +522,13 @@ static int vmdaudio_loadsound(VmdAudioContext *s, unsigned char *data,
...
@@ -522,13 +522,13 @@ static int vmdaudio_loadsound(VmdAudioContext *s, unsigned char *data,
static
int
vmdaudio_decode_frame
(
AVCodecContext
*
avctx
,
static
int
vmdaudio_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
void
*
data
,
int
*
data_size
,
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
VmdAudioContext
*
s
=
avctx
->
priv_data
;
VmdAudioContext
*
s
=
avctx
->
priv_data
;
unsigned
char
*
output_samples
=
(
unsigned
char
*
)
data
;
unsigned
char
*
output_samples
=
(
unsigned
char
*
)
data
;
/* point to the start of the encoded data */
/* point to the start of the encoded data */
unsigned
char
*
p
=
buf
+
16
;
const
unsigned
char
*
p
=
buf
+
16
;
if
(
buf_size
<
16
)
if
(
buf_size
<
16
)
return
buf_size
;
return
buf_size
;
...
...
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