1609 |
memcpy((void *)((ptr_t)bs->start + pos), |
memcpy((void *)((ptr_t)bs->start + pos), |
1610 |
(void *)((ptr_t)pEnc->smpData[k].bs->start), len); |
(void *)((ptr_t)pEnc->smpData[k].bs->start), len); |
1611 |
|
|
1612 |
current->length = pos += len; |
current->length += len; |
1613 |
|
pos += len; |
1614 |
|
|
1615 |
/* collect stats */ |
/* collect stats */ |
1616 |
current->sStat.iTextBits += pEnc->smpData[k].sStat->iTextBits; |
current->sStat.iTextBits += pEnc->smpData[k].sStat->iTextBits; |
1917 |
if (!reference->is_edged) { |
if (!reference->is_edged) { |
1918 |
start_timer(); |
start_timer(); |
1919 |
image_setedges(pRef, pParam->edged_width, pParam->edged_height, |
image_setedges(pRef, pParam->edged_width, pParam->edged_height, |
1920 |
pParam->width, pParam->height, 0); |
pParam->width, pParam->height, XVID_BS_VERSION); |
1921 |
stop_edges_timer(); |
stop_edges_timer(); |
1922 |
reference->is_edged = 1; |
reference->is_edged = 1; |
1923 |
} |
} |
2130 |
|
|
2131 |
if (current->sStat.kblks + current->sStat.mblks < |
if (current->sStat.kblks + current->sStat.mblks < |
2132 |
(pParam->frame_drop_ratio * mb_width * mb_height) / 100 && |
(pParam->frame_drop_ratio * mb_width * mb_height) / 100 && |
2133 |
( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) ) |
( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) && |
2134 |
|
(current->coding_type == P_VOP) ) |
2135 |
{ |
{ |
2136 |
current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0; |
current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0; |
2137 |
current->sStat.ublks = mb_width * mb_height; |
current->sStat.ublks = mb_width * mb_height; |
2303 |
if (!pEnc->reference->is_edged) { |
if (!pEnc->reference->is_edged) { |
2304 |
image_setedges(f_ref, pEnc->mbParam.edged_width, |
image_setedges(f_ref, pEnc->mbParam.edged_width, |
2305 |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
2306 |
pEnc->mbParam.height, 0); |
pEnc->mbParam.height, XVID_BS_VERSION); |
2307 |
pEnc->reference->is_edged = 1; |
pEnc->reference->is_edged = 1; |
2308 |
} |
} |
2309 |
|
|
2320 |
if (!pEnc->current->is_edged) { |
if (!pEnc->current->is_edged) { |
2321 |
image_setedges(b_ref, pEnc->mbParam.edged_width, |
image_setedges(b_ref, pEnc->mbParam.edged_width, |
2322 |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
2323 |
pEnc->mbParam.height, 0); |
pEnc->mbParam.height, XVID_BS_VERSION); |
2324 |
pEnc->current->is_edged = 1; |
pEnc->current->is_edged = 1; |
2325 |
} |
} |
2326 |
|
|