1494 |
BitstreamWriteVopHeader(bs, &pEnc->mbParam, pEnc->current, 1, pEnc->current->mbs[0].quant); |
BitstreamWriteVopHeader(bs, &pEnc->mbParam, pEnc->current, 1, pEnc->current->mbs[0].quant); |
1495 |
|
|
1496 |
pEnc->current->sStat.iTextBits = 0; |
pEnc->current->sStat.iTextBits = 0; |
1497 |
|
pEnc->current->sStat.iMVBits = 0; |
1498 |
pEnc->current->sStat.kblks = mb_width * mb_height; |
pEnc->current->sStat.kblks = mb_width * mb_height; |
1499 |
pEnc->current->sStat.mblks = pEnc->current->sStat.ublks = 0; |
pEnc->current->sStat.mblks = pEnc->current->sStat.ublks = 0; |
1500 |
|
|
1593 |
if ((current->vop_flags & XVID_VOP_HALFPEL)) { |
if ((current->vop_flags & XVID_VOP_HALFPEL)) { |
1594 |
if (reference->is_interpolated != current->rounding_type) { |
if (reference->is_interpolated != current->rounding_type) { |
1595 |
start_timer(); |
start_timer(); |
1596 |
image_interpolate(pRef, &pEnc->vInterH, &pEnc->vInterV, |
image_interpolate(pRef->y, pEnc->vInterH.y, pEnc->vInterV.y, |
1597 |
&pEnc->vInterHV, pParam->edged_width, |
pEnc->vInterHV.y, pParam->edged_width, |
1598 |
pParam->edged_height, |
pParam->edged_height, |
1599 |
(pParam->vol_flags & XVID_VOL_QUARTERPEL), |
(pParam->vol_flags & XVID_VOL_QUARTERPEL), |
1600 |
current->rounding_type); |
current->rounding_type); |
1604 |
} |
} |
1605 |
|
|
1606 |
current->sStat.iTextBits = current->sStat.iMvSum = current->sStat.iMvCount = |
current->sStat.iTextBits = current->sStat.iMvSum = current->sStat.iMvCount = |
1607 |
current->sStat.kblks = current->sStat.mblks = current->sStat.ublks = 0; |
current->sStat.kblks = current->sStat.mblks = current->sStat.ublks = |
1608 |
|
current->sStat.iMVBits = 0; |
1609 |
|
|
1610 |
current->coding_type = P_VOP; |
current->coding_type = P_VOP; |
1611 |
|
|
1887 |
|
|
1888 |
if (pEnc->reference->is_interpolated != 0) { |
if (pEnc->reference->is_interpolated != 0) { |
1889 |
start_timer(); |
start_timer(); |
1890 |
image_interpolate(f_ref, &pEnc->f_refh, &pEnc->f_refv, &pEnc->f_refhv, |
image_interpolate(f_ref->y, pEnc->f_refh.y, pEnc->f_refv.y, pEnc->f_refhv.y, |
1891 |
pEnc->mbParam.edged_width, pEnc->mbParam.edged_height, |
pEnc->mbParam.edged_width, pEnc->mbParam.edged_height, |
1892 |
(pEnc->mbParam.vol_flags & XVID_VOL_QUARTERPEL), 0); |
(pEnc->mbParam.vol_flags & XVID_VOL_QUARTERPEL), 0); |
1893 |
stop_inter_timer(); |
stop_inter_timer(); |
1904 |
|
|
1905 |
if (pEnc->current->is_interpolated != 0) { |
if (pEnc->current->is_interpolated != 0) { |
1906 |
start_timer(); |
start_timer(); |
1907 |
image_interpolate(b_ref, &pEnc->vInterH, &pEnc->vInterV, &pEnc->vInterHV, |
image_interpolate(b_ref->y, pEnc->vInterH.y, pEnc->vInterV.y, pEnc->vInterHV.y, |
1908 |
pEnc->mbParam.edged_width, pEnc->mbParam.edged_height, |
pEnc->mbParam.edged_width, pEnc->mbParam.edged_height, |
1909 |
(pEnc->mbParam.vol_flags & XVID_VOL_QUARTERPEL), 0); |
(pEnc->mbParam.vol_flags & XVID_VOL_QUARTERPEL), 0); |
1910 |
stop_inter_timer(); |
stop_inter_timer(); |
1928 |
BitstreamWriteVopHeader(bs, &pEnc->mbParam, frame, 1, frame->quant); |
BitstreamWriteVopHeader(bs, &pEnc->mbParam, frame, 1, frame->quant); |
1929 |
|
|
1930 |
frame->sStat.iTextBits = 0; |
frame->sStat.iTextBits = 0; |
1931 |
|
frame->sStat.iMVBits = 0; |
1932 |
frame->sStat.iMvSum = 0; |
frame->sStat.iMvSum = 0; |
1933 |
frame->sStat.iMvCount = 0; |
frame->sStat.iMvCount = 0; |
1934 |
frame->sStat.kblks = frame->sStat.mblks = frame->sStat.ublks = 0; |
frame->sStat.kblks = frame->sStat.mblks = frame->sStat.ublks = 0; |