Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a5ce00f7
Commit
a5ce00f7
authored
Apr 20, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/avi: pass on video palette.
parent
9471dec2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+26
-4
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+2
-4
No files found.
modules/demux/avi/avi.c
View file @
a5ce00f7
...
...
@@ -434,15 +434,14 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_width
=
p_vids
->
p_bih
->
biWidth
;
fmt
.
video
.
i_height
=
p_vids
->
p_bih
->
biHeight
;
fmt
.
video
.
i_bits_per_pixel
=
p_vids
->
p_bih
->
biBitCount
;
fmt
.
video
.
i_frame_rate
=
tk
->
i_rate
;
fmt
.
video
.
i_frame_rate_base
=
tk
->
i_scale
;
fmt
.
video
.
i_frame_rate
=
tk
->
i_rate
;
fmt
.
video
.
i_frame_rate_base
=
tk
->
i_scale
;
fmt
.
i_extra
=
__MIN
(
p_vids
->
p_bih
->
biSize
-
sizeof
(
BITMAPINFOHEADER
),
p_vids
->
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
)
);
fmt
.
p_extra
=
&
p_vids
->
p_bih
[
1
];
msg_Dbg
(
p_demux
,
"stream[%d] video(%4.4s) %dx%d %dbpp %ffps"
,
i
,
(
char
*
)
&
p_vids
->
p_bih
->
biCompression
,
i
,
(
char
*
)
&
p_vids
->
p_bih
->
biCompression
,
p_vids
->
p_bih
->
biWidth
,
p_vids
->
p_bih
->
biHeight
,
p_vids
->
p_bih
->
biBitCount
,
...
...
@@ -454,6 +453,29 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_height
=
(
unsigned
int
)(
-
(
int
)
p_vids
->
p_bih
->
biHeight
);
}
/* Extract palette from extradata if bpp <= 8
* (assumes that extradata contains only palette but appears
* to be true for all palettized codecs we support) */
if
(
fmt
.
i_extra
&&
fmt
.
video
.
i_bits_per_pixel
<=
8
&&
fmt
.
video
.
i_bits_per_pixel
>
0
)
{
int
i
;
fmt
.
video
.
p_palette
=
calloc
(
sizeof
(
video_palette_t
),
1
);
fmt
.
video
.
p_palette
->
i_entries
=
1
;
/* Apparently this is necessary. But why ? */
fmt
.
i_extra
=
p_vids
->
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
);
for
(
i
=
0
;
i
<
__MIN
(
fmt
.
i_extra
/
4
,
256
);
i
++
)
{
((
uint32_t
*
)
&
fmt
.
video
.
p_palette
->
palette
[
0
][
0
])[
i
]
=
GetDWLE
((
uint32_t
*
)
fmt
.
p_extra
+
i
);
}
}
break
;
case
(
AVIFOURCC_txts
):
...
...
modules/demux/avi/libavi.c
View file @
a5ce00f7
...
...
@@ -385,8 +385,7 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biYPelsPerMeter
);
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
);
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biClrImportant
);
if
(
p_chk
->
strf
.
vids
.
p_bih
->
biSize
>
p_chk
->
common
.
i_chunk_size
)
if
(
p_chk
->
strf
.
vids
.
p_bih
->
biSize
>
p_chk
->
common
.
i_chunk_size
)
{
p_chk
->
strf
.
vids
.
p_bih
->
biSize
=
p_chk
->
common
.
i_chunk_size
;
}
...
...
@@ -394,8 +393,7 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
{
memcpy
(
&
p_chk
->
strf
.
vids
.
p_bih
[
1
],
p_buff
+
8
+
sizeof
(
BITMAPINFOHEADER
),
/* 8=fourrc+size */
p_chk
->
strf
.
vids
.
p_bih
->
biSize
-
sizeof
(
BITMAPINFOHEADER
)
);
p_chk
->
common
.
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
)
);
}
#ifdef AVI_DEBUG
msg_Dbg
(
(
vlc_object_t
*
)
s
,
...
...
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