39 |
* MinChen <chenm001@163.com> |
* MinChen <chenm001@163.com> |
40 |
* 14.04.2002 added FrameCodeB() |
* 14.04.2002 added FrameCodeB() |
41 |
* |
* |
42 |
* $Id: encoder.c,v 1.57 2002-07-19 14:56:00 chl Exp $ |
* $Id: encoder.c,v 1.58 2002-07-19 15:02:38 chl Exp $ |
43 |
* |
* |
44 |
****************************************************************************/ |
****************************************************************************/ |
45 |
|
|
1725 |
*pBits = BitstreamPos(bs) - *pBits; |
*pBits = BitstreamPos(bs) - *pBits; |
1726 |
|
|
1727 |
pEnc->time_pp = ((int32_t)pEnc->mbParam.fbase - (int32_t)pEnc->last_pframe + (int32_t)pEnc->mbParam.m_ticks) % (int32_t)pEnc->mbParam.fbase; |
pEnc->time_pp = ((int32_t)pEnc->mbParam.fbase - (int32_t)pEnc->last_pframe + (int32_t)pEnc->mbParam.m_ticks) % (int32_t)pEnc->mbParam.fbase; |
|
fprintf(stderr,"fbase=%d last_p=%d ticks=%d time_pp = %d\n",pEnc->mbParam.fbase,pEnc->last_pframe,pEnc->mbParam.m_ticks,pEnc->time_pp); |
|
1728 |
|
|
1729 |
pEnc->last_pframe = pEnc->mbParam.m_ticks; |
pEnc->last_pframe = pEnc->mbParam.m_ticks; |
1730 |
return 0; // inter |
return 0; // inter |
1782 |
stop_inter_timer(); |
stop_inter_timer(); |
1783 |
|
|
1784 |
start_timer(); |
start_timer(); |
|
fprintf(stderr,"m_ticks =%d\n",(int32_t)pEnc->mbParam.m_ticks+1); |
|
1785 |
MotionEstimationBVOP(&pEnc->mbParam, frame, |
MotionEstimationBVOP(&pEnc->mbParam, frame, |
1786 |
((int32_t)pEnc->mbParam.fbase + (int32_t)pEnc->mbParam.m_ticks + 1 - (int32_t)pEnc->last_pframe) % pEnc->mbParam.fbase, |
((int32_t)pEnc->mbParam.fbase + (int32_t)pEnc->mbParam.m_ticks + 1 - (int32_t)pEnc->last_pframe) % pEnc->mbParam.fbase, |
1787 |
pEnc->time_pp, |
pEnc->time_pp, |