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
613ccdaa
Commit
613ccdaa
authored
Jun 28, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/interplayvideo: use int16_t instead of short
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
42f516b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
interplayvideo.c
libavcodec/interplayvideo.c
+16
-16
No files found.
libavcodec/interplayvideo.c
View file @
613ccdaa
...
@@ -910,7 +910,7 @@ static int (* const ipvideo_decode_block16[])(IpvideoContext *s, AVFrame *frame)
...
@@ -910,7 +910,7 @@ static int (* const ipvideo_decode_block16[])(IpvideoContext *s, AVFrame *frame)
ipvideo_decode_block_opcode_0xE_16
,
ipvideo_decode_block_opcode_0x1
,
ipvideo_decode_block_opcode_0xE_16
,
ipvideo_decode_block_opcode_0x1
,
};
};
static
void
ipvideo_format_06_firstpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
shor
t
opcode
)
static
void
ipvideo_format_06_firstpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
int16_
t
opcode
)
{
{
int
line
;
int
line
;
...
@@ -926,29 +926,29 @@ static void ipvideo_format_06_firstpass(IpvideoContext *s, AVFrame *frame, short
...
@@ -926,29 +926,29 @@ static void ipvideo_format_06_firstpass(IpvideoContext *s, AVFrame *frame, short
}
}
}
}
static
void
ipvideo_format_06_secondpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
shor
t
opcode
)
static
void
ipvideo_format_06_secondpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
int16_
t
opcode
)
{
{
int
off_x
,
off_y
;
int
off_x
,
off_y
;
if
(
opcode
<
0
)
{
if
(
opcode
<
0
)
{
off_x
=
((
u
nsigned
shor
t
)
opcode
-
0xC000
)
%
frame
->
linesize
[
0
];
off_x
=
((
u
int16_
t
)
opcode
-
0xC000
)
%
frame
->
linesize
[
0
];
off_y
=
((
u
nsigned
shor
t
)
opcode
-
0xC000
)
/
frame
->
linesize
[
0
];
off_y
=
((
u
int16_
t
)
opcode
-
0xC000
)
/
frame
->
linesize
[
0
];
copy_from
(
s
,
s
->
last_frame
,
frame
,
off_x
,
off_y
);
copy_from
(
s
,
s
->
last_frame
,
frame
,
off_x
,
off_y
);
}
else
if
(
opcode
>
0
)
{
}
else
if
(
opcode
>
0
)
{
off_x
=
((
u
nsigned
shor
t
)
opcode
-
0x4000
)
%
frame
->
linesize
[
0
];
off_x
=
((
u
int16_
t
)
opcode
-
0x4000
)
%
frame
->
linesize
[
0
];
off_y
=
((
u
nsigned
shor
t
)
opcode
-
0x4000
)
/
frame
->
linesize
[
0
];
off_y
=
((
u
int16_
t
)
opcode
-
0x4000
)
/
frame
->
linesize
[
0
];
copy_from
(
s
,
frame
,
frame
,
off_x
,
off_y
);
copy_from
(
s
,
frame
,
frame
,
off_x
,
off_y
);
}
}
}
}
static
void
(
*
const
ipvideo_format_06_passes
[])(
IpvideoContext
*
s
,
AVFrame
*
frame
,
shor
t
op
)
=
{
static
void
(
*
const
ipvideo_format_06_passes
[])(
IpvideoContext
*
s
,
AVFrame
*
frame
,
int16_
t
op
)
=
{
ipvideo_format_06_firstpass
,
ipvideo_format_06_secondpass
,
ipvideo_format_06_firstpass
,
ipvideo_format_06_secondpass
,
};
};
static
void
ipvideo_decode_format_06_opcodes
(
IpvideoContext
*
s
,
AVFrame
*
frame
)
static
void
ipvideo_decode_format_06_opcodes
(
IpvideoContext
*
s
,
AVFrame
*
frame
)
{
{
int
pass
,
x
,
y
;
int
pass
,
x
,
y
;
shor
t
opcode
;
int16_
t
opcode
;
GetByteContext
decoding_map_ptr
;
GetByteContext
decoding_map_ptr
;
/* this is PAL8, so make the palette available */
/* this is PAL8, so make the palette available */
...
@@ -984,7 +984,7 @@ static void ipvideo_decode_format_06_opcodes(IpvideoContext *s, AVFrame *frame)
...
@@ -984,7 +984,7 @@ static void ipvideo_decode_format_06_opcodes(IpvideoContext *s, AVFrame *frame)
}
}
}
}
static
void
ipvideo_format_10_firstpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
shor
t
opcode
)
static
void
ipvideo_format_10_firstpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
int16_
t
opcode
)
{
{
int
line
;
int
line
;
...
@@ -996,29 +996,29 @@ static void ipvideo_format_10_firstpass(IpvideoContext *s, AVFrame *frame, short
...
@@ -996,29 +996,29 @@ static void ipvideo_format_10_firstpass(IpvideoContext *s, AVFrame *frame, short
}
}
}
}
static
void
ipvideo_format_10_secondpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
shor
t
opcode
)
static
void
ipvideo_format_10_secondpass
(
IpvideoContext
*
s
,
AVFrame
*
frame
,
int16_
t
opcode
)
{
{
int
off_x
,
off_y
;
int
off_x
,
off_y
;
if
(
opcode
<
0
)
{
if
(
opcode
<
0
)
{
off_x
=
((
u
nsigned
shor
t
)
opcode
-
0xC000
)
%
s
->
cur_decode_frame
->
linesize
[
0
];
off_x
=
((
u
int16_
t
)
opcode
-
0xC000
)
%
s
->
cur_decode_frame
->
linesize
[
0
];
off_y
=
((
u
nsigned
shor
t
)
opcode
-
0xC000
)
/
s
->
cur_decode_frame
->
linesize
[
0
];
off_y
=
((
u
int16_
t
)
opcode
-
0xC000
)
/
s
->
cur_decode_frame
->
linesize
[
0
];
copy_from
(
s
,
s
->
prev_decode_frame
,
s
->
cur_decode_frame
,
off_x
,
off_y
);
copy_from
(
s
,
s
->
prev_decode_frame
,
s
->
cur_decode_frame
,
off_x
,
off_y
);
}
else
if
(
opcode
>
0
)
{
}
else
if
(
opcode
>
0
)
{
off_x
=
((
u
nsigned
shor
t
)
opcode
-
0x4000
)
%
s
->
cur_decode_frame
->
linesize
[
0
];
off_x
=
((
u
int16_
t
)
opcode
-
0x4000
)
%
s
->
cur_decode_frame
->
linesize
[
0
];
off_y
=
((
u
nsigned
shor
t
)
opcode
-
0x4000
)
/
s
->
cur_decode_frame
->
linesize
[
0
];
off_y
=
((
u
int16_
t
)
opcode
-
0x4000
)
/
s
->
cur_decode_frame
->
linesize
[
0
];
copy_from
(
s
,
s
->
cur_decode_frame
,
s
->
cur_decode_frame
,
off_x
,
off_y
);
copy_from
(
s
,
s
->
cur_decode_frame
,
s
->
cur_decode_frame
,
off_x
,
off_y
);
}
}
}
}
static
void
(
*
const
ipvideo_format_10_passes
[])(
IpvideoContext
*
s
,
AVFrame
*
frame
,
shor
t
op
)
=
{
static
void
(
*
const
ipvideo_format_10_passes
[])(
IpvideoContext
*
s
,
AVFrame
*
frame
,
int16_
t
op
)
=
{
ipvideo_format_10_firstpass
,
ipvideo_format_10_secondpass
,
ipvideo_format_10_firstpass
,
ipvideo_format_10_secondpass
,
};
};
static
void
ipvideo_decode_format_10_opcodes
(
IpvideoContext
*
s
,
AVFrame
*
frame
)
static
void
ipvideo_decode_format_10_opcodes
(
IpvideoContext
*
s
,
AVFrame
*
frame
)
{
{
int
pass
,
x
,
y
,
changed_block
;
int
pass
,
x
,
y
,
changed_block
;
shor
t
opcode
,
skip
;
int16_
t
opcode
,
skip
;
GetByteContext
decoding_map_ptr
;
GetByteContext
decoding_map_ptr
;
GetByteContext
skip_map_ptr
;
GetByteContext
skip_map_ptr
;
...
...
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