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
b07ed16e
Commit
b07ed16e
authored
Jan 27, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video_format_Setup: set visible dimensions
parent
0ba9b178
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
27 additions
and
20 deletions
+27
-20
include/vlc_es.h
include/vlc_es.h
+3
-1
modules/access/bluray.c
modules/access/bluray.c
+2
-2
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+2
-0
modules/codec/xwd.c
modules/codec/xwd.c
+1
-0
modules/demux/rawvid.c
modules/demux/rawvid.c
+2
-2
modules/stream_out/transcode/osd.c
modules/stream_out/transcode/osd.c
+1
-1
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
...les/video_filter/dynamicoverlay/dynamicoverlay_commands.c
+2
-2
modules/video_output/decklink.cpp
modules/video_output/decklink.cpp
+2
-1
modules/visualization/glspectrum.c
modules/visualization/glspectrum.c
+1
-1
modules/visualization/projectm.cpp
modules/visualization/projectm.cpp
+2
-4
modules/visualization/vsxu.cpp
modules/visualization/vsxu.cpp
+1
-1
src/misc/es_format.c
src/misc/es_format.c
+5
-4
src/misc/picture.c
src/misc/picture.c
+3
-1
No files found.
include/vlc_es.h
View file @
b07ed16e
...
@@ -250,7 +250,9 @@ static inline void video_format_Clean( video_format_t *p_src )
...
@@ -250,7 +250,9 @@ static inline void video_format_Clean( video_format_t *p_src )
* It will fill up a video_format_t using the given arguments.
* It will fill up a video_format_t using the given arguments.
* Note that the video_format_t must already be initialized.
* Note that the video_format_t must already be initialized.
*/
*/
VLC_API
void
video_format_Setup
(
video_format_t
*
,
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_sar_num
,
int
i_sar_den
);
VLC_API
void
video_format_Setup
(
video_format_t
*
,
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_visible_width
,
int
i_visible_height
,
int
i_sar_num
,
int
i_sar_den
);
/**
/**
* It will copy the crop properties from a video_format_t to another.
* It will copy the crop properties from a video_format_t to another.
...
...
modules/access/bluray.c
View file @
b07ed16e
...
@@ -919,7 +919,7 @@ static void blurayDrawOverlay(demux_t *p_demux, const BD_OVERLAY* const ov)
...
@@ -919,7 +919,7 @@ static void blurayDrawOverlay(demux_t *p_demux, const BD_OVERLAY* const ov)
if
(
!
p_reg
)
{
if
(
!
p_reg
)
{
video_format_t
fmt
;
video_format_t
fmt
;
video_format_Init
(
&
fmt
,
0
);
video_format_Init
(
&
fmt
,
0
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_YUVP
,
ov
->
w
,
ov
->
h
,
1
,
1
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_YUVP
,
ov
->
w
,
ov
->
h
,
ov
->
w
,
ov
->
h
,
1
,
1
);
p_reg
=
subpicture_region_New
(
&
fmt
);
p_reg
=
subpicture_region_New
(
&
fmt
);
p_reg
->
i_x
=
ov
->
x
;
p_reg
->
i_x
=
ov
->
x
;
...
@@ -1007,7 +1007,7 @@ static void blurayInitArgbOverlay(demux_t *p_demux, int plane, int width, int he
...
@@ -1007,7 +1007,7 @@ static void blurayInitArgbOverlay(demux_t *p_demux, int plane, int width, int he
if
(
!
p_sys
->
p_overlays
[
plane
]
->
p_regions
)
{
if
(
!
p_sys
->
p_overlays
[
plane
]
->
p_regions
)
{
video_format_t
fmt
;
video_format_t
fmt
;
video_format_Init
(
&
fmt
,
0
);
video_format_Init
(
&
fmt
,
0
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGBA
,
width
,
height
,
1
,
1
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGBA
,
width
,
height
,
width
,
height
,
1
,
1
);
p_sys
->
p_overlays
[
plane
]
->
p_regions
=
subpicture_region_New
(
&
fmt
);
p_sys
->
p_overlays
[
plane
]
->
p_regions
=
subpicture_region_New
(
&
fmt
);
}
}
...
...
modules/codec/rawvideo.c
View file @
b07ed16e
...
@@ -175,6 +175,8 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -175,6 +175,8 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Find out p_vdec->i_raw_size */
/* Find out p_vdec->i_raw_size */
video_format_Setup
(
&
p_dec
->
fmt_out
.
video
,
p_dec
->
fmt_in
.
i_codec
,
video_format_Setup
(
&
p_dec
->
fmt_out
.
video
,
p_dec
->
fmt_in
.
i_codec
,
p_dec
->
fmt_in
.
video
.
i_width
,
p_dec
->
fmt_in
.
video
.
i_height
,
p_dec
->
fmt_in
.
video
.
i_visible_width
,
p_dec
->
fmt_in
.
video
.
i_visible_width
,
p_dec
->
fmt_in
.
video
.
i_visible_height
,
p_dec
->
fmt_in
.
video
.
i_visible_height
,
p_dec
->
fmt_in
.
video
.
i_sar_num
,
p_dec
->
fmt_in
.
video
.
i_sar_num
,
...
...
modules/codec/xwd.c
View file @
b07ed16e
...
@@ -120,6 +120,7 @@ static picture_t *Decode (decoder_t *dec, block_t **pp)
...
@@ -120,6 +120,7 @@ static picture_t *Decode (decoder_t *dec, block_t **pp)
goto
drop
;
goto
drop
;
video_format_Setup
(
&
dec
->
fmt_out
.
video
,
chroma
,
video_format_Setup
(
&
dec
->
fmt_out
.
video
,
chroma
,
ntohl
(
hdr
->
pixmap_width
),
ntohl
(
hdr
->
pixmap_height
),
ntohl
(
hdr
->
pixmap_width
),
ntohl
(
hdr
->
pixmap_height
),
ntohl
(
hdr
->
pixmap_width
),
ntohl
(
hdr
->
pixmap_height
),
dec
->
fmt_in
.
video
.
i_sar_num
,
dec
->
fmt_in
.
video
.
i_sar_num
,
dec
->
fmt_in
.
video
.
i_sar_den
);
dec
->
fmt_in
.
video
.
i_sar_den
);
...
...
modules/demux/rawvid.c
View file @
b07ed16e
...
@@ -364,8 +364,8 @@ valid:
...
@@ -364,8 +364,8 @@ valid:
}
}
es_format_Init
(
&
p_sys
->
fmt_video
,
VIDEO_ES
,
i_chroma
);
es_format_Init
(
&
p_sys
->
fmt_video
,
VIDEO_ES
,
i_chroma
);
video_format_Setup
(
&
p_sys
->
fmt_video
.
video
,
video_format_Setup
(
&
p_sys
->
fmt_video
.
video
,
i_chroma
,
i_
chroma
,
i_width
,
i_height
,
i_
width
,
i_height
,
i_width
,
i_height
,
i_sar_num
,
i_sar_den
);
i_sar_num
,
i_sar_den
);
vlc_ureduce
(
&
p_sys
->
fmt_video
.
video
.
i_frame_rate
,
vlc_ureduce
(
&
p_sys
->
fmt_video
.
video
.
i_frame_rate
,
...
...
modules/stream_out/transcode/osd.c
View file @
b07ed16e
...
@@ -121,7 +121,7 @@ int transcode_osd_process( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -121,7 +121,7 @@ int transcode_osd_process( sout_stream_t *p_stream, sout_stream_id_t *id,
{
{
video_format_t
fmt
;
video_format_t
fmt
;
video_format_Init
(
&
fmt
,
0
);
video_format_Init
(
&
fmt
,
0
);
video_format_Setup
(
&
fmt
,
0
,
720
,
576
,
1
,
1
);
video_format_Setup
(
&
fmt
,
0
,
720
,
576
,
720
,
576
,
1
,
1
);
p_subpic
=
spu_Render
(
p_sys
->
p_spu
,
NULL
,
&
fmt
,
&
fmt
,
in
->
i_dts
,
in
->
i_dts
,
false
);
p_subpic
=
spu_Render
(
p_sys
->
p_spu
,
NULL
,
&
fmt
,
&
fmt
,
in
->
i_dts
,
in
->
i_dts
,
false
);
}
}
else
else
...
...
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
View file @
b07ed16e
...
@@ -55,7 +55,7 @@ overlay_t *OverlayCreate( void )
...
@@ -55,7 +55,7 @@ overlay_t *OverlayCreate( void )
p_ovl
->
i_alpha
=
0xFF
;
p_ovl
->
i_alpha
=
0xFF
;
p_ovl
->
b_active
=
false
;
p_ovl
->
b_active
=
false
;
video_format_Setup
(
&
p_ovl
->
format
,
VLC_FOURCC
(
'\0'
,
'\0'
,
'\0'
,
'\0'
)
,
0
,
0
,
video_format_Setup
(
&
p_ovl
->
format
,
VLC_FOURCC
(
'\0'
,
'\0'
,
'\0'
,
'\0'
)
,
0
,
0
,
1
,
1
);
0
,
0
,
1
,
1
);
p_ovl
->
p_fontstyle
=
text_style_New
();
p_ovl
->
p_fontstyle
=
text_style_New
();
p_ovl
->
data
.
p_text
=
NULL
;
p_ovl
->
data
.
p_text
=
NULL
;
...
@@ -463,7 +463,7 @@ static int exec_DataSharedMem( filter_t *p_filter,
...
@@ -463,7 +463,7 @@ static int exec_DataSharedMem( filter_t *p_filter,
}
}
video_format_Setup
(
&
p_ovl
->
format
,
VLC_CODEC_TEXT
,
video_format_Setup
(
&
p_ovl
->
format
,
VLC_CODEC_TEXT
,
0
,
0
,
0
,
1
);
0
,
0
,
0
,
0
,
0
,
1
);
p_data
=
shmat
(
p_params
->
i_shmid
,
NULL
,
SHM_RDONLY
);
p_data
=
shmat
(
p_params
->
i_shmid
,
NULL
,
SHM_RDONLY
);
if
(
p_data
==
NULL
)
if
(
p_data
==
NULL
)
...
...
modules/video_output/decklink.cpp
View file @
b07ed16e
...
@@ -766,7 +766,8 @@ static int OpenVideo(vlc_object_t *p_this)
...
@@ -766,7 +766,8 @@ static int OpenVideo(vlc_object_t *p_this)
video_format_t
in
,
dummy
;
video_format_t
in
,
dummy
;
video_format_Init
(
&
in
,
0
);
video_format_Init
(
&
in
,
0
);
video_format_Setup
(
&
in
,
0
,
vd
->
fmt
.
i_width
,
vd
->
fmt
.
i_height
,
1
,
1
);
video_format_Setup
(
&
in
,
0
,
vd
->
fmt
.
i_width
,
vd
->
fmt
.
i_height
,
vd
->
fmt
.
i_width
,
vd
->
fmt
.
i_height
,
1
,
1
);
video_format_Init
(
&
dummy
,
0
);
video_format_Init
(
&
dummy
,
0
);
...
...
modules/visualization/glspectrum.c
View file @
b07ed16e
...
@@ -369,7 +369,7 @@ static void *Thread( void *p_data )
...
@@ -369,7 +369,7 @@ static void *Thread( void *p_data )
/* Configure the video format for the opengl provider. */
/* Configure the video format for the opengl provider. */
video_format_Init
(
&
fmt
,
0
);
video_format_Init
(
&
fmt
,
0
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGB32
,
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGB32
,
p_sys
->
i_width
,
p_sys
->
i_height
,
p_sys
->
i_width
,
p_sys
->
i_height
,
0
,
1
);
p_sys
->
i_width
,
p_sys
->
i_height
,
0
,
1
);
fmt
.
i_sar_num
=
1
;
fmt
.
i_sar_num
=
1
;
fmt
.
i_sar_den
=
1
;
fmt
.
i_sar_den
=
1
;
...
...
modules/visualization/projectm.cpp
View file @
b07ed16e
...
@@ -317,10 +317,8 @@ static void *Thread( void *p_data )
...
@@ -317,10 +317,8 @@ static void *Thread( void *p_data )
/* */
/* */
video_format_Init
(
&
fmt
,
0
);
video_format_Init
(
&
fmt
,
0
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGB32
,
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGB32
,
p_sys
->
i_width
,
p_sys
->
i_height
,
p_sys
->
i_width
,
p_sys
->
i_height
,
0
,
1
);
p_sys
->
i_width
,
p_sys
->
i_height
,
1
,
1
);
fmt
.
i_sar_num
=
1
;
fmt
.
i_sar_den
=
1
;
vout_display_state_t
state
;
vout_display_state_t
state
;
memset
(
&
state
,
0
,
sizeof
(
state
)
);
memset
(
&
state
,
0
,
sizeof
(
state
)
);
...
...
modules/visualization/vsxu.cpp
View file @
b07ed16e
...
@@ -280,7 +280,7 @@ static void *Thread( void *p_data )
...
@@ -280,7 +280,7 @@ static void *Thread( void *p_data )
goto
error
;
goto
error
;
video_format_Init
(
&
fmt
,
0
);
video_format_Init
(
&
fmt
,
0
);
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGB32
,
video_format_Setup
(
&
fmt
,
VLC_CODEC_RGB32
,
p_sys
->
i_width
,
p_sys
->
i_height
,
p_sys
->
i_width
,
p_sys
->
i_height
,
0
,
1
);
p_sys
->
i_width
,
p_sys
->
i_height
,
0
,
1
);
fmt
.
i_sar_num
=
1
;
fmt
.
i_sar_num
=
1
;
fmt
.
i_sar_den
=
1
;
fmt
.
i_sar_den
=
1
;
...
...
src/misc/es_format.c
View file @
b07ed16e
...
@@ -130,13 +130,14 @@ void video_format_FixRgb( video_format_t *p_fmt )
...
@@ -130,13 +130,14 @@ void video_format_FixRgb( video_format_t *p_fmt )
void
video_format_Setup
(
video_format_t
*
p_fmt
,
vlc_fourcc_t
i_chroma
,
void
video_format_Setup
(
video_format_t
*
p_fmt
,
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_width
,
int
i_height
,
int
i_visible_width
,
int
i_visible_height
,
int
i_sar_num
,
int
i_sar_den
)
int
i_sar_num
,
int
i_sar_den
)
{
{
p_fmt
->
i_chroma
=
vlc_fourcc_GetCodec
(
VIDEO_ES
,
i_chroma
);
p_fmt
->
i_chroma
=
vlc_fourcc_GetCodec
(
VIDEO_ES
,
i_chroma
);
p_fmt
->
i_width
=
p_fmt
->
i_width
=
i_width
;
p_fmt
->
i_visible_width
=
i_width
;
p_fmt
->
i_visible_width
=
i_
visible_
width
;
p_fmt
->
i_height
=
p_fmt
->
i_height
=
i_height
;
p_fmt
->
i_visible_height
=
i_height
;
p_fmt
->
i_visible_height
=
i_
visible_
height
;
p_fmt
->
i_x_offset
=
p_fmt
->
i_x_offset
=
p_fmt
->
i_y_offset
=
0
;
p_fmt
->
i_y_offset
=
0
;
vlc_ureduce
(
&
p_fmt
->
i_sar_num
,
&
p_fmt
->
i_sar_den
,
vlc_ureduce
(
&
p_fmt
->
i_sar_num
,
&
p_fmt
->
i_sar_den
,
...
...
src/misc/picture.c
View file @
b07ed16e
...
@@ -147,6 +147,7 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma,
...
@@ -147,6 +147,7 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma,
p_picture
->
i_nb_fields
=
2
;
p_picture
->
i_nb_fields
=
2
;
video_format_Setup
(
&
p_picture
->
format
,
i_chroma
,
i_width
,
i_height
,
video_format_Setup
(
&
p_picture
->
format
,
i_chroma
,
i_width
,
i_height
,
i_width
,
i_height
,
i_sar_num
,
i_sar_den
);
i_sar_num
,
i_sar_den
);
const
vlc_chroma_description_t
*
p_dsc
=
const
vlc_chroma_description_t
*
p_dsc
=
...
@@ -202,6 +203,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
...
@@ -202,6 +203,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
/* It is needed to be sure all information are filled */
/* It is needed to be sure all information are filled */
video_format_Setup
(
&
fmt
,
p_fmt
->
i_chroma
,
video_format_Setup
(
&
fmt
,
p_fmt
->
i_chroma
,
p_fmt
->
i_width
,
p_fmt
->
i_height
,
p_fmt
->
i_width
,
p_fmt
->
i_height
,
p_fmt
->
i_visible_width
,
p_fmt
->
i_visible_height
,
p_fmt
->
i_sar_num
,
p_fmt
->
i_sar_den
);
p_fmt
->
i_sar_num
,
p_fmt
->
i_sar_den
);
if
(
p_fmt
->
i_x_offset
<
p_fmt
->
i_width
&&
if
(
p_fmt
->
i_x_offset
<
p_fmt
->
i_width
&&
p_fmt
->
i_y_offset
<
p_fmt
->
i_height
&&
p_fmt
->
i_y_offset
<
p_fmt
->
i_height
&&
...
@@ -265,7 +267,7 @@ picture_t *picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_
...
@@ -265,7 +267,7 @@ picture_t *picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_
memset
(
&
fmt
,
0
,
sizeof
(
fmt
)
);
memset
(
&
fmt
,
0
,
sizeof
(
fmt
)
);
video_format_Setup
(
&
fmt
,
i_chroma
,
i_width
,
i_height
,
video_format_Setup
(
&
fmt
,
i_chroma
,
i_width
,
i_height
,
i_sar_num
,
i_sar_den
);
i_
width
,
i_height
,
i_
sar_num
,
i_sar_den
);
return
picture_NewFromFormat
(
&
fmt
);
return
picture_NewFromFormat
(
&
fmt
);
}
}
...
...
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