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
9dce48b6
Commit
9dce48b6
authored
Aug 30, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/avi/avi.c, modules/codec/rawvideo.c: RGB DIBs are coded from bottom to top.
parent
6227263f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+20
-4
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+7
-0
No files found.
modules/codec/rawvideo.c
View file @
9dce48b6
...
...
@@ -40,6 +40,7 @@ struct decoder_sys_t
* Input properties
*/
int
i_raw_size
;
vlc_bool_t
b_invert
;
/*
* Common properties
...
...
@@ -119,9 +120,17 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Misc init */
p_dec
->
p_sys
->
b_packetizer
=
VLC_FALSE
;
p_sys
->
i_pts
=
0
;
p_sys
->
b_invert
=
0
;
if
(
p_dec
->
fmt_in
.
video
.
i_width
<=
0
||
p_dec
->
fmt_in
.
video
.
i_height
<=
0
)
if
(
(
int
)
p_dec
->
fmt_in
.
video
.
i_height
<
0
)
{
/* Frames are coded from bottom to top */
p_dec
->
fmt_in
.
video
.
i_height
=
(
unsigned
int
)(
-
(
int
)
p_dec
->
fmt_in
.
video
.
i_height
);
p_sys
->
b_invert
=
VLC_TRUE
;
}
if
(
p_dec
->
fmt_in
.
video
.
i_width
<=
0
||
p_dec
->
fmt_in
.
video
.
i_height
<=
0
)
{
msg_Err
(
p_dec
,
"invalid display size %dx%d"
,
p_dec
->
fmt_in
.
video
.
i_width
,
p_dec
->
fmt_in
.
video
.
i_height
);
...
...
@@ -234,8 +243,9 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
{
uint8_t
*
p_src
,
*
p_dst
;
int
i_src
,
i_plane
,
i_line
,
i_width
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
p_src
=
p_block
->
p_buffer
;
p_src
=
p_block
->
p_buffer
;
i_src
=
p_block
->
i_buffer
;
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
...
...
@@ -243,12 +253,18 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
p_dst
=
p_pic
->
p
[
i_plane
].
p_pixels
;
i_width
=
p_pic
->
p
[
i_plane
].
i_visible_pitch
;
if
(
p_sys
->
b_invert
)
p_src
+=
(
i_width
*
(
p_pic
->
p
[
i_plane
].
i_visible_lines
-
1
));
for
(
i_line
=
0
;
i_line
<
p_pic
->
p
[
i_plane
].
i_visible_lines
;
i_line
++
)
{
p_dec
->
p_vlc
->
pf_memcpy
(
p_dst
,
p_src
,
i_width
);
p_src
+=
i_width
;
p_src
+=
p_sys
->
b_invert
?
-
i_width
:
i_width
;
p_dst
+=
p_pic
->
p
[
i_plane
].
i_pitch
;
}
if
(
p_sys
->
b_invert
)
p_src
+=
(
i_width
*
(
p_pic
->
p
[
i_plane
].
i_visible_lines
+
1
));
}
}
...
...
modules/demux/avi/avi.c
View file @
9dce48b6
...
...
@@ -448,6 +448,13 @@ static int Open( vlc_object_t * p_this )
p_vids
->
p_bih
->
biHeight
,
p_vids
->
p_bih
->
biBitCount
,
(
float
)
tk
->
i_rate
/
(
float
)
tk
->
i_scale
);
if
(
p_vids
->
p_bih
->
biCompression
==
0x00
)
{
/* RGB DIB are coded from bottom to top */
fmt
.
video
.
i_height
=
(
unsigned
int
)(
-
(
int
)
p_vids
->
p_bih
->
biHeight
);
}
break
;
default:
msg_Warn
(
p_demux
,
"stream[%d] unknown type"
,
i
);
...
...
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