--- trunk/xvidcore/src/image/image.c 2005/05/23 09:29:43 1617 +++ trunk/xvidcore/src/image/image.c 2005/12/17 11:24:32 1664 @@ -19,7 +19,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: image.c,v 1.31 2005-05-23 09:29:43 Skal Exp $ + * $Id: image.c,v 1.33 2005-12-17 11:24:32 syskin Exp $ * ****************************************************************************/ @@ -249,12 +249,7 @@ { const uint32_t offset = EDGE_SIZE2 * (edged_width + 1); /* we only interpolate half of the edge area */ const uint32_t stride_add = 7 * edged_width; -#if 0 - const uint32_t edged_width2 = edged_width / 2; - const uint32_t edged_height2 = edged_height / 2; - const uint32_t offset2 = EDGE_SIZE2 * (edged_width2 + 1); - const uint32_t stride_add2 = 7 * edged_width2; -#endif + uint8_t *n_ptr, *h_ptr, *v_ptr, *hv_ptr; uint32_t x, y; @@ -333,123 +328,6 @@ n_ptr += stride_add; } } -/* -#ifdef BFRAMES - n_ptr = refn->u; - h_ptr = refh->u; - v_ptr = refv->u; - hv_ptr = refhv->u; - - n_ptr -= offset2; - h_ptr -= offset2; - v_ptr -= offset2; - hv_ptr -= offset2; - - for (y = 0; y < edged_height2; y += 8) { - for (x = 0; x < edged_width2; x += 8) { - interpolate8x8_halfpel_h(h_ptr, n_ptr, edged_width2, rounding); - interpolate8x8_halfpel_v(v_ptr, n_ptr, edged_width2, rounding); - interpolate8x8_halfpel_hv(hv_ptr, n_ptr, edged_width2, rounding); - - n_ptr += 8; - h_ptr += 8; - v_ptr += 8; - hv_ptr += 8; - } - h_ptr += stride_add2; - v_ptr += stride_add2; - hv_ptr += stride_add2; - n_ptr += stride_add2; - } - - n_ptr = refn->v; - h_ptr = refh->v; - v_ptr = refv->v; - hv_ptr = refhv->v; - - n_ptr -= offset2; - h_ptr -= offset2; - v_ptr -= offset2; - hv_ptr -= offset2; - - for (y = 0; y < edged_height2; y = y + 8) { - for (x = 0; x < edged_width2; x = x + 8) { - interpolate8x8_halfpel_h(h_ptr, n_ptr, edged_width2, rounding); - interpolate8x8_halfpel_v(v_ptr, n_ptr, edged_width2, rounding); - interpolate8x8_halfpel_hv(hv_ptr, n_ptr, edged_width2, rounding); - - n_ptr += 8; - h_ptr += 8; - v_ptr += 8; - hv_ptr += 8; - } - h_ptr += stride_add2; - v_ptr += stride_add2; - hv_ptr += stride_add2; - n_ptr += stride_add2; - } -#endif -*/ - /* - interpolate_halfpel_h( - refh->y - offset, - refn->y - offset, - edged_width, edged_height, - rounding); - - interpolate_halfpel_v( - refv->y - offset, - refn->y - offset, - edged_width, edged_height, - rounding); - - interpolate_halfpel_hv( - refhv->y - offset, - refn->y - offset, - edged_width, edged_height, - rounding); - */ - - /* uv-image-based compensation - offset = EDGE_SIZE2 * (edged_width / 2 + 1); - - interpolate_halfpel_h( - refh->u - offset, - refn->u - offset, - edged_width / 2, edged_height / 2, - rounding); - - interpolate_halfpel_v( - refv->u - offset, - refn->u - offset, - edged_width / 2, edged_height / 2, - rounding); - - interpolate_halfpel_hv( - refhv->u - offset, - refn->u - offset, - edged_width / 2, edged_height / 2, - rounding); - - - interpolate_halfpel_h( - refh->v - offset, - refn->v - offset, - edged_width / 2, edged_height / 2, - rounding); - - interpolate_halfpel_v( - refv->v - offset, - refn->v - offset, - edged_width / 2, edged_height / 2, - rounding); - - interpolate_halfpel_hv( - refhv->v - offset, - refn->v - offset, - edged_width / 2, edged_height / 2, - rounding); - */ } @@ -1078,9 +956,9 @@ } void -output_slice(IMAGE * cur, int std, int width, xvid_image_t* out_frm, int mbx, int mby,int mbl) { +output_slice(IMAGE * cur, int stride, int width, xvid_image_t* out_frm, int mbx, int mby,int mbl) { uint8_t *dY,*dU,*dV,*sY,*sU,*sV; - int std2 = std >> 1; + int stride2 = stride >> 1; int w = mbl << 4, w2,i; if(w > width) @@ -1090,24 +968,24 @@ dY = (uint8_t*)out_frm->plane[0] + (mby << 4) * out_frm->stride[0] + (mbx << 4); dU = (uint8_t*)out_frm->plane[1] + (mby << 3) * out_frm->stride[1] + (mbx << 3); dV = (uint8_t*)out_frm->plane[2] + (mby << 3) * out_frm->stride[2] + (mbx << 3); - sY = cur->y + (mby << 4) * std + (mbx << 4); - sU = cur->u + (mby << 3) * std2 + (mbx << 3); - sV = cur->v + (mby << 3) * std2 + (mbx << 3); + sY = cur->y + (mby << 4) * stride + (mbx << 4); + sU = cur->u + (mby << 3) * stride2 + (mbx << 3); + sV = cur->v + (mby << 3) * stride2 + (mbx << 3); for(i = 0 ; i < 16 ; i++) { memcpy(dY,sY,w); dY += out_frm->stride[0]; - sY += std; + sY += stride; } for(i = 0 ; i < 8 ; i++) { memcpy(dU,sU,w2); dU += out_frm->stride[1]; - sU += std2; + sU += stride2; } for(i = 0 ; i < 8 ; i++) { memcpy(dV,sV,w2); dV += out_frm->stride[2]; - sV += std2; + sV += stride2; } }