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
563c5e17
Commit
563c5e17
authored
Oct 11, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Minor video parser optimization ;
* SDL now displays an error message on 422 streams.
parent
3861944d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
42 deletions
+24
-42
include/vdec_ext-plugins.h
include/vdec_ext-plugins.h
+2
-2
plugins/sdl/vout_sdl.c
plugins/sdl/vout_sdl.c
+6
-1
src/video_decoder/video_decoder.c
src/video_decoder/video_decoder.c
+2
-2
src/video_decoder/vpar_blocks.c
src/video_decoder/vpar_blocks.c
+14
-37
No files found.
include/vdec_ext-plugins.h
View file @
563c5e17
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vdec_ext-plugins.h : structures from the video decoder exported to plug-ins
* vdec_ext-plugins.h : structures from the video decoder exported to plug-ins
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vdec_ext-plugins.h,v 1.
6 2001/10/11 13:19:27
massiot Exp $
* $Id: vdec_ext-plugins.h,v 1.
7 2001/10/11 16:12:43
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -52,7 +52,7 @@ typedef struct macroblock_s
...
@@ -52,7 +52,7 @@ typedef struct macroblock_s
/* IDCT information */
/* IDCT information */
idct_inner_t
p_idcts
[
12
];
idct_inner_t
p_idcts
[
12
];
int
i_coded_block_pattern
;
u16
i_coded_block_pattern
;
/* which blocks are coded ? */
/* which blocks are coded ? */
yuv_data_t
*
p_y_data
;
yuv_data_t
*
p_y_data
;
yuv_data_t
*
p_u_data
;
yuv_data_t
*
p_u_data
;
...
...
plugins/sdl/vout_sdl.c
View file @
563c5e17
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
* vout_sdl.c: SDL video output display method
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_sdl.c,v 1.6
3 2001/09/26 12:32:25
massiot Exp $
* $Id: vout_sdl.c,v 1.6
4 2001/10/11 16:12:43
massiot Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
* Pierre Baillet <oct@zoy.org>
...
@@ -559,6 +559,11 @@ static void vout_Display( vout_thread_t *p_vout )
...
@@ -559,6 +559,11 @@ static void vout_Display( vout_thread_t *p_vout )
* render
* render
*/
*/
/* TODO: support for streams other than 4:2:0 */
/* TODO: support for streams other than 4:2:0 */
if
(
p_vout
->
p_rendered_pic
->
i_type
!=
YUV_420_PICTURE
)
{
intf_ErrMsg
(
"sdl vout error: no support for that kind of pictures"
);
return
;
}
/* create the overlay if necessary */
/* create the overlay if necessary */
if
(
p_vout
->
p_sys
->
p_overlay
==
NULL
)
if
(
p_vout
->
p_sys
->
p_overlay
==
NULL
)
{
{
...
...
src/video_decoder/video_decoder.c
View file @
563c5e17
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* video_decoder.c : video decoder thread
* video_decoder.c : video decoder thread
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_decoder.c,v 1.
59 2001/10/11 13:19:27
massiot Exp $
* $Id: video_decoder.c,v 1.
60 2001/10/11 16:12:43
massiot Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@zoy.org>
* Michel Lespinasse <walken@zoy.org>
...
@@ -249,7 +249,7 @@ static __inline__ void MotionBlock( vdec_pool_t * p_pool,
...
@@ -249,7 +249,7 @@ static __inline__ void MotionBlock( vdec_pool_t * p_pool,
p_vdec->p_idct_data, p_idct->i_sparse_pos );
p_vdec->p_idct_data, p_idct->i_sparse_pos );
#define DECODE_NONINTRA_BLOCK( i_b, p_dest, I_CHROMA ) \
#define DECODE_NONINTRA_BLOCK( i_b, p_dest, I_CHROMA ) \
if( p_mb->i_coded_block_pattern & (1 << (
3 + p_vpar->sequence.i_chroma_nb_blocks - i_b)) )
\
if( p_mb->i_coded_block_pattern & (1 << (
11 - (i_b))) )
\
{ \
{ \
DECODE_INTRA_BLOCK( i_b, p_dest, I_CHROMA ); \
DECODE_INTRA_BLOCK( i_b, p_dest, I_CHROMA ); \
}
}
...
...
src/video_decoder/vpar_blocks.c
View file @
563c5e17
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vpar_blocks.c : blocks parsing
* vpar_blocks.c : blocks parsing
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_blocks.c,v 1.1
3 2001/10/11 13:19:27
massiot Exp $
* $Id: vpar_blocks.c,v 1.1
4 2001/10/11 16:12:43
massiot Exp $
*
*
* Authors: Michel Lespinasse <walken@zoy.org>
* Authors: Michel Lespinasse <walken@zoy.org>
* Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
* Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
...
@@ -1000,7 +1000,7 @@ DECLARE_INTRAMB( MPEG2IntraB15MB, MPEG2IntraB15 );
...
@@ -1000,7 +1000,7 @@ DECLARE_INTRAMB( MPEG2IntraB15MB, MPEG2IntraB15 );
#undef DECODE_CHROMABLOCK
#undef DECODE_CHROMABLOCK
#define DECODE_LUMABLOCK( I_B, PF_MBFUNC ) \
#define DECODE_LUMABLOCK( I_B, PF_MBFUNC ) \
if( p_mb->i_coded_block_pattern & (1 << (
3 + p_vpar->sequence.i_chroma_nb_blocks - (I_B))) )
\
if( p_mb->i_coded_block_pattern & (1 << (
11 - (I_B))) )
\
{ \
{ \
p_idct = &p_mb->p_idcts[I_B]; \
p_idct = &p_mb->p_idcts[I_B]; \
memset( p_idct->pi_block, 0, 64*sizeof(dctelem_t) ); \
memset( p_idct->pi_block, 0, 64*sizeof(dctelem_t) ); \
...
@@ -1009,7 +1009,7 @@ DECLARE_INTRAMB( MPEG2IntraB15MB, MPEG2IntraB15 );
...
@@ -1009,7 +1009,7 @@ DECLARE_INTRAMB( MPEG2IntraB15MB, MPEG2IntraB15 );
}
}
#define DECODE_CHROMABLOCK( I_B, PF_MBFUNC ) \
#define DECODE_CHROMABLOCK( I_B, PF_MBFUNC ) \
if( p_mb->i_coded_block_pattern & (1 << (
3 + p_vpar->sequence.i_chroma_nb_blocks - (I_B))) )
\
if( p_mb->i_coded_block_pattern & (1 << (
11 - (I_B))) )
\
{ \
{ \
p_idct = &p_mb->p_idcts[I_B]; \
p_idct = &p_mb->p_idcts[I_B]; \
memset( p_idct->pi_block, 0, 64*sizeof(dctelem_t) ); \
memset( p_idct->pi_block, 0, 64*sizeof(dctelem_t) ); \
...
@@ -1589,46 +1589,23 @@ static __inline__ int CodedPattern( vpar_thread_t * p_vpar )
...
@@ -1589,46 +1589,23 @@ static __inline__ int CodedPattern( vpar_thread_t * p_vpar )
{
{
p_tab
=
CBP_7
-
16
+
i_code
;
p_tab
=
CBP_7
-
16
+
i_code
;
RemoveBits
(
&
p_vpar
->
bit_stream
,
p_tab
->
i_length
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
p_tab
->
i_length
);
if
(
p_vpar
->
sequence
.
i_chroma_format
!=
CHROMA_420
)
{
int
i_value
=
p_tab
->
i_value
;
if
(
p_vpar
->
sequence
.
i_chroma_format
!=
CHROMA_444
)
{
i_value
<<=
2
;
i_value
|=
GetBits
(
&
p_vpar
->
bit_stream
,
2
);
}
else
{
i_value
<<=
6
;
i_value
|=
GetBits
(
&
p_vpar
->
bit_stream
,
6
);
}
return
(
i_value
);
}
return
(
p_tab
->
i_value
);
}
}
else
else
{
{
p_tab
=
CBP_9
+
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
p_tab
=
CBP_9
+
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
p_tab
->
i_length
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
p_tab
->
i_length
);
if
(
p_vpar
->
sequence
.
i_chroma_format
!=
CHROMA_420
)
{
int
i_value
=
p_tab
->
i_value
;
if
(
p_vpar
->
sequence
.
i_chroma_format
!=
CHROMA_444
)
{
i_value
<<=
2
;
i_value
|=
GetBits
(
&
p_vpar
->
bit_stream
,
2
);
}
else
{
i_value
<<=
6
;
i_value
|=
GetBits
(
&
p_vpar
->
bit_stream
,
6
);
}
return
(
i_value
);
}
return
(
p_tab
->
i_value
);
}
}
if
(
p_vpar
->
sequence
.
i_chroma_format
==
CHROMA_420
)
{
return
(
p_tab
->
i_value
<<
6
);
}
if
(
p_vpar
->
sequence
.
i_chroma_format
==
CHROMA_422
)
{
return
(
(
p_tab
->
i_value
<<
6
)
|
(
GetBits
(
&
p_vpar
->
bit_stream
,
2
)
<<
4
)
);
}
return
(
(
p_tab
->
i_value
<<
6
)
|
GetBits
(
&
p_vpar
->
bit_stream
,
6
)
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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