Lines Matching refs:pC
2012 M4AIR_InternalContext* pC = M4OSA_NULL ;
2019 pC = (M4AIR_InternalContext*)M4OSA_32bitAlignedMalloc(sizeof(M4AIR_InternalContext), M4AIR, (M4OSA_Char*)"AIR internal context") ;
2020 M4ERR_CHECK_NULL_RETURN_VALUE(M4ERR_ALLOC, pC) ;
2040 pC->m_inputFormat = inputFormat;
2041 pC->m_state = M4AIR_kCreated;
2044 *pContext = pC ;
2050 if(M4OSA_NULL != pC)
2052 free(pC) ;
2075 M4AIR_InternalContext* pC = (M4AIR_InternalContext*)pContext ;
2080 if((M4AIR_kCreated != pC->m_state)&&(M4AIR_kConfigured != pC->m_state))
2084 free(pC) ;
2112 M4AIR_InternalContext* pC = (M4AIR_InternalContext*)pContext ;
2118 if(M4AIR_kYUV420AP == pC->m_inputFormat)
2128 if((M4AIR_kCreated != pC->m_state)&&(M4AIR_kConfigured != pC->m_state))
2134 pC->m_params = *pParams;
2137 if( ((pC->m_params.m_inputSize.m_height)&0x1) ||
2138 ((pC->m_params.m_inputSize.m_height)&0x1))
2143 if( ((pC->m_params.m_inputSize.m_width)&0x1) ||
2144 ((pC->m_params.m_inputSize.m_width)&0x1))
2148 if(((pC->m_params.m_inputSize.m_width) == (pC->m_params.m_outputSize.m_width))
2149 &&((pC->m_params.m_inputSize.m_height) == (pC->m_params.m_outputSize.m_height)))
2152 pC->m_bOnlyCopy = M4OSA_TRUE;
2156 pC->m_bOnlyCopy = M4OSA_FALSE;
2162 u32_width_in = ((i==0)||(i==3))?pC->m_params.m_inputSize.m_width:(pC->m_params.m_inputSize.m_width+1)>>1;
2163 u32_height_in = ((i==0)||(i==3))?pC->m_params.m_inputSize.m_height:(pC->m_params.m_inputSize.m_height+1)>>1;
2164 u32_width_out = ((i==0)||(i==3))?pC->m_params.m_outputSize.m_width:(pC->m_params.m_outputSize.m_width+1)>>1;
2165 u32_height_out = ((i==0)||(i==3))?pC->m_params.m_outputSize.m_height:(pC->m_params.m_outputSize.m_height+1)>>1;
2170 pC->u32_x_inc[i] = ((u32_width_in-1) * 0x10000) / (u32_width_out-1);
2174 pC->u32_x_inc[i] = (u32_width_in * 0x10000) / (u32_width_out);
2180 pC->u32_y_inc[i] = ((u32_height_in - 1) * 0x10000) / (u32_height_out-1);
2184 pC->u32_y_inc[i] = (u32_height_in * 0x10000) / (u32_height_out);
2191 if (pC->u32_y_inc[i] >= 0x10000)
2197 pC->u32_y_accum_start[i] = pC->u32_y_inc[i] & 0xffff;
2199 if (!pC->u32_y_accum_start[i])
2201 pC->u32_y_accum_start[i] = 0x10000;
2204 pC->u32_y_accum_start[i] >>= 1;
2208 pC->u32_y_accum_start[i] = 0;
2213 if((pC->m_params.m_inputCoord.m_y&0x1)&&((i==1)||(i==2)))
2215 pC->u32_y_accum_start[i] += 0x8000;
2223 if (pC->u32_x_inc[i] >= 0x10000)
2225 pC->u32_x_accum_start[i] = pC->u32_x_inc[i] & 0xffff;
2227 if (!pC->u32_x_accum_start[i])
2229 pC->u32_x_accum_start[i] = 0x10000;
2232 pC->u32_x_accum_start[i] >>= 1;
2236 pC->u32_x_accum_start[i] = 0;
2241 if((pC->m_params.m_inputCoord.m_x&0x1)&&((i==1)||(i==2)))
2243 pC->u32_x_accum_start[i] += 0x8000;
2249 pC->m_procRows = 0;
2252 pC->m_bFlipX = M4OSA_FALSE;
2253 pC->m_bFlipY = M4OSA_FALSE;
2254 pC->m_bRevertXY = M4OSA_FALSE;
2260 pC->m_bFlipX = M4OSA_TRUE;
2263 pC->m_bFlipX = M4OSA_TRUE;
2264 pC->m_bFlipY = M4OSA_TRUE;
2267 pC->m_bFlipY = M4OSA_TRUE;
2270 pC->m_bRevertXY = M4OSA_TRUE;
2273 pC->m_bRevertXY = M4OSA_TRUE;
2274 pC->m_bFlipY = M4OSA_TRUE;
2277 pC->m_bRevertXY = M4OSA_TRUE;
2278 pC->m_bFlipX = M4OSA_TRUE;
2279 pC->m_bFlipY = M4OSA_TRUE;
2282 pC->m_bRevertXY = M4OSA_TRUE;
2283 pC->m_bFlipX = M4OSA_TRUE;
2289 pC->m_state = M4AIR_kConfigured;
2318 M4AIR_InternalContext* pC
2332 if(M4AIR_kConfigured != pC->m_state)
2337 if(M4AIR_kYUV420AP == pC->m_inputFormat)
2354 if((M4OSA_FALSE == pC->m_params.m_bOutputStripe)||((M4OSA_TRUE == pC->m_params.m_bOutputStripe)&&(0 == pC->m_procRows)))
2357 pu8_data_in = pIn[i].pac_data + pIn[i].u_topleft + (pC->m_params.m_inputCoord.m_x>>u32_shift)
2358 + (pC->m_params.m_inputCoord.m_y >> u32_shift) * pIn[i].u_stride;
2361 if(M4OSA_TRUE == pC->m_bFlipX)
2363 pu8_data_in += ((pC->m_params.m_inputSize.m_width)>>u32_shift) -1 ;
2365 if(M4OSA_TRUE == pC->m_bFlipY)
2367 pu8_data_in += ((pC->m_params.m_inputSize.m_height>>u32_shift) -1) * pIn[i].u_stride;
2371 if( M4OSA_FALSE == pC->m_bOnlyCopy)
2373 pC->u32_x_accum[i] = pC->u32_x_accum_start[i];
2374 pC->u32_y_accum[i] = pC->u32_y_accum_start[i];
2381 pu8_data_in = pC->pu8_data_in[i];
2388 if(M4OSA_FALSE == pC->m_bFlipY)
2398 if( M4OSA_TRUE == pC->m_bOnlyCopy)
2401 if(M4OSA_FALSE == pC->m_bRevertXY)
2404 if(M4OSA_FALSE == pC->m_bFlipX)
2417 if(M4OSA_FALSE == pC->m_bFlipY)
2466 if(M4OSA_FALSE == pC->m_bFlipX)
2484 if(M4OSA_FALSE == pC->m_bRevertXY)
2491 u32_y_frac = (pC->u32_y_accum[i]>>12)&15;
2494 u32_x_accum = pC->u32_x_accum_start[i];
2498 if(M4OSA_TRUE == pC->m_bFlipX)
2520 u32_x_accum += pC->u32_x_inc[i];
2544 u32_x_accum += pC->u32_x_inc[i];
2552 pC->u32_y_accum[i] += pC->u32_y_inc[i];
2553 if (pC->u32_y_accum[i]>>16)
2555 pu8_data_in = pu8_data_in + (pC->u32_y_accum[i] >> 16) * i32_tmp_offset;
2556 pC->u32_y_accum[i] &= 0xffff;
2569 u32_x_frac = (pC->u32_x_accum[i]>>12)&15;
2572 u32_y_accum = pC->u32_y_accum_start[i];
2574 if(M4OSA_TRUE == pC->m_bFlipX)
2584 pu8_src_top = (pu8_data_in - (pC->u32_x_accum[i] >> 16)) - 1;
2597 u32_y_accum += pC->u32_y_inc[i];
2614 pu8_src_top = pu8_data_in + (pC->u32_x_accum[i] >> 16);
2627 u32_y_accum += pC->u32_y_inc[i];
2638 pC->u32_x_accum[i] += pC->u32_x_inc[i];
2648 if(M4OSA_FALSE == pC->m_bRevertXY)
2655 u32_y_frac = (pC->u32_y_accum[i]>>12)&15;
2658 u32_x_accum = pC->u32_x_accum_start[i];
2662 if(M4OSA_TRUE == pC->m_bFlipX)
2686 u32_x_accum += pC->u32_x_inc[i];
2712 u32_x_accum += pC->u32_x_inc[i];
2720 pC->u32_y_accum[i] += pC->u32_y_inc[i];
2721 if (pC->u32_y_accum[i]>>16)
2723 pu8_data_in = pu8_data_in + (pC->u32_y_accum[i] >> 16) * i32_tmp_offset;
2724 pC->u32_y_accum[i] &= 0xffff;
2728 } /**< M4OSA_FALSE == pC->m_bRevertXY */
2738 u32_x_frac = (pC->u32_x_accum[i]>>12)&15;
2741 u32_y_accum = pC->u32_y_accum_start[i];
2743 if(M4OSA_TRUE == pC->m_bFlipX)
2753 pu8_src_top = (pu8_data_in - (pC->u32_x_accum[i] >> 16)) - 1;
2768 u32_y_accum += pC->u32_y_inc[i];
2785 pu8_src_top = pu8_data_in + (pC->u32_x_accum[i] >> 16);
2800 u32_y_accum += pC->u32_y_inc[i];
2811 pC->u32_x_accum[i] += pC->u32_x_inc[i];
2816 } /**< M4OSA_TRUE == pC->m_bRevertXY */
2820 if(M4OSA_TRUE == pC->m_params.m_bOutputStripe)
2822 pC->pu8_data_in[i] = pu8_data_in;
2827 pC->m_procRows += pOut[0].u_height;
2828 if(M4OSA_FALSE == pC->m_bRevertXY)
2830 if(pC->m_params.m_outputSize.m_height <= pC->m_procRows) pC->m_procRows = 0;
2834 if(pC->m_params.m_outputSize.m_width <= pC->m_procRows) pC->m_procRows = 0;