21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: encoder.c,v 1.136 2010-12-28 19:19:43 Isibaar Exp $ |
* $Id: encoder.c,v 1.138 2010-12-31 10:17:29 Isibaar Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
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; |
2303 |
image_setedges(f_ref, pEnc->mbParam.edged_width, |
image_setedges(f_ref, pEnc->mbParam.edged_width, |
2304 |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
2305 |
pEnc->mbParam.height, 0); |
pEnc->mbParam.height, 0); |
2306 |
pEnc->current->is_edged = 1; |
pEnc->reference->is_edged = 1; |
2307 |
} |
} |
2308 |
|
|
2309 |
if (pEnc->reference->is_interpolated != 0) { |
if (pEnc->reference->is_interpolated != 0) { |
2334 |
|
|
2335 |
frame->coding_type = B_VOP; |
frame->coding_type = B_VOP; |
2336 |
|
|
2337 |
if (pEnc->current->vop_flags & XVID_VOP_RD_PSNRHVSM) { |
if ((frame->vop_flags & XVID_VOP_RD_PSNRHVSM) && (frame->vop_flags & XVID_VOP_RD_BVOP)) { |
2338 |
image_block_variance(&pEnc->current->image, pEnc->mbParam.edged_width, pEnc->current->mbs, |
image_block_variance(&frame->image, pEnc->mbParam.edged_width, frame->mbs, |
2339 |
pEnc->mbParam.mb_width, pEnc->mbParam.mb_height); |
pEnc->mbParam.mb_width, pEnc->mbParam.mb_height); |
2340 |
} |
} |
2341 |
|
|