Commit 177c1590 authored by Sam Hocevar's avatar Sam Hocevar

. initialisation propre de la synchro

 . messages de debug � la con pour essayer de voir o� j'en suis
parent 7e618974
......@@ -96,6 +96,29 @@ 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.i_available = 0;
/*
* Initialize the synchro properties
*/
p_vpar->synchro.modulo = 0;
/* assume there were about 3 P and 4 B images between I's */
p_vpar->synchro.current_p_count = 1;
p_vpar->synchro.p_count_predict = 3;
p_vpar->synchro.current_b_count = 1;
p_vpar->synchro.b_count_predict = 4;
{
int i;
for( i=0; i<6; i++)
{
p_vpar->synchro.tab_p[i].mean = 3;
p_vpar->synchro.tab_p[i].deviation = 1;
p_vpar->synchro.tab_p[i].count = 0;
p_vpar->synchro.tab_b[i].mean = 4;
p_vpar->synchro.tab_b[i].deviation = 1;
p_vpar->synchro.tab_b[i].count = 0;
}
}
/* FIXME !!!! */
p_vpar->p_vout = p_main->p_intf->p_vout;
......
......@@ -107,6 +107,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
}
p_vpar->synchro.p_count_predict = predict;
p_vpar->synchro.current_p_count = 0;
/* update all the structures for B images */
......@@ -134,6 +135,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
}
p_vpar->synchro.b_count_predict = predict;
p_vpar->synchro.current_b_count = 0;
break;
......@@ -150,6 +152,9 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
{
// return( 1 );
// return( i_coding_type == I_CODING_TYPE || i_coding_type == P_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 predict P %e - predict B %e\n", p_vpar->synchro.p_count_predict, p_vpar->synchro.b_count_predict);
return( i_coding_type == I_CODING_TYPE );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment