Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
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
Show 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
...
@@ -441,8 +441,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -441,8 +441,7 @@ static int Open( vlc_object_t * p_this )
p_vids
->
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
)
);
p_vids
->
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
)
);
fmt
.
p_extra
=
&
p_vids
->
p_bih
[
1
];
fmt
.
p_extra
=
&
p_vids
->
p_bih
[
1
];
msg_Dbg
(
p_demux
,
"stream[%d] video(%4.4s) %dx%d %dbpp %ffps"
,
msg_Dbg
(
p_demux
,
"stream[%d] video(%4.4s) %dx%d %dbpp %ffps"
,
i
,
i
,
(
char
*
)
&
p_vids
->
p_bih
->
biCompression
,
(
char
*
)
&
p_vids
->
p_bih
->
biCompression
,
p_vids
->
p_bih
->
biWidth
,
p_vids
->
p_bih
->
biWidth
,
p_vids
->
p_bih
->
biHeight
,
p_vids
->
p_bih
->
biHeight
,
p_vids
->
p_bih
->
biBitCount
,
p_vids
->
p_bih
->
biBitCount
,
...
@@ -454,6 +453,29 @@ static int Open( vlc_object_t * p_this )
...
@@ -454,6 +453,29 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_height
=
fmt
.
video
.
i_height
=
(
unsigned
int
)(
-
(
int
)
p_vids
->
p_bih
->
biHeight
);
(
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
;
break
;
case
(
AVIFOURCC_txts
):
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 )
...
@@ -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
->
biYPelsPerMeter
);
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
);
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
);
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biClrImportant
);
AVI_READ4BYTES
(
p_chk
->
strf
.
vids
.
p_bih
->
biClrImportant
);
if
(
p_chk
->
strf
.
vids
.
p_bih
->
biSize
>
if
(
p_chk
->
strf
.
vids
.
p_bih
->
biSize
>
p_chk
->
common
.
i_chunk_size
)
p_chk
->
common
.
i_chunk_size
)
{
{
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 )
...
@@ -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
],
memcpy
(
&
p_chk
->
strf
.
vids
.
p_bih
[
1
],
p_buff
+
8
+
sizeof
(
BITMAPINFOHEADER
),
/* 8=fourrc+size */
p_buff
+
8
+
sizeof
(
BITMAPINFOHEADER
),
/* 8=fourrc+size */
p_chk
->
strf
.
vids
.
p_bih
->
biSize
-
p_chk
->
common
.
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
)
);
sizeof
(
BITMAPINFOHEADER
)
);
}
}
#ifdef AVI_DEBUG
#ifdef AVI_DEBUG
msg_Dbg
(
(
vlc_object_t
*
)
s
,
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