Lines Matching refs:video

26 void calculateQuantizer_Multipass(void *video);
27 void updateRateControl(rateControl *rc, VideoEncData *video);
28 void updateRC_PostProc(rateControl *rc, VideoEncData *video);
33 PV_STATUS RC_Initialize(void *video);
35 PV_STATUS RC_VopQPSetting(VideoEncData *video,rateControl *rc[]);
36 PV_STATUS RC_VopUpdateStat(VideoEncData *video,rateControl *rc[]);
37 PV_STATUS RC_UpdateBuffer(VideoEncData *video, Int currLayer, Int num_skip);
38 Int RC_GetSkipNextFrame(VideoEncData *video,Int currLayer);
39 void RC_ResetSkipNextFrame(void *video,Int currLayer);
52 VideoEncData *video = (VideoEncData *) input;
53 VideoEncParams *encParams = video->encParams;
54 rateControl **rc = video->rc;
58 MultiPass **pMP = video->pMP;
71 rc[n]->Bs = video->encParams->BufferSize[n];
83 if (video->encParams->H263_Enabled)
85 rc[n]->max_BitVariance_num = (Int)((rc[n]->Bs - video->encParams->maxFrameSize) / 2 / (rc[n]->bitrate / rc[n]->framerate / 10.0)) - 5;
112 if (1) //!video->encParams->H263_Enabled) { // MPEG-4
124 rc[n]->VBV_fullness = rc[n]->Bs - (Int)(video->encParams->VBV_delay * rc[n]->bitrate);
126 //rc[n]->VBV_fullness = (rc[n]->Bs-video->encParams->maxFrameSize)/2 + video->encParams->maxFrameSize;
129 rc[n]->low_bound = -rc[n]->Bs / 2 + video->encParams->maxFrameSize; /* too high */
130 rc[n]->VBV_fullness_offset = video->encParams->maxFrameSize / 2; /* don't understand the meaning of this */
171 reset QPMB[], currVop->quantizer, rc->Ec, video->header_bits */
173 1. Set video->QPMB of all macroblocks.
175 3. Reset video->header_bits to zero.
183 PV_STATUS RC_VopQPSetting(VideoEncData *video, rateControl *prc[])
185 Int currLayer = video->currLayer;
186 Vol *currVol = video->vol[currLayer];
187 Vop *currVop = video->currVop;
192 rateControl *rc = video->rc[currLayer];
193 MultiPass *pMP = video->pMP[currLayer];
197 if (video->encParams->RC_Type == CONSTANT_Q)
199 M4VENC_MEMSET(video->QPMB, currVop->quantizer, sizeof(UChar)*currVol->nTotalMB);
205 if (video->rc[currLayer]->encoded_frames == 0) /* rc[currLayer]->totalFrameNumber*/
207 M4VENC_MEMSET(video->QPMB, currVop->quantizer, sizeof(UChar)*currVol->nTotalMB);
208 video->rc[currLayer]->Qc = video->encParams->InitQuantIvop[currLayer];
212 calculateQuantizer_Multipass((void*) video);
213 currVop->quantizer = video->rc[currLayer]->Qc;
219 video->QPMB[i] = (i & 1) ? currVop->quantizer - 1 : currVop->quantizer + 1;
222 M4VENC_MEMSET(video->QPMB, currVop->quantizer, sizeof(UChar)*currVol->nTotalMB);
226 video->header_bits = 0;
234 pMP->counter_BTdst = (Int)(video->encParams->LayerFrameRate[video->currLayer] * 7.5 + 0.5); /* 0.75s time frame */
247 pMP->mad = video->sumMAD / (float)currVol->nTotalMB;
291 PV_STATUS RC_VopUpdateStat(VideoEncData *video, rateControl *rc)
293 Int currLayer = video->currLayer;
294 Vol *currVol = video->vol[currLayer];
295 MultiPass *pMP = video->pMP[currLayer];
298 switch (video->encParams->RC_Type)
335 rc->Hc = video->header_bits; /* Total Bits in Header and Motion Vector */
338 updateRateControl(rc, video);
360 Int RC_GetSkipNextFrame(VideoEncData *video, Int currLayer)
362 return video->rc[currLayer]->skip_next_frame;
365 void RC_ResetSkipNextFrame(VideoEncData *video, Int currLayer)
368 video->rc[currLayer]->skip_next_frame = 0;
383 PV_STATUS RC_UpdateBuffer(VideoEncData *video, Int currLayer, Int num_skip)
385 rateControl *rc = video->rc[currLayer];
386 MultiPass *pMP = video->pMP[currLayer];
388 if (video == NULL || rc == NULL || pMP == NULL)
418 VideoEncData *video = (VideoEncData *) input;
419 VideoEncParams *encParams = video->encParams;
420 rateControl **rc = video->rc;
424 MultiPass **pMP = video->pMP;
429 extern Bool SetProfile_BufferSize(VideoEncData *video, float delay, Int bInitialized);
432 /* Reset video buffer size due to target bitrate change */
433 SetProfile_BufferSize(video, video->encParams->VBV_delay, 0); /* output: video->encParams->BufferSize[] */
438 updateRC_PostProc(rc[n], video);
442 rc[n]->Bs = video->encParams->BufferSize[n];
452 if (video->encParams->H263_Enabled)
454 rc[n]->max_BitVariance_num = (Int)((rc[n]->Bs - video->encParams->maxFrameSize) / 2 / (rc[n]->bitrate / rc[n]->framerate / 10.0)) - 5;
531 VideoEncData *video = (VideoEncData *) input;
532 MultiPass *pMP = video->pMP[video->currLayer];
533 Vol *currVol = video->vol[video->currLayer];
534 rateControl *rc = video->rc[video->currLayer];
540 if (video == NULL || currVol == NULL || pMP == NULL || rc == NULL)
544 updateRC_PostProc(rc, video);
555 curr_mad = video->sumMAD / (float)currVol->nTotalMB;
627 // if(video->encParams->RC_Type == CBR_LOWDELAY)
681 if (video->encParams->H263_Enabled && rc->T > video->encParams->maxFrameSize)
683 rc->T = video->encParams->maxFrameSize; // added this 11/07/05
701 VideoEncData *video = (VideoEncData *) input;
702 MultiPass *pMP = video->pMP[video->currLayer];
703 Vol *currVol = video->vol[video->currLayer];
704 rateControl *rc = video->rc[video->currLayer];
711 if (video == NULL || currVol == NULL || pMP == NULL || rc == NULL)
715 targetBitCalculation((void*) video);
717 if (rc->T <= 0 || video->sumMAD == 0)
726 curr_mad = video->sumMAD / (float)currVol->nTotalMB;
808 void updateRateControl(rateControl *rc, VideoEncData *video)
824 if ((video->encParams->H263_Enabled && rc->Rc > video->encParams->maxFrameSize) || /* For H263/short header mode, drop the frame if the actual frame size exceeds the bound */
857 void updateRC_PostProc(rateControl *rc, VideoEncData *video)
859 MultiPass *pMP = video->pMP[video->currLayer];