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
8ca6f29c
Commit
8ca6f29c
authored
Aug 30, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ALL: use rgb mask members in video_format_t.
* modules/demux/avi/avi.c: raw RGB 24 is in fact BGR 24.
parent
5054a569
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
12 deletions
+44
-12
include/vlc_es.h
include/vlc_es.h
+1
-1
modules/codec/ffmpeg/chroma.c
modules/codec/ffmpeg/chroma.c
+8
-4
modules/codec/ffmpeg/video_filter.c
modules/codec/ffmpeg/video_filter.c
+3
-0
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+9
-1
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+10
-1
src/input/decoder.c
src/input/decoder.c
+13
-5
No files found.
include/vlc_es.h
View file @
8ca6f29c
...
...
@@ -102,7 +102,7 @@ struct video_format_t
unsigned
int
i_frame_rate
;
/**< frame rate numerator */
unsigned
int
i_frame_rate_base
;
/**< frame rate denominator */
int
i_rmask
,
i_
r
gmask
,
i_bmask
;
/**< color masks for RGB chroma */
int
i_rmask
,
i_gmask
,
i_bmask
;
/**< color masks for RGB chroma */
video_palette_t
*
p_palette
;
/**< video palette from demuxer */
};
...
...
modules/codec/ffmpeg/chroma.c
View file @
8ca6f29c
...
...
@@ -88,6 +88,7 @@ int E_(OpenChroma)( vlc_object_t *p_this )
p_vout
->
chroma
.
p_sys
->
i_dst_vlc_chroma
=
p_vout
->
output
.
i_chroma
;
p_vout
->
chroma
.
p_sys
->
i_src_ffmpeg_chroma
=
i_ffmpeg_chroma
[
0
];
p_vout
->
chroma
.
p_sys
->
i_dst_ffmpeg_chroma
=
i_ffmpeg_chroma
[
1
];
if
(
(
p_vout
->
render
.
i_height
!=
p_vout
->
output
.
i_height
||
p_vout
->
render
.
i_width
!=
p_vout
->
output
.
i_width
)
&&
(
p_vout
->
chroma
.
p_sys
->
i_dst_vlc_chroma
==
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
)
||
...
...
@@ -95,10 +96,9 @@ int E_(OpenChroma)( vlc_object_t *p_this )
{
msg_Dbg
(
p_vout
,
"preparing to resample picture"
);
p_vout
->
chroma
.
p_sys
->
p_rsc
=
img_resample_init
(
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
);
p_vout
->
chroma
.
p_sys
->
p_rsc
=
img_resample_init
(
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
);
avpicture_alloc
(
&
p_vout
->
chroma
.
p_sys
->
tmp_pic
,
p_vout
->
chroma
.
p_sys
->
i_dst_ffmpeg_chroma
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
);
...
...
@@ -152,6 +152,10 @@ static void ChromaConversion( vout_thread_t *p_vout,
dest_pic
.
data
[
1
]
=
p_dest
->
p
[
2
].
p_pixels
;
dest_pic
.
data
[
2
]
=
p_dest
->
p
[
1
].
p_pixels
;
}
if
(
p_vout
->
chroma
.
p_sys
->
i_src_ffmpeg_chroma
==
PIX_FMT_RGB24
)
if
(
p_vout
->
render
.
i_bmask
==
0x00ff0000
)
p_vout
->
chroma
.
p_sys
->
i_src_ffmpeg_chroma
=
PIX_FMT_BGR24
;
if
(
p_vout
->
chroma
.
p_sys
->
p_rsc
)
{
img_convert
(
&
p_vout
->
chroma
.
p_sys
->
tmp_pic
,
...
...
modules/codec/ffmpeg/video_filter.c
View file @
8ca6f29c
...
...
@@ -195,6 +195,9 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
dest_pic
.
data
[
1
]
=
p_pic_dst
->
p
[
2
].
p_pixels
;
dest_pic
.
data
[
2
]
=
p_pic_dst
->
p
[
1
].
p_pixels
;
}
if
(
p_sys
->
i_src_ffmpeg_chroma
==
PIX_FMT_RGB24
)
if
(
p_filter
->
fmt_in
.
video
.
i_bmask
==
0x00ff0000
)
p_sys
->
i_src_ffmpeg_chroma
=
PIX_FMT_BGR24
;
#if 0
if( p_sys->b_resize &&
...
...
modules/codec/rawvideo.c
View file @
8ca6f29c
...
...
@@ -139,11 +139,19 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Set output properties */
p_dec
->
fmt_out
.
i_cat
=
VIDEO_ES
;
p_dec
->
fmt_out
.
i_codec
=
p_dec
->
fmt_in
.
i_codec
;
//
if( !p_dec->fmt_in.video.i_aspect )
if
(
!
p_dec
->
fmt_in
.
video
.
i_aspect
)
{
p_dec
->
fmt_out
.
video
.
i_aspect
=
VOUT_ASPECT_FACTOR
*
p_dec
->
fmt_out
.
video
.
i_width
/
p_dec
->
fmt_out
.
video
.
i_height
;
}
else
p_dec
->
fmt_out
.
video
.
i_aspect
=
p_dec
->
fmt_in
.
video
.
i_aspect
;
if
(
p_dec
->
fmt_in
.
video
.
i_rmask
)
p_dec
->
fmt_out
.
video
.
i_rmask
=
p_dec
->
fmt_in
.
video
.
i_rmask
;
if
(
p_dec
->
fmt_in
.
video
.
i_gmask
)
p_dec
->
fmt_out
.
video
.
i_gmask
=
p_dec
->
fmt_in
.
video
.
i_gmask
;
if
(
p_dec
->
fmt_in
.
video
.
i_bmask
)
p_dec
->
fmt_out
.
video
.
i_bmask
=
p_dec
->
fmt_in
.
video
.
i_bmask
;
/* Set callbacks */
p_dec
->
pf_decode_video
=
(
picture_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
...
...
modules/demux/avi/avi.c
View file @
8ca6f29c
...
...
@@ -415,11 +415,20 @@ static int Open( vlc_object_t * p_this )
break
;
}
es_format_Init
(
&
fmt
,
VIDEO_ES
,
tk
->
i_codec
);
if
(
p_vids
->
p_bih
->
biBitCount
==
24
)
{
/* This is in BGR format */
fmt
.
video
.
i_bmask
=
0x00ff0000
;
fmt
.
video
.
i_gmask
=
0x0000ff00
;
fmt
.
video
.
i_rmask
=
0x000000ff
;
}
}
else
{
es_format_Init
(
&
fmt
,
VIDEO_ES
,
p_vids
->
p_bih
->
biCompression
);
if
(
tk
->
i_codec
==
FOURCC_mp4v
&&
!
strncasecmp
(
(
char
*
)
&
p_strh
->
i_handler
,
"XVID"
,
4
)
)
if
(
tk
->
i_codec
==
FOURCC_mp4v
&&
!
strncasecmp
(
(
char
*
)
&
p_strh
->
i_handler
,
"XVID"
,
4
)
)
{
fmt
.
i_codec
=
VLC_FOURCC
(
'X'
,
'V'
,
'I'
,
'D'
);
}
...
...
src/input/decoder.c
View file @
8ca6f29c
...
...
@@ -235,9 +235,9 @@ void input_DecoderDecode( decoder_t * p_dec, block_t *p_block )
}
else
{
if
(
p_dec
->
b_error
||
p_block
->
i_buffer
<=
0
)
if
(
p_dec
->
b_error
||
(
p_block
&&
p_block
->
i_buffer
<=
0
)
)
{
block_Release
(
p_block
);
if
(
p_block
)
block_Release
(
p_block
);
}
else
{
...
...
@@ -503,9 +503,9 @@ static int DecoderThread( decoder_t * p_dec )
*/
static
int
DecoderDecode
(
decoder_t
*
p_dec
,
block_t
*
p_block
)
{
int
i_rate
=
p_block
->
i_rate
;
int
i_rate
=
p_block
?
p_block
->
i_rate
:
1000
;
if
(
p_block
->
i_buffer
<=
0
)
if
(
p_block
&&
p_block
->
i_buffer
<=
0
)
{
block_Release
(
p_block
);
return
VLC_SUCCESS
;
...
...
@@ -515,7 +515,8 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
{
block_t
*
p_sout_block
;
while
(
(
p_sout_block
=
p_dec
->
pf_packetize
(
p_dec
,
&
p_block
))
)
while
(
(
p_sout_block
=
p_dec
->
pf_packetize
(
p_dec
,
p_block
?
&
p_block
:
0
)
)
)
{
if
(
!
p_dec
->
p_owner
->
p_sout_input
)
{
...
...
@@ -828,6 +829,13 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
p_dec
->
b_error
=
VLC_TRUE
;
return
NULL
;
}
if
(
p_sys
->
video
.
i_rmask
)
p_sys
->
p_vout
->
render
.
i_rmask
=
p_sys
->
video
.
i_rmask
;
if
(
p_sys
->
video
.
i_gmask
)
p_sys
->
p_vout
->
render
.
i_gmask
=
p_sys
->
video
.
i_gmask
;
if
(
p_sys
->
video
.
i_bmask
)
p_sys
->
p_vout
->
render
.
i_bmask
=
p_sys
->
video
.
i_bmask
;
}
/* Get a new picture */
...
...
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