Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
4494922c
Commit
4494922c
authored
Apr 18, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: handle paletized bitmaps
fruity.avi
parent
cb7b1eef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+24
-2
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+4
-0
No files found.
modules/demux/avi/avi.c
View file @
4494922c
...
...
@@ -496,8 +496,11 @@ static int Open( vlc_object_t * p_this )
case
9
:
/* <- TODO check that */
tk
->
i_codec
=
VLC_CODEC_I410
;
break
;
case
8
:
/* <- TODO check that */
tk
->
i_codec
=
VLC_CODEC_GREY
;
case
8
:
if
(
p_vids
->
p_bih
->
biClrUsed
)
tk
->
i_codec
=
VLC_CODEC_RGBP
;
else
tk
->
i_codec
=
VLC_CODEC_GREY
;
break
;
}
es_format_Init
(
&
fmt
,
VIDEO_ES
,
tk
->
i_codec
);
...
...
@@ -515,6 +518,25 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_gmask
=
0x03e0
;
fmt
.
video
.
i_bmask
=
0x001f
;
break
;
case
VLC_CODEC_RGBP
:
{
const
VLC_BITMAPINFO
*
p_bi
=
(
const
VLC_BITMAPINFO
*
)
p_vids
->
p_bih
;
fmt
.
video
.
p_palette
=
malloc
(
sizeof
(
video_palette_t
)
);
if
(
fmt
.
video
.
p_palette
)
{
uint32_t
entry
;
for
(
uint32_t
i
=
0
;
i
<
p_vids
->
p_bih
->
biClrUsed
;
i
++
)
{
entry
=
GetDWBE
(
&
p_bi
->
bmiColors
[
i
]
);
fmt
.
video
.
p_palette
->
palette
[
i
][
0
]
=
entry
>>
24
;
fmt
.
video
.
p_palette
->
palette
[
i
][
1
]
=
(
entry
>>
16
)
&
0xFF
;
fmt
.
video
.
p_palette
->
palette
[
i
][
2
]
=
(
entry
>>
8
)
&
0xFF
;
fmt
.
video
.
p_palette
->
palette
[
i
][
3
]
=
entry
&
0xFF
;
}
fmt
.
video
.
p_palette
->
i_entries
=
p_vids
->
p_bih
->
biClrUsed
;
}
}
break
;
default:
break
;
}
...
...
modules/demux/avi/libavi.c
View file @
4494922c
...
...
@@ -430,6 +430,10 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
__MAX
(
i_extrasize
/
sizeof
(
uint32_t
),
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
);
}
/* stay within VLC's limits */
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
=
__MAX
(
VIDEO_PALETTE_COLORS_MAX
,
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
);
}
else
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
=
0
;
#ifdef AVI_DEBUG
...
...
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