Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
cf9e7c61
Commit
cf9e7c61
authored
Jan 15, 2000
by
Jean-Marc Dressler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Le debuggage du parser avance ... lentement.
parent
e95de90d
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
129 additions
and
87 deletions
+129
-87
include/video_parser.h
include/video_parser.h
+3
-3
include/vpar_headers.h
include/vpar_headers.h
+9
-9
src/video_parser/video_parser.c
src/video_parser/video_parser.c
+6
-0
src/video_parser/vpar_blocks.c
src/video_parser/vpar_blocks.c
+92
-61
src/video_parser/vpar_headers.c
src/video_parser/vpar_headers.c
+18
-13
src/video_parser/vpar_synchro.c
src/video_parser/vpar_synchro.c
+1
-1
No files found.
include/video_parser.h
View file @
cf9e7c61
...
@@ -68,9 +68,9 @@ typedef struct vpar_thread_s
...
@@ -68,9 +68,9 @@ typedef struct vpar_thread_s
/* tables for macroblock types 0=P 1=B */
/* tables for macroblock types 0=P 1=B */
lookup_t
ppl_mb_type
[
2
][
64
];
lookup_t
ppl_mb_type
[
2
][
64
];
/* table for coded_block_pattern */
/* table for coded_block_pattern */
lookup_t
pl_coded_pattern
[
512
]
;
lookup_t
*
pl_coded_pattern
;
/* variable length codes for the structure dct_dc_size for intra blocks */
/* variable length codes for the structure dct_dc_size for intra blocks */
lookup_t
pppl_dct_dc_size
[
2
][
2
][
3
2
];
lookup_t
*
pppl_dct_dc_size
[
2
][
2
];
/* structure to store the tables B14 & B15 */
/* structure to store the tables B14 & B15 */
dct_lookup_t
*
pppl_dct_coef
[
2
][
65536
];
dct_lookup_t
*
pppl_dct_coef
[
2
][
65536
];
...
...
include/vpar_headers.h
View file @
cf9e7c61
...
@@ -116,15 +116,15 @@ typedef struct slice_parsing_s
...
@@ -116,15 +116,15 @@ typedef struct slice_parsing_s
/*****************************************************************************
/*****************************************************************************
* Standard codes
* Standard codes
*****************************************************************************/
*****************************************************************************/
#define PICTURE_START_CODE 0x100
#define PICTURE_START_CODE 0x100
L
#define SLICE_START_CODE_MIN 0x101
#define SLICE_START_CODE_MIN 0x101
L
#define SLICE_START_CODE_MAX 0x1AF
#define SLICE_START_CODE_MAX 0x1AF
L
#define USER_DATA_START_CODE 0x1B2
#define USER_DATA_START_CODE 0x1B2
L
#define SEQUENCE_HEADER_CODE 0x1B3
#define SEQUENCE_HEADER_CODE 0x1B3
L
#define SEQUENCE_ERROR_CODE 0x1B4
#define SEQUENCE_ERROR_CODE 0x1B4
L
#define EXTENSION_START_CODE 0x1B5
#define EXTENSION_START_CODE 0x1B5
L
#define SEQUENCE_END_CODE 0x1B7
#define SEQUENCE_END_CODE 0x1B7
L
#define GROUP_START_CODE 0x1B8
#define GROUP_START_CODE 0x1B8
L
/* extension start code IDs */
/* extension start code IDs */
#define SEQUENCE_EXTENSION_ID 1
#define SEQUENCE_EXTENSION_ID 1
...
...
src/video_parser/video_parser.c
View file @
cf9e7c61
...
@@ -58,6 +58,9 @@ static void EndThread ( vpar_thread_t *p_vpar );
...
@@ -58,6 +58,9 @@ static void EndThread ( vpar_thread_t *p_vpar );
* Following configuration properties are used:
* Following configuration properties are used:
* ??
* ??
*******************************************************************************/
*******************************************************************************/
#include "main.h"
#include "interface.h"
extern
main_t
*
p_main
;
vpar_thread_t
*
vpar_CreateThread
(
/* video_cfg_t *p_cfg, */
input_thread_t
*
p_input
/*,
vpar_thread_t
*
vpar_CreateThread
(
/* video_cfg_t *p_cfg, */
input_thread_t
*
p_input
/*,
vout_thread_t *p_vout, int *pi_status */
)
vout_thread_t *p_vout, int *pi_status */
)
{
{
...
@@ -93,6 +96,9 @@ vpar_thread_t * vpar_CreateThread( /* video_cfg_t *p_cfg, */ input_thread_t *p_i
...
@@ -93,6 +96,9 @@ vpar_thread_t * vpar_CreateThread( /* video_cfg_t *p_cfg, */ input_thread_t *p_i
p_vpar
->
bit_stream
.
fifo
.
buffer
=
0
;
p_vpar
->
bit_stream
.
fifo
.
buffer
=
0
;
p_vpar
->
bit_stream
.
fifo
.
i_available
=
0
;
p_vpar
->
bit_stream
.
fifo
.
i_available
=
0
;
/* FIXME !!!! */
p_vpar
->
p_vout
=
p_main
->
p_intf
->
p_vout
;
/* Spawn the video parser thread */
/* Spawn the video parser thread */
if
(
vlc_thread_create
(
&
p_vpar
->
thread_id
,
"video parser"
,
(
vlc_thread_func_t
)
RunThread
,
(
void
*
)
p_vpar
)
)
if
(
vlc_thread_create
(
&
p_vpar
->
thread_id
,
"video parser"
,
(
vlc_thread_func_t
)
RunThread
,
(
void
*
)
p_vpar
)
)
{
{
...
...
src/video_parser/vpar_blocks.c
View file @
cf9e7c61
This diff is collapsed.
Click to expand it.
src/video_parser/vpar_headers.c
View file @
cf9e7c61
...
@@ -164,11 +164,10 @@ static __inline__ void NextStartCode( vpar_thread_t * p_vpar )
...
@@ -164,11 +164,10 @@ static __inline__ void NextStartCode( vpar_thread_t * p_vpar )
/* Re-align the buffer on an 8-bit boundary */
/* Re-align the buffer on an 8-bit boundary */
RealignBits
(
&
p_vpar
->
bit_stream
);
RealignBits
(
&
p_vpar
->
bit_stream
);
while
(
ShowBits
(
&
p_vpar
->
bit_stream
,
16
)
!=
0
&&
!
p_vpar
->
b_die
)
while
(
ShowBits
(
&
p_vpar
->
bit_stream
,
24
)
!=
0x01L
&&
!
p_vpar
->
b_die
)
{
{
DumpBits
(
&
p_vpar
->
bit_stream
,
8
);
DumpBits
(
&
p_vpar
->
bit_stream
,
8
);
}
}
DumpBits
(
&
p_vpar
->
bit_stream
,
16
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -263,8 +262,9 @@ int vpar_NextSequenceHeader( vpar_thread_t * p_vpar )
...
@@ -263,8 +262,9 @@ int vpar_NextSequenceHeader( vpar_thread_t * p_vpar )
while
(
!
p_vpar
->
b_die
)
while
(
!
p_vpar
->
b_die
)
{
{
NextStartCode
(
p_vpar
);
NextStartCode
(
p_vpar
);
if
(
ShowBits
(
&
p_vpar
->
bit_stream
,
16
)
==
SEQUENCE_HEADER_CODE
)
if
(
ShowBits
(
&
p_vpar
->
bit_stream
,
32
)
==
SEQUENCE_HEADER_CODE
)
return
0
;
return
0
;
DumpBits
(
&
p_vpar
->
bit_stream
,
8
);
}
}
return
1
;
return
1
;
}
}
...
@@ -294,9 +294,7 @@ int vpar_ParseHeader( vpar_thread_t * p_vpar )
...
@@ -294,9 +294,7 @@ int vpar_ParseHeader( vpar_thread_t * p_vpar )
break
;
break
;
case
PICTURE_START_CODE
:
case
PICTURE_START_CODE
:
fprintf
(
stderr
,
"begin picture
\n
"
);
PictureHeader
(
p_vpar
);
PictureHeader
(
p_vpar
);
fprintf
(
stderr
,
"end picture
\n
"
);
return
0
;
return
0
;
break
;
break
;
...
@@ -513,8 +511,8 @@ static void GroupHeader( vpar_thread_t * p_vpar )
...
@@ -513,8 +511,8 @@ static void GroupHeader( vpar_thread_t * p_vpar )
*****************************************************************************/
*****************************************************************************/
static
void
PictureHeader
(
vpar_thread_t
*
p_vpar
)
static
void
PictureHeader
(
vpar_thread_t
*
p_vpar
)
{
{
static
f_macroblock_type_t
ppf_macroblock_type
[
4
]
=
static
f_macroblock_type_t
ppf_macroblock_type
[
5
]
=
{
NULL
,
{
vpar_IMBType
,
vpar_PMBType
,
vpar_IMBType
,
vpar_PMBType
,
vpar_BMBType
,
vpar_DMBType
};
vpar_BMBType
,
vpar_DMBType
};
int
i_structure
;
int
i_structure
;
...
@@ -544,7 +542,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -544,7 +542,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
/*
/*
* Picture Coding Extension
* Picture Coding Extension
*/
*/
fprintf
(
stderr
,
"picture1
\n
"
);
NextStartCode
(
p_vpar
);
NextStartCode
(
p_vpar
);
if
(
ShowBits
(
&
p_vpar
->
bit_stream
,
16
)
==
EXTENSION_START_CODE
)
if
(
ShowBits
(
&
p_vpar
->
bit_stream
,
16
)
==
EXTENSION_START_CODE
)
{
{
...
@@ -616,7 +614,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -616,7 +614,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
p_vpar
->
picture
.
i_current_structure
=
0
;
p_vpar
->
picture
.
i_current_structure
=
0
;
intf_DbgMsg
(
"vpar debug: odd number of field picture."
);
intf_DbgMsg
(
"vpar debug: odd number of field picture.
\n
"
);
}
}
if
(
p_vpar
->
picture
.
i_current_structure
)
if
(
p_vpar
->
picture
.
i_current_structure
)
...
@@ -657,6 +655,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -657,6 +655,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
return
;
return
;
}
}
fprintf
(
stderr
,
"begin picture
\n
"
);
/* OK, now we are sure we will decode the picture. */
/* OK, now we are sure we will decode the picture. */
#define P_picture p_vpar->picture.p_picture
#define P_picture p_vpar->picture.p_picture
...
@@ -722,7 +721,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -722,7 +721,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
DumpBits32
(
&
p_vpar
->
bit_stream
);
DumpBits32
(
&
p_vpar
->
bit_stream
);
/* Decode slice data. */
/* Decode slice data. */
SliceH
eader
(
p_vpar
,
&
i_mb_address
,
i_mb_base
,
i_dummy
&
255
);
p_vpar
->
sequence
.
pf_slice_h
eader
(
p_vpar
,
&
i_mb_address
,
i_mb_base
,
i_dummy
&
255
);
}
}
/* Link referenced pictures for the decoder
/* Link referenced pictures for the decoder
...
@@ -739,6 +738,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -739,6 +738,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
if
(
p_vpar
->
picture
.
b_error
)
if
(
p_vpar
->
picture
.
b_error
)
{
{
/* Trash picture. */
/* Trash picture. */
fprintf
(
stderr
,
"Image trashee
\n
"
);
for
(
i_mb
=
0
;
p_vpar
->
picture
.
pp_mb
[
i_mb
];
i_mb
++
)
for
(
i_mb
=
0
;
p_vpar
->
picture
.
pp_mb
[
i_mb
];
i_mb
++
)
{
{
vpar_DestroyMacroblock
(
&
p_vpar
->
vfifo
,
p_vpar
->
picture
.
pp_mb
[
i_mb
]
);
vpar_DestroyMacroblock
(
&
p_vpar
->
vfifo
,
p_vpar
->
picture
.
pp_mb
[
i_mb
]
);
...
@@ -759,9 +759,12 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -759,9 +759,12 @@ static void PictureHeader( vpar_thread_t * p_vpar )
/* Prepare context for the next picture. */
/* Prepare context for the next picture. */
P_picture
=
NULL
;
P_picture
=
NULL
;
if
(
p_vpar
->
picture
.
i_current_structure
==
FRAME_STRUCTURE
)
p_vpar
->
picture
.
i_current_structure
=
0
;
}
}
else
if
(
p_vpar
->
picture
.
i_current_structure
==
FRAME_STRUCTURE
)
else
if
(
p_vpar
->
picture
.
i_current_structure
==
FRAME_STRUCTURE
)
{
{
fprintf
(
stderr
,
"Image decodee
\n
"
);
/* Frame completely parsed. */
/* Frame completely parsed. */
P_picture
->
i_deccount
=
p_vpar
->
sequence
.
i_mb_size
;
P_picture
->
i_deccount
=
p_vpar
->
sequence
.
i_mb_size
;
for
(
i_mb
=
0
;
i_mb
<
p_vpar
->
sequence
.
i_mb_size
;
i_mb
++
)
for
(
i_mb
=
0
;
i_mb
<
p_vpar
->
sequence
.
i_mb_size
;
i_mb
++
)
...
@@ -771,6 +774,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -771,6 +774,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
/* Prepare context for the next picture. */
/* Prepare context for the next picture. */
P_picture
=
NULL
;
P_picture
=
NULL
;
p_vpar
->
picture
.
i_current_structure
=
0
;
}
}
#undef P_picture
#undef P_picture
}
}
...
@@ -818,7 +822,8 @@ static __inline__ void SliceHeader( vpar_thread_t * p_vpar,
...
@@ -818,7 +822,8 @@ static __inline__ void SliceHeader( vpar_thread_t * p_vpar,
i_mb_base
);
i_mb_base
);
i_mb_address_save
=
*
pi_mb_address
;
i_mb_address_save
=
*
pi_mb_address
;
}
}
while
(
!
ShowBits
(
&
p_vpar
->
bit_stream
,
23
)
);
while
(
ShowBits
(
&
p_vpar
->
bit_stream
,
23
)
);
NextStartCode
(
p_vpar
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
src/video_parser/vpar_synchro.c
View file @
cf9e7c61
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
boolean_t
vpar_SynchroChoose
(
vpar_thread_t
*
p_vpar
,
int
i_coding_type
,
boolean_t
vpar_SynchroChoose
(
vpar_thread_t
*
p_vpar
,
int
i_coding_type
,
int
i_structure
)
int
i_structure
)
{
{
return
(
i_coding_type
==
I_CODING_TYPE
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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