3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* image stuff |
* image stuff |
5 |
* |
* |
6 |
|
* This program is an implementation of a part of one or more MPEG-4 |
7 |
|
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
8 |
|
* to use this software module in hardware or software products are |
9 |
|
* advised that its use may infringe existing patents or copyrights, and |
10 |
|
* any such use would be at such party's own risk. The original |
11 |
|
* developer of this software module and his/her company, and subsequent |
12 |
|
* editors and their companies, will have no liability for use of this |
13 |
|
* software or modifications or derivatives thereof. |
14 |
|
* |
15 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
16 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
17 |
* the Free Software Foundation; either version 2 of the License, or |
* the Free Software Foundation; either version 2 of the License, or |
304 |
v_ptr -= offset; |
v_ptr -= offset; |
305 |
hv_ptr -= offset; |
hv_ptr -= offset; |
306 |
|
|
307 |
for (y = 0; y < edged_height; y = y + 8) { |
for (y = 0; y < edged_height; y += 8) { |
308 |
for (x = 0; x < edged_width; x = x + 8) { |
for (x = 0; x < edged_width; x += 8) { |
309 |
interpolate8x8_halfpel_h(h_ptr, n_ptr, edged_width, rounding); |
interpolate8x8_halfpel_h(h_ptr, n_ptr, edged_width, rounding); |
310 |
interpolate8x8_halfpel_v(v_ptr, n_ptr, edged_width, rounding); |
interpolate8x8_halfpel_v(v_ptr, n_ptr, edged_width, rounding); |
311 |
interpolate8x8_halfpel_hv(hv_ptr, n_ptr, edged_width, rounding); |
interpolate8x8_halfpel_hv(hv_ptr, n_ptr, edged_width, rounding); |
320 |
hv_ptr += stride_add; |
hv_ptr += stride_add; |
321 |
n_ptr += stride_add; |
n_ptr += stride_add; |
322 |
} |
} |
323 |
|
/* |
324 |
#ifdef BFRAMES |
#ifdef BFRAMES |
325 |
n_ptr = refn->u; |
n_ptr = refn->u; |
326 |
h_ptr = refh->u; |
h_ptr = refh->u; |
332 |
v_ptr -= offset2; |
v_ptr -= offset2; |
333 |
hv_ptr -= offset2; |
hv_ptr -= offset2; |
334 |
|
|
335 |
for (y = 0; y < edged_height2; y = y + 8) { |
for (y = 0; y < edged_height2; y += 8) { |
336 |
for (x = 0; x < edged_width2; x = x + 8) { |
for (x = 0; x < edged_width2; x += 8) { |
337 |
interpolate8x8_halfpel_h(h_ptr, n_ptr, edged_width2, rounding); |
interpolate8x8_halfpel_h(h_ptr, n_ptr, edged_width2, rounding); |
338 |
interpolate8x8_halfpel_v(v_ptr, n_ptr, edged_width2, rounding); |
interpolate8x8_halfpel_v(v_ptr, n_ptr, edged_width2, rounding); |
339 |
interpolate8x8_halfpel_hv(hv_ptr, n_ptr, edged_width2, rounding); |
interpolate8x8_halfpel_hv(hv_ptr, n_ptr, edged_width2, rounding); |
376 |
n_ptr += stride_add2; |
n_ptr += stride_add2; |
377 |
} |
} |
378 |
#endif |
#endif |
379 |
|
*/ |
380 |
/* |
/* |
381 |
interpolate_halfpel_h( |
interpolate_halfpel_h( |
382 |
refh->y - offset, |
refh->y - offset, |
760 |
if(w > width) |
if(w > width) |
761 |
w = width; |
w = width; |
762 |
w2 = w >> 1; |
w2 = w >> 1; |
763 |
void __inline |
|
764 |
dY = (uint8_t*)out_frm->y + (mby << 4) * out_frm->stride_y + (mbx << 4); |
dY = (uint8_t*)out_frm->y + (mby << 4) * out_frm->stride_y + (mbx << 4); |
765 |
dU = (uint8_t*)out_frm->u + (mby << 3) * out_frm->stride_u + (mbx << 3); |
dU = (uint8_t*)out_frm->u + (mby << 3) * out_frm->stride_u + (mbx << 3); |
766 |
dV = (uint8_t*)out_frm->v + (mby << 3) * out_frm->stride_v + (mbx << 3); |
dV = (uint8_t*)out_frm->v + (mby << 3) * out_frm->stride_v + (mbx << 3); |
770 |
|
|
771 |
for(i = 0 ; i < 16 ; i++) { |
for(i = 0 ; i < 16 ; i++) { |
772 |
memcpy(dY,sY,w); |
memcpy(dY,sY,w); |
773 |
dY = out_frm->y + (mby << 4) * out_frm->stride_y + (mbx << 4); |
dY += out_frm->stride_y; |
774 |
dU = out_frm->u + (mby << 3) * out_frm->stride_u + (mbx << 3); |
sY += std; |
775 |
dV = out_frm->v + (mby << 3) * out_frm->stride_v + (mbx << 3); |
} |
776 |
for(i = 0 ; i < 8 ; i++) { |
for(i = 0 ; i < 8 ; i++) { |
777 |
memcpy(dU,sU,w2); |
memcpy(dU,sU,w2); |
778 |
dU += out_frm->stride_u; |
dU += out_frm->stride_u; |