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
e09eeeb6
Commit
e09eeeb6
authored
Feb 04, 2003
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/mpeg_video/*: Support for Slice-I (aka intra slice refresh)
streams.
parent
bf448d31
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
modules/codec/mpeg_video/headers.c
modules/codec/mpeg_video/headers.c
+38
-2
modules/codec/mpeg_video/parser.h
modules/codec/mpeg_video/parser.h
+3
-1
No files found.
modules/codec/mpeg_video/headers.c
View file @
e09eeeb6
...
...
@@ -2,7 +2,7 @@
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: headers.c,v 1.
9 2003/01/30 02:16:09 gbazin
Exp $
* $Id: headers.c,v 1.
10 2003/02/04 11:51:21 massiot
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -57,6 +57,7 @@ static void CopyrightExtension( vpar_thread_t * p_vpar );
* Standard variables
*/
/*****************************************************************************
* pi_default_intra_quant : default quantization matrix
*****************************************************************************/
...
...
@@ -311,6 +312,7 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
int
i_aspect
;
p_vpar
->
sequence
.
b_after_sequence_header
=
1
;
p_vpar
->
sequence
.
i_width
=
GetBits
(
&
p_vpar
->
bit_stream
,
12
);
p_vpar
->
sequence
.
i_height
=
GetBits
(
&
p_vpar
->
bit_stream
,
12
);
i_aspect
=
GetBits
(
&
p_vpar
->
bit_stream
,
4
);
...
...
@@ -618,8 +620,43 @@ static void PictureHeader( vpar_thread_t * p_vpar )
/* Extension and User data. */
ExtensionAndUserData
(
p_vpar
);
#define P_picture p_vpar->picture.p_picture
p_vpar
->
pc_pictures
[
p_vpar
->
picture
.
i_coding_type
]
++
;
if
(
p_vpar
->
picture
.
i_coding_type
!=
I_CODING_TYPE
&&
p_vpar
->
sequence
.
b_after_sequence_header
&&
p_vpar
->
sequence
.
p_backward
==
NULL
)
{
/* Intra-slice refresh. */
while
(
(
P_picture
=
vout_CreatePicture
(
p_vpar
->
p_vout
,
1
,
0
,
0
)
)
==
NULL
)
{
if
(
p_vpar
->
p_fifo
->
b_die
||
p_vpar
->
p_fifo
->
b_error
)
{
return
;
}
msleep
(
VOUT_OUTMEM_SLEEP
);
}
P_picture
->
i_matrix_coefficients
=
p_vpar
->
sequence
.
i_matrix_coefficients
;
memset
(
P_picture
->
p
[
0
].
p_pixels
,
0
,
p_vpar
->
sequence
.
i_height
*
p_vpar
->
sequence
.
i_width
);
memset
(
P_picture
->
p
[
1
].
p_pixels
,
0x80
,
p_vpar
->
sequence
.
i_height
*
p_vpar
->
sequence
.
i_width
>>
(
p_vpar
->
sequence
.
b_chroma_h_subsampled
+
p_vpar
->
sequence
.
b_chroma_v_subsampled
)
);
memset
(
P_picture
->
p
[
2
].
p_pixels
,
0x80
,
p_vpar
->
sequence
.
i_height
*
p_vpar
->
sequence
.
i_width
>>
(
p_vpar
->
sequence
.
b_chroma_h_subsampled
+
p_vpar
->
sequence
.
b_chroma_v_subsampled
)
);
/* Update the reference pointers. */
ReferenceUpdate
(
p_vpar
,
I_CODING_TYPE
,
P_picture
);
}
p_vpar
->
sequence
.
b_after_sequence_header
=
0
;
if
(
p_vpar
->
picture
.
i_current_structure
)
{
if
(
(
i_structure
==
FRAME_STRUCTURE
||
...
...
@@ -766,7 +803,6 @@ static void PictureHeader( vpar_thread_t * p_vpar )
/* OK, now we are sure we will decode the picture. */
p_vpar
->
pc_decoded_pictures
[
p_vpar
->
picture
.
i_coding_type
]
++
;
#define P_picture p_vpar->picture.p_picture
p_vpar
->
picture
.
b_error
=
0
;
if
(
!
p_vpar
->
picture
.
i_current_structure
)
...
...
modules/codec/mpeg_video/parser.h
View file @
e09eeeb6
...
...
@@ -2,7 +2,7 @@
* parser.h : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: parser.h,v 1.
2 2002/08/07 00:29:36 sam
Exp $
* $Id: parser.h,v 1.
3 2003/02/04 11:51:21 massiot
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
...
...
@@ -133,6 +133,8 @@ typedef struct sequence_s
int
i_current_rate
;
vlc_bool_t
b_expect_discontinuity
;
/* reset the frame predictors
* after the current frame */
vlc_bool_t
b_after_sequence_header
;
/* is it the next frame after
* the sequence header ? */
/* Copyright extension */
vlc_bool_t
b_copyright_flag
;
/* Whether the following
...
...
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