/*! ***************************************************************************************** * \brief * Filter all macroblocks in a diagonal manner to enable parallelization. ***************************************************************************************** */ void DeblockPicture(VideoParameters *p_Vid, StorablePicture *p) { int iheightMBs =(p_Vid->PicSizeInMbs/p_Vid->PicWidthInMbs); unsigned int i, k = p->PicWidthInMbs + 2 * (iheightMBs - 1); #if defined(OPENMP) int j; #pragma omp parallel for #endif for (j = 0; j < p->PicSizeInMbs; ++j) { get_db_strength( p_Vid, p, j ) ; } for (i = 0; i < k; i++) { int nn; int n_last = imin(iheightMBs, (i >> 1) + 1); int n_start = (i < p->PicWidthInMbs) ? 0 : ((i - p->PicWidthInMbs) >> 1) + 1; #if defined(OPENMP) #pragma omp parallel for #endif for (nn = n_start; nn < n_last; nn += GROUP_SIZE) DeblockParallel(p_Vid, p, i, nn, n_last); } }
/*! ***************************************************************************************** * \brief * Filter all macroblocks in a diagonal manner to enable parallelization. ***************************************************************************************** */ void DeblockFrame(VideoParameters *p_Vid, imgpel **imgY, imgpel ***imgUV) { int iheightMBs =(p_Vid->PicSizeInMbs/p_Vid->PicWidthInMbs); unsigned int i, k = p_Vid->PicWidthInMbs + 2 * (iheightMBs - 1); init_Deblock(p_Vid); for (i = 0; i < k; i++) { int nn; int n_last = imin(iheightMBs, (i >> 1) + 1); int n_start = (i < p_Vid->PicWidthInMbs) ? 0 : ((i - p_Vid->PicWidthInMbs) >> 1) + 1; #if defined(OPENMP) #pragma omp parallel for #endif for (nn = n_start; nn < n_last; nn += GROUP_SIZE) DeblockParallel(p_Vid, imgY, imgUV, i, nn, n_last); } }