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
edca9928
Commit
edca9928
authored
Jan 19, 2000
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
. ultimisation des calculs de pr�diction dans la synchro
. squelette du subtitle_decoder
parent
177c1590
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
16 deletions
+12
-16
Makefile
Makefile
+3
-0
include/vpar_synchro.h
include/vpar_synchro.h
+0
-1
src/video_parser/video_parser.c
src/video_parser/video_parser.c
+5
-7
src/video_parser/vpar_synchro.c
src/video_parser/vpar_synchro.c
+4
-8
No files found.
Makefile
View file @
edca9928
...
@@ -188,6 +188,8 @@ ac3_decoder_obj = ac3_decoder/ac3_decoder.o \
...
@@ -188,6 +188,8 @@ ac3_decoder_obj = ac3_decoder/ac3_decoder.o \
audio_decoder_obj
=
audio_decoder/audio_decoder.o
\
audio_decoder_obj
=
audio_decoder/audio_decoder.o
\
audio_decoder/audio_math.o
audio_decoder/audio_math.o
subtitle_decoder_obj
=
subtitle_decoder/subtitle_decoder.o
#??generic_decoder_obj = generic_decoder/generic_decoder.o
#??generic_decoder_obj = generic_decoder/generic_decoder.o
# remeber to add it to OBJ
# remeber to add it to OBJ
...
@@ -231,6 +233,7 @@ C_OBJ = $(interface_obj) \
...
@@ -231,6 +233,7 @@ C_OBJ = $(interface_obj) \
$(video_output_obj)
\
$(video_output_obj)
\
$(ac3_decoder_obj)
\
$(ac3_decoder_obj)
\
$(audio_decoder_obj)
\
$(audio_decoder_obj)
\
$(subtitle_decoder_obj)
\
$(generic_decoder_obj)
\
$(generic_decoder_obj)
\
$(video_parser_obj)
\
$(video_parser_obj)
\
$(video_decoder_obj)
\
$(video_decoder_obj)
\
...
...
include/vpar_synchro.h
View file @
edca9928
...
@@ -22,7 +22,6 @@ typedef struct video_synchro_tab_s
...
@@ -22,7 +22,6 @@ typedef struct video_synchro_tab_s
{
{
double
mean
;
double
mean
;
double
deviation
;
double
deviation
;
int
count
;
}
video_synchro_tab_t
;
}
video_synchro_tab_t
;
...
...
src/video_parser/video_parser.c
View file @
edca9928
...
@@ -100,22 +100,20 @@ vpar_thread_t * vpar_CreateThread( /* video_cfg_t *p_cfg, */ input_thread_t *p_i
...
@@ -100,22 +100,20 @@ vpar_thread_t * vpar_CreateThread( /* video_cfg_t *p_cfg, */ input_thread_t *p_i
* Initialize the synchro properties
* Initialize the synchro properties
*/
*/
p_vpar
->
synchro
.
modulo
=
0
;
p_vpar
->
synchro
.
modulo
=
0
;
/* assume there were about 3 P and
4
B images between I's */
/* assume there were about 3 P and
6
B images between I's */
p_vpar
->
synchro
.
current_p_count
=
1
;
p_vpar
->
synchro
.
current_p_count
=
1
;
p_vpar
->
synchro
.
p_count_predict
=
3
;
p_vpar
->
synchro
.
p_count_predict
=
3
;
p_vpar
->
synchro
.
current_b_count
=
1
;
p_vpar
->
synchro
.
current_b_count
=
1
;
p_vpar
->
synchro
.
b_count_predict
=
4
;
p_vpar
->
synchro
.
b_count_predict
=
6
;
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
6
;
i
++
)
{
{
p_vpar
->
synchro
.
tab_p
[
i
].
mean
=
3
;
p_vpar
->
synchro
.
tab_p
[
i
].
mean
=
3
;
p_vpar
->
synchro
.
tab_p
[
i
].
deviation
=
1
;
p_vpar
->
synchro
.
tab_p
[
i
].
deviation
=
.
5
;
p_vpar
->
synchro
.
tab_p
[
i
].
count
=
0
;
p_vpar
->
synchro
.
tab_b
[
i
].
mean
=
4
;
p_vpar
->
synchro
.
tab_b
[
i
].
mean
=
6
;
p_vpar
->
synchro
.
tab_b
[
i
].
deviation
=
1
;
p_vpar
->
synchro
.
tab_b
[
i
].
deviation
=
.
5
;
p_vpar
->
synchro
.
tab_b
[
i
].
count
=
0
;
}
}
}
}
...
...
src/video_parser/vpar_synchro.c
View file @
edca9928
...
@@ -50,14 +50,9 @@
...
@@ -50,14 +50,9 @@
*****************************************************************************/
*****************************************************************************/
double
vpar_SynchroUpdateTab
(
video_synchro_tab_t
*
tab
,
int
count
)
double
vpar_SynchroUpdateTab
(
video_synchro_tab_t
*
tab
,
int
count
)
{
{
if
(
tab
->
count
<
MAX_COUNT
)
tab
->
count
++
;
tab
->
mean
=
(
tab
->
mean
+
3
*
count
)
/
4
;
tab
->
deviation
=
(
tab
->
deviation
+
3
*
abs
(
tab
->
mean
-
count
)
)
/
4
;
tab
->
mean
=
(
(
tab
->
count
-
1
)
*
tab
->
mean
+
count
)
/
tab
->
count
;
tab
->
deviation
=
(
(
tab
->
count
-
1
)
*
tab
->
deviation
+
abs
(
tab
->
mean
-
count
)
)
/
tab
->
count
;
return
tab
->
deviation
;
return
tab
->
deviation
;
}
}
...
@@ -155,6 +150,7 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
...
@@ -155,6 +150,7 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
intf_DbgMsg
(
"vpar debug: synchro image %i - modulo is %i
\n
"
,
i_coding_type
,
p_vpar
->
synchro
.
modulo
);
intf_DbgMsg
(
"vpar debug: synchro image %i - modulo is %i
\n
"
,
i_coding_type
,
p_vpar
->
synchro
.
modulo
);
intf_DbgMsg
(
"vpar debug: synchro predict P %e - predict B %e
\n
"
,
p_vpar
->
synchro
.
p_count_predict
,
p_vpar
->
synchro
.
b_count_predict
);
intf_DbgMsg
(
"vpar debug: synchro predict P %e - predict B %e
\n
"
,
p_vpar
->
synchro
.
p_count_predict
,
p_vpar
->
synchro
.
b_count_predict
);
return
(
0
);
return
(
i_coding_type
==
I_CODING_TYPE
);
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