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
db2ec1d1
Commit
db2ec1d1
authored
Oct 03, 2009
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to flag blocks as interlaced and use in rawvideo and v4l2.
parent
beb5d0fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
6 deletions
+30
-6
include/vlc_block.h
include/vlc_block.h
+8
-0
modules/access/v4l2.c
modules/access/v4l2.c
+11
-5
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+11
-1
No files found.
include/vlc_block.h
View file @
db2ec1d1
...
...
@@ -78,6 +78,14 @@ typedef struct block_sys_t block_sys_t;
#define BLOCK_FLAG_PREROLL 0x0800
/** This block is corrupted and/or there is data loss */
#define BLOCK_FLAG_CORRUPTED 0x1000
/** This block contains an interlaced picture with top field first */
#define BLOCK_FLAG_TOP_FIELD_FIRST 0x2000
/** This block contains an interlaced picture with bottom field first */
#define BLOCK_FLAG_BOTTOM_FIELD_FIRST 0x4000
/** This block contains an interlaced picture */
#define BLOCK_FLAG_INTERLACED_MASK \
(BLOCK_FLAG_TOP_FIELD_FIRST|BLOCK_FLAG_BOTTOM_FIELD_FIRST)
#define BLOCK_FLAG_TYPE_MASK \
(BLOCK_FLAG_TYPE_I|BLOCK_FLAG_TYPE_P|BLOCK_FLAG_TYPE_B|BLOCK_FLAG_TYPE_PB)
...
...
modules/access/v4l2.c
View file @
db2ec1d1
...
...
@@ -553,6 +553,7 @@ struct demux_sys_t
float
f_fps
;
/* <= 0.0 mean to grab at full rate */
mtime_t
i_video_pts
;
/* only used when f_fps > 0 */
int
i_fourcc
;
uint32_t
i_block_flags
;
es_out_id_t
*
p_es
;
...
...
@@ -1456,6 +1457,7 @@ static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys )
/* Timestamp */
p_sys
->
i_video_pts
=
p_block
->
i_pts
=
p_block
->
i_dts
=
mdate
();
p_block
->
i_flags
|=
p_sys
->
i_block_flags
;
return
p_block
;
}
...
...
@@ -2146,29 +2148,33 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
break
;
case
V4L2_FIELD_INTERLACED
:
msg_Dbg
(
p_obj
,
"Interlacing setting: interleaved (bottom top if M/NTSC, top bottom otherwise)"
);
if
(
p_sys
->
i_selected_standard_id
==
V4L2_STD_NTSC
)
p_sys
->
i_block_flags
=
BLOCK_FLAG_BOTTOM_FIELD_FIRST
;
else
p_sys
->
i_block_flags
=
BLOCK_FLAG_TOP_FIELD_FIRST
;
break
;
case
V4L2_FIELD_SEQ_TB
:
msg_Dbg
(
p_obj
,
"Interlacing setting: sequential top bottom"
);
msg_Dbg
(
p_obj
,
"Interlacing setting: sequential top bottom
(TODO)
"
);
break
;
case
V4L2_FIELD_SEQ_BT
:
msg_Dbg
(
p_obj
,
"Interlacing setting: sequential bottom top"
);
msg_Dbg
(
p_obj
,
"Interlacing setting: sequential bottom top
(TODO)
"
);
break
;
case
V4L2_FIELD_ALTERNATE
:
msg_Dbg
(
p_obj
,
"Interlacing setting: alternate fields"
);
msg_Dbg
(
p_obj
,
"Interlacing setting: alternate fields
(TODO)
"
);
break
;
case
V4L2_FIELD_INTERLACED_TB
:
msg_Dbg
(
p_obj
,
"Interlacing setting: interleaved top bottom"
);
p_sys
->
i_block_flags
=
BLOCK_FLAG_TOP_FIELD_FIRST
;
break
;
case
V4L2_FIELD_INTERLACED_BT
:
msg_Dbg
(
p_obj
,
"Interlacing setting: interleaved bottom top"
);
p_sys
->
i_block_flags
=
BLOCK_FLAG_BOTTOM_FIELD_FIRST
;
break
;
default:
msg_Warn
(
p_obj
,
"Interlacing setting: unknown type (%d)"
,
fmt
.
fmt
.
pix
.
field
);
break
;
}
if
(
fmt
.
fmt
.
pix
.
field
!=
V4L2_FIELD_NONE
)
msg_Warn
(
p_obj
,
"Interlaced inputs haven't been tested. Please report any issue."
);
/* Look up final fourcc */
p_sys
->
i_fourcc
=
0
;
...
...
modules/codec/rawvideo.c
View file @
db2ec1d1
...
...
@@ -298,7 +298,17 @@ static picture_t *DecodeFrame( decoder_t *p_dec, block_t *p_block )
FillPicture
(
p_dec
,
p_block
,
p_pic
);
p_pic
->
date
=
date_Get
(
&
p_sys
->
pts
);
p_pic
->
b_progressive
=
true
;
if
(
p_block
->
i_flags
&
BLOCK_FLAG_INTERLACED_MASK
)
{
p_pic
->
b_progressive
=
false
;
p_pic
->
i_nb_fields
=
2
;
if
(
p_block
->
i_flags
&
BLOCK_FLAG_TOP_FIELD_FIRST
)
p_pic
->
b_top_field_first
=
true
;
else
p_pic
->
b_top_field_first
=
false
;
}
else
p_pic
->
b_progressive
=
true
;
block_Release
(
p_block
);
return
p_pic
;
...
...
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