Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
8badb23e
Commit
8badb23e
authored
15 years ago
by
Kostya Shishkov
Browse files
Options
Downloads
Patches
Plain Diff
Recognize 16-bit Interplay Video variant
Originally committed as revision 20927 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
9156a5ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/interplayvideo.c
+7
-1
7 additions, 1 deletion
libavcodec/interplayvideo.c
libavformat/ipmovie.c
+7
-0
7 additions, 0 deletions
libavformat/ipmovie.c
with
14 additions
and
1 deletion
libavcodec/interplayvideo.c
+
7
−
1
View file @
8badb23e
...
@@ -67,6 +67,7 @@ typedef struct IpvideoContext {
...
@@ -67,6 +67,7 @@ typedef struct IpvideoContext {
const
unsigned
char
*
buf
;
const
unsigned
char
*
buf
;
int
size
;
int
size
;
int
is_16bpp
;
const
unsigned
char
*
stream_ptr
;
const
unsigned
char
*
stream_ptr
;
const
unsigned
char
*
stream_end
;
const
unsigned
char
*
stream_end
;
unsigned
char
*
pixel_ptr
;
unsigned
char
*
pixel_ptr
;
...
@@ -620,7 +621,12 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
...
@@ -620,7 +621,12 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
return
-
1
;
return
-
1
;
}
}
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
s
->
is_16bpp
=
avctx
->
bits_per_coded_sample
==
16
;
avctx
->
pix_fmt
=
s
->
is_16bpp
?
PIX_FMT_RGB555
:
PIX_FMT_PAL8
;
if
(
s
->
is_16bpp
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"16-bit Interplay video is not supported yet.
\n
"
);
return
-
1
;
}
dsputil_init
(
&
s
->
dsp
,
avctx
);
dsputil_init
(
&
s
->
dsp
,
avctx
);
/* decoding map contains 4 bits of information per 8x8 block */
/* decoding map contains 4 bits of information per 8x8 block */
...
...
This diff is collapsed.
Click to expand it.
libavformat/ipmovie.c
+
7
−
0
View file @
8badb23e
...
@@ -93,6 +93,7 @@ typedef struct IPMVEContext {
...
@@ -93,6 +93,7 @@ typedef struct IPMVEContext {
uint64_t
frame_pts_inc
;
uint64_t
frame_pts_inc
;
unsigned
int
video_bpp
;
unsigned
int
video_width
;
unsigned
int
video_width
;
unsigned
int
video_height
;
unsigned
int
video_height
;
int64_t
video_pts
;
int64_t
video_pts
;
...
@@ -375,6 +376,11 @@ static int process_ipmovie_chunk(IPMVEContext *s, ByteIOContext *pb,
...
@@ -375,6 +376,11 @@ static int process_ipmovie_chunk(IPMVEContext *s, ByteIOContext *pb,
}
}
s
->
video_width
=
AV_RL16
(
&
scratch
[
0
])
*
8
;
s
->
video_width
=
AV_RL16
(
&
scratch
[
0
])
*
8
;
s
->
video_height
=
AV_RL16
(
&
scratch
[
2
])
*
8
;
s
->
video_height
=
AV_RL16
(
&
scratch
[
2
])
*
8
;
if
(
opcode_version
<
2
||
!
AV_RL16
(
&
scratch
[
6
]))
{
s
->
video_bpp
=
8
;
}
else
{
s
->
video_bpp
=
16
;
}
debug_ipmovie
(
"video resolution: %d x %d
\n
"
,
debug_ipmovie
(
"video resolution: %d x %d
\n
"
,
s
->
video_width
,
s
->
video_height
);
s
->
video_width
,
s
->
video_height
);
break
;
break
;
...
@@ -565,6 +571,7 @@ static int ipmovie_read_header(AVFormatContext *s,
...
@@ -565,6 +571,7 @@ static int ipmovie_read_header(AVFormatContext *s,
st
->
codec
->
codec_tag
=
0
;
/* no fourcc */
st
->
codec
->
codec_tag
=
0
;
/* no fourcc */
st
->
codec
->
width
=
ipmovie
->
video_width
;
st
->
codec
->
width
=
ipmovie
->
video_width
;
st
->
codec
->
height
=
ipmovie
->
video_height
;
st
->
codec
->
height
=
ipmovie
->
video_height
;
st
->
codec
->
bits_per_coded_sample
=
ipmovie
->
video_bpp
;
/* palette considerations */
/* palette considerations */
st
->
codec
->
palctrl
=
&
ipmovie
->
palette_control
;
st
->
codec
->
palctrl
=
&
ipmovie
->
palette_control
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment