Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
eeddf916
Commit
eeddf916
authored
Jan 28, 2000
by
Stéphane Borel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
. D�placement de deux structures de lookup dans le parseur
parent
84cf8734
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
46 deletions
+35
-46
include/video_parser.h
include/video_parser.h
+5
-1
src/video_parser/video_parser.c
src/video_parser/video_parser.c
+0
-1
src/video_parser/vpar_blocks.c
src/video_parser/vpar_blocks.c
+30
-44
No files found.
include/video_parser.h
View file @
eeddf916
...
@@ -112,6 +112,10 @@ typedef struct vpar_thread_s
...
@@ -112,6 +112,10 @@ typedef struct vpar_thread_s
lookup_t
*
pl_coded_pattern
;
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
];
lookup_t
*
pppl_dct_dc_size
[
2
][
2
];
/* Structure to store the tables B14 & B15 (ISO/CEI 13818-2 B.4) */
dct_lookup_t
ppl_dct_coef
[
2
][
16384
];
#ifdef STATS
#ifdef STATS
/* Statistics */
/* Statistics */
...
...
src/video_parser/video_parser.c
View file @
eeddf916
...
@@ -239,7 +239,6 @@ static int InitThread( vpar_thread_t *p_vpar )
...
@@ -239,7 +239,6 @@ static int InitThread( vpar_thread_t *p_vpar )
vpar_InitDCTTables
(
p_vpar
);
vpar_InitDCTTables
(
p_vpar
);
vpar_InitPMBType
(
p_vpar
);
vpar_InitPMBType
(
p_vpar
);
vpar_InitBMBType
(
p_vpar
);
vpar_InitBMBType
(
p_vpar
);
vpar_InitCodedPattern
(
p_vpar
);
vpar_InitDCTTables
(
p_vpar
);
vpar_InitDCTTables
(
p_vpar
);
...
...
src/video_parser/vpar_blocks.c
View file @
eeddf916
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
*/
*/
/* Table for coded_block_pattern resolution */
/* Table for coded_block_pattern resolution */
static
lookup_t
pl_coded_pattern
_init_table
[
512
]
=
static
lookup_t
pl_coded_pattern
[
512
]
=
{
{
MB_ERROR
,
0
},
{
0
,
9
},
{
39
,
9
},
{
27
,
9
},
{
59
,
9
},
{
55
,
9
},
{
47
,
9
},
{
31
,
9
},
{
{
MB_ERROR
,
0
},
{
0
,
9
},
{
39
,
9
},
{
27
,
9
},
{
59
,
9
},
{
55
,
9
},
{
47
,
9
},
{
31
,
9
},
{
58
,
8
},
{
58
,
8
},
{
54
,
8
},
{
54
,
8
},
{
46
,
8
},
{
46
,
8
},
{
30
,
8
},
{
30
,
8
},
{
58
,
8
},
{
58
,
8
},
{
54
,
8
},
{
54
,
8
},
{
46
,
8
},
{
46
,
8
},
{
30
,
8
},
{
30
,
8
},
{
57
,
8
},
{
57
,
8
},
{
53
,
8
},
{
53
,
8
},
{
45
,
8
},
{
45
,
8
},
{
29
,
8
},
{
29
,
8
},
{
57
,
8
},
{
57
,
8
},
{
53
,
8
},
{
53
,
8
},
{
45
,
8
},
{
45
,
8
},
{
29
,
8
},
{
29
,
8
},
...
@@ -158,12 +158,6 @@ static lookup_t pl_dct_dc_chrom_init_table_2[32] =
...
@@ -158,12 +158,6 @@ static lookup_t pl_dct_dc_chrom_init_table_2[32] =
{
8
,
8
},
{
8
,
8
},
{
8
,
8
},
{
8
,
8
},
{
9
,
9
},
{
9
,
9
},
{
10
,
10
},
{
11
,
10
}
{
8
,
8
},
{
8
,
8
},
{
8
,
8
},
{
8
,
8
},
{
9
,
9
},
{
9
,
9
},
{
10
,
10
},
{
11
,
10
}
};
};
/*
* Structure to store the tables B14 & B15
* Is constructed from the tables below
*/
dct_lookup_t
ppl_dct_coef
[
2
][
16384
];
/* Tables for ac DCT coefficients. There are cut in many parts to save space */
/* Tables for ac DCT coefficients. There are cut in many parts to save space */
/* Table B-14, DCT coefficients table zero,
/* Table B-14, DCT coefficients table zero,
...
@@ -505,14 +499,6 @@ void vpar_InitBMBType( vpar_thread_t * p_vpar )
...
@@ -505,14 +499,6 @@ void vpar_InitBMBType( vpar_thread_t * p_vpar )
p_vpar
->
ppl_mb_type
[
1
][
0
].
i_length
=
0
;
p_vpar
->
ppl_mb_type
[
1
][
0
].
i_length
=
0
;
}
}
/*****************************************************************************
* vpar_InitCodedPattern : Initialize the lookup table for decoding
* coded block pattern
*****************************************************************************/
void
vpar_InitCodedPattern
(
vpar_thread_t
*
p_vpar
)
{
p_vpar
->
pl_coded_pattern
=
(
lookup_t
*
)
pl_coded_pattern_init_table
;
}
/*****************************************************************************
/*****************************************************************************
* vpar_InitDCTTables : Initialize tables giving the length of the dct
* vpar_InitDCTTables : Initialize tables giving the length of the dct
...
@@ -544,26 +530,26 @@ void vpar_InitDCTTables( vpar_thread_t * p_vpar )
...
@@ -544,26 +530,26 @@ void vpar_InitDCTTables( vpar_thread_t * p_vpar )
p_vpar
->
pppl_dct_dc_size
[
1
][
0
]
=
pl_dct_dc_chrom_init_table_1
;
p_vpar
->
pppl_dct_dc_size
[
1
][
0
]
=
pl_dct_dc_chrom_init_table_1
;
p_vpar
->
pppl_dct_dc_size
[
1
][
1
]
=
pl_dct_dc_chrom_init_table_2
;
p_vpar
->
pppl_dct_dc_size
[
1
][
1
]
=
pl_dct_dc_chrom_init_table_2
;
memset
(
ppl_dct_coef
[
0
],
MB_ERROR
,
16
);
memset
(
p
_vpar
->
p
pl_dct_coef
[
0
],
MB_ERROR
,
16
);
memset
(
ppl_dct_coef
[
1
],
MB_ERROR
,
16
);
memset
(
p
_vpar
->
p
pl_dct_coef
[
1
],
MB_ERROR
,
16
);
/* For table B14 & B15, we have a pointer to tables */
/* For table B14 & B15, we have a pointer to tables */
/* We fill the table thanks to the fonction defined above */
/* We fill the table thanks to the fonction defined above */
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab0
,
256
,
60
,
4
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab0
,
256
,
60
,
4
);
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab1
,
64
,
8
,
8
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab1
,
64
,
8
,
8
);
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab2
,
16
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab2
,
16
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab3
,
8
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab3
,
8
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab4
,
4
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab4
,
4
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab5
,
2
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab5
,
2
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
0
],
pl_DCT_tab6
,
1
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
0
],
pl_DCT_tab6
,
1
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab0a
,
256
,
60
,
4
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab0a
,
256
,
60
,
4
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab1a
,
64
,
8
,
8
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab1a
,
64
,
8
,
8
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab2
,
16
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab2
,
16
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab3
,
8
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab3
,
8
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab4
,
4
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab4
,
4
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab5
,
2
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab5
,
2
,
16
,
16
);
FillDCTTable
(
ppl_dct_coef
[
1
],
pl_DCT_tab6
,
1
,
16
,
16
);
FillDCTTable
(
p
_vpar
->
p
pl_dct_coef
[
1
],
pl_DCT_tab6
,
1
,
16
,
16
);
}
}
...
@@ -671,9 +657,9 @@ static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
...
@@ -671,9 +657,9 @@ static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
}
}
else
else
{
{
i_run
=
ppl_dct_coef
[
0
][
i_code
].
i_run
;
i_run
=
p
_vpar
->
p
pl_dct_coef
[
0
][
i_code
].
i_run
;
i_length
=
ppl_dct_coef
[
0
][
i_code
].
i_length
;
i_length
=
p
_vpar
->
p
pl_dct_coef
[
0
][
i_code
].
i_length
;
i_level
=
ppl_dct_coef
[
0
][
i_code
].
i_level
;
i_level
=
p
_vpar
->
p
pl_dct_coef
[
0
][
i_code
].
i_level
;
}
}
...
@@ -861,9 +847,9 @@ static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
...
@@ -861,9 +847,9 @@ static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
}
}
else
else
{
{
i_run
=
ppl_dct_coef
[
b_vlc_intra
][
i_code
].
i_run
;
i_run
=
p
_vpar
->
p
pl_dct_coef
[
b_vlc_intra
][
i_code
].
i_run
;
i_length
=
ppl_dct_coef
[
b_vlc_intra
][
i_code
].
i_length
;
i_length
=
p
_vpar
->
p
pl_dct_coef
[
b_vlc_intra
][
i_code
].
i_length
;
i_level
=
ppl_dct_coef
[
b_vlc_intra
][
i_code
].
i_level
;
i_level
=
p
_vpar
->
p
pl_dct_coef
[
b_vlc_intra
][
i_code
].
i_level
;
}
}
#if 0
#if 0
...
@@ -1287,10 +1273,10 @@ static __inline__ int CodedPattern420( vpar_thread_t * p_vpar )
...
@@ -1287,10 +1273,10 @@ static __inline__ int CodedPattern420( vpar_thread_t * p_vpar )
int
i_vlc
=
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
int
i_vlc
=
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
/* Trash the good number of bits read in the lookup table */
/* Trash the good number of bits read in the lookup table */
RemoveBits
(
&
p_vpar
->
bit_stream
,
p
_vpar
->
p
l_coded_pattern
[
i_vlc
].
i_length
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
pl_coded_pattern
[
i_vlc
].
i_length
);
/* return the value from the vlc table */
/* return the value from the vlc table */
return
p
_vpar
->
p
l_coded_pattern
[
i_vlc
].
i_value
;
return
pl_coded_pattern
[
i_vlc
].
i_value
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -1300,10 +1286,10 @@ static __inline__ int CodedPattern422( vpar_thread_t * p_vpar )
...
@@ -1300,10 +1286,10 @@ static __inline__ int CodedPattern422( vpar_thread_t * p_vpar )
{
{
int
i_vlc
=
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
int
i_vlc
=
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
p
_vpar
->
p
l_coded_pattern
[
i_vlc
].
i_length
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
pl_coded_pattern
[
i_vlc
].
i_length
);
/* Supplementary 2 bits long code for 4:2:2 format */
/* Supplementary 2 bits long code for 4:2:2 format */
return
p
_vpar
->
p
l_coded_pattern
[
i_vlc
].
i_value
|
return
pl_coded_pattern
[
i_vlc
].
i_value
|
(
GetBits
(
&
p_vpar
->
bit_stream
,
2
)
<<
6
);
(
GetBits
(
&
p_vpar
->
bit_stream
,
2
)
<<
6
);
}
}
...
@@ -1314,9 +1300,9 @@ static __inline__ int CodedPattern444( vpar_thread_t * p_vpar )
...
@@ -1314,9 +1300,9 @@ static __inline__ int CodedPattern444( vpar_thread_t * p_vpar )
{
{
int
i_vlc
=
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
int
i_vlc
=
ShowBits
(
&
p_vpar
->
bit_stream
,
9
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
p
_vpar
->
p
l_coded_pattern
[
i_vlc
].
i_length
);
RemoveBits
(
&
p_vpar
->
bit_stream
,
pl_coded_pattern
[
i_vlc
].
i_length
);
return
p
_vpar
->
p
l_coded_pattern
[
i_vlc
].
i_value
|
return
pl_coded_pattern
[
i_vlc
].
i_value
|
(
GetBits
(
&
p_vpar
->
bit_stream
,
6
)
<<
6
);
(
GetBits
(
&
p_vpar
->
bit_stream
,
6
)
<<
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