Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
8431be31
Commit
8431be31
authored
Apr 12, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_block: add BLOCK_FLAG_SINGLE_FIELD
parent
23fad61d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
10 deletions
+27
-10
include/vlc_block.h
include/vlc_block.h
+5
-3
modules/access/v4l2/demux.c
modules/access/v4l2/demux.c
+2
-0
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+1
-1
modules/codec/videotoolbox.m
modules/codec/videotoolbox.m
+1
-2
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+5
-1
modules/packetizer/h264.c
modules/packetizer/h264.c
+1
-0
modules/packetizer/mpegvideo.c
modules/packetizer/mpegvideo.c
+12
-3
No files found.
include/vlc_block.h
View file @
8431be31
...
...
@@ -85,14 +85,16 @@
#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 */
/** This block contains an interlaced picture with top field
stored
first */
#define BLOCK_FLAG_TOP_FIELD_FIRST 0x2000
/** This block contains an interlaced picture with bottom field first */
/** This block contains an interlaced picture with bottom field
stored
first */
#define BLOCK_FLAG_BOTTOM_FIELD_FIRST 0x4000
/** This block contains a single field from interlaced picture. */
#define BLOCK_FLAG_SINGLE_FIELD 0x8000
/** This block contains an interlaced picture */
#define BLOCK_FLAG_INTERLACED_MASK \
(BLOCK_FLAG_TOP_FIELD_FIRST|BLOCK_FLAG_BOTTOM_FIELD_FIRST)
(BLOCK_FLAG_TOP_FIELD_FIRST|BLOCK_FLAG_BOTTOM_FIELD_FIRST
|BLOCK_FLAG_SINGLE_FIELD
)
#define BLOCK_FLAG_TYPE_MASK \
(BLOCK_FLAG_TYPE_I|BLOCK_FLAG_TYPE_P|BLOCK_FLAG_TYPE_B|BLOCK_FLAG_TYPE_PB)
...
...
modules/access/v4l2/demux.c
View file @
8431be31
...
...
@@ -351,9 +351,11 @@ static int InitVideo (demux_t *demux, int fd, uint32_t caps)
break
;
case
V4L2_FIELD_TOP
:
msg_Dbg
(
demux
,
"Interlacing setting: top field only"
);
sys
->
block_flags
=
BLOCK_FLAG_TOP_FIELD_FIRST
|
BLOCK_FLAG_SINGLE_FIELD
;
break
;
case
V4L2_FIELD_BOTTOM
:
msg_Dbg
(
demux
,
"Interlacing setting: bottom field only"
);
sys
->
block_flags
=
BLOCK_FLAG_BOTTOM_FIELD_FIRST
|
BLOCK_FLAG_SINGLE_FIELD
;
break
;
case
V4L2_FIELD_INTERLACED
:
msg_Dbg
(
demux
,
"Interlacing setting: interleaved"
);
...
...
modules/codec/rawvideo.c
View file @
8431be31
...
...
@@ -249,7 +249,7 @@ static int DecodeFrame( decoder_t *p_dec, block_t *p_block )
if
(
p_block
->
i_flags
&
BLOCK_FLAG_INTERLACED_MASK
)
{
p_pic
->
b_progressive
=
false
;
p_pic
->
i_nb_fields
=
2
;
p_pic
->
i_nb_fields
=
(
p_block
->
i_flags
&
BLOCK_FLAG_SINGLE_FIELD
)
?
1
:
2
;
if
(
p_block
->
i_flags
&
BLOCK_FLAG_TOP_FIELD_FIRST
)
p_pic
->
b_top_field_first
=
true
;
else
...
...
modules/codec/videotoolbox.m
View file @
8431be31
...
...
@@ -1310,8 +1310,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
int
i_ret
=
avcCFromAnnexBCreate
(
p_dec
);
if
(
i_ret
==
VLC_SUCCESS
)
{
if
((
p_block
->
i_flags
&
BLOCK_FLAG_TOP_FIELD_FIRST
||
p_block
->
i_flags
&
BLOCK_FLAG_BOTTOM_FIELD_FIRST
)
if
((
p_block
->
i_flags
&
BLOCK_FLAG_INTERLACED_MASK
)
&&
var_InheritBool
(
p_dec
,
"videotoolbox-temporal-deinterlacing"
))
p_sys
->
b_enable_temporal_processing
=
true
;
...
...
modules/demux/mp4/libmp4.c
View file @
8431be31
...
...
@@ -2219,7 +2219,11 @@ static int MP4_ReadBox_fiel( stream_t *p_stream, MP4_Box_t *p_box )
p_fiel
=
p_box
->
data
.
p_fiel
;
if
(
i_read
<
2
)
MP4_READBOX_EXIT
(
0
);
if
(
p_peek
[
0
]
==
2
)
/* Interlaced */
if
(
p_peek
[
0
]
==
1
)
{
p_fiel
->
i_flags
=
BLOCK_FLAG_SINGLE_FIELD
;
}
else
if
(
p_peek
[
0
]
==
2
)
/* Interlaced */
{
/*
* 0 – There is only one field.
...
...
modules/packetizer/h264.c
View file @
8431be31
...
...
@@ -803,6 +803,7 @@ static block_t *OutputPicture( decoder_t *p_dec )
/* Top and Bottom field slices */
case
1
:
case
2
:
p_pic
->
i_flags
|=
BLOCK_FLAG_SINGLE_FIELD
;
p_pic
->
i_flags
|=
(
!
p_sys
->
slice
.
i_bottom_field_flag
)
?
BLOCK_FLAG_TOP_FIELD_FIRST
:
BLOCK_FLAG_BOTTOM_FIELD_FIRST
;
break
;
...
...
modules/packetizer/mpegvideo.c
View file @
8431be31
...
...
@@ -465,10 +465,19 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
break
;
}
if
(
p_sys
->
i_picture_structure
==
0x03
&&
!
p_sys
->
b_seq_progressive
)
if
(
!
p_sys
->
b_seq_progressive
)
{
p_pic
->
i_flags
|=
(
p_sys
->
i_top_field_first
)
?
BLOCK_FLAG_TOP_FIELD_FIRST
:
BLOCK_FLAG_BOTTOM_FIELD_FIRST
;
if
(
p_sys
->
i_picture_structure
<
0x03
)
{
p_pic
->
i_flags
|=
BLOCK_FLAG_SINGLE_FIELD
;
p_pic
->
i_flags
|=
(
p_sys
->
i_picture_structure
==
0x01
)
?
BLOCK_FLAG_TOP_FIELD_FIRST
:
BLOCK_FLAG_BOTTOM_FIELD_FIRST
;
}
else
/* if( p_sys->i_picture_structure == 0x03 ) */
{
p_pic
->
i_flags
|=
(
p_sys
->
i_top_field_first
)
?
BLOCK_FLAG_TOP_FIELD_FIRST
:
BLOCK_FLAG_BOTTOM_FIELD_FIRST
;
}
}
/* Special case for DVR-MS where we need to fully build pts from scratch
...
...
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