⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mae_fe_mcomp.c

📁 au1200 linux2.6.11 硬件解码mae驱动和maiplayer播放器源码
💻 C
📖 第 1 页 / 共 5 页
字号:
           MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 5, bwd, s->mbmode,s->mbtype, s->mcprecuv);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 5, bwd, s->mbmode,s->mbtype, s->mcprecuv);         if (s->bc) {           // **********  Cb1  **********           // Determine whether to use top/bot field only based on fp & ft           previous_cb = (s->fp && !s->ft) ? previous_cb_bot : previous_cb_top;             // Determine if reference block is out-of frame           x_fwd_pixel[x_fwd_blk_in].oof = MAE_create_oof_mask("Cb1 (16x16, fwd)", src_x_uv[0], src_y_uv[0]+8, s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);           oof = x_fwd_pixel[x_fwd_blk_in].oof;           // ptr is the pointer to the reference block           // destptr is the pointer to the destination block           ptr = previous_cb + (src_y_uv[0] + 8) * linesize_uv + src_x_uv[0];           destptr = current_cb + ((chroma_ypos + 8) * linesize_uv) + (s->xpos >> 1);             // calls one of the mc?? leaf functions for first chroma (cb)            if (!s->codstyl)                MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 6, bwd, s->mbmode,s->mbtype, s->mcprecuv);           else             MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 6, bwd, s->mbmode,s->mbtype, s->mcprecuv);           // **********  Cr1  **********           // Determine whether to use top/bot field only based on fp & ft           previous_cr = (s->fp && !s->ft) ? previous_cr_bot : previous_cr_top;             // Determine if reference block is out-of frame           x_fwd_pixel[x_fwd_blk_in].oof = MAE_create_oof_mask("Cr1 (16x16, fwd)", src_x_uv[0], src_y_uv[0]+8, s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);           oof = x_fwd_pixel[x_fwd_blk_in].oof;           // ptr is the pointer to the reference block           // destptr is the pointer to the destination block           ptr = previous_cr + (src_y_uv[0] + 8) * linesize_uv + src_x_uv[0];           destptr = current_cr + ((chroma_ypos + 8) * linesize_uv) + (s->xpos >> 1);             // calls one of the mc?? leaf functions for second chroma (cr)            if (!s->codstyl)                MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 7, bwd, s->mbmode,s->mbtype, s->mcprecuv);           else             MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 7, bwd, s->mbmode,s->mbtype, s->mcprecuv);         } // if (s->bc)         break;    case MAE_MC_MODE_BWD:         // **********  Y  **********         avg = 0; // only set for bidir to avg final pixel         bwd = 1;         // Determine if reference block is out-of frame         x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Y (16x16, bwd)", src_x_y[0], src_y_y[0], s->linesz, height_y, 48, ring_size_y, 16, 16, s->codstyl);         oof = x_bwd_pixel[x_bwd_blk_in].oof;         // Determine whether to use top/bot field only based on fp & ft         future_y = (s->fp && !s->bt) ? future_y_bot : future_y_top;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block         ptr = future_y + src_y_y[0] * linesize_y + src_x_y[0];         destptr = current_y + s->ypos * linesize_y + s->xpos;         // calls one of the mc?? leaf functions for luma (y)         if (!s->codstyl)              MAE_mpeg_hv_4t (destptr, ptr, linesize_y, linesize_y, 16, 16, 0, rnd, dxy_y_e[0], oof, 0, bwd, s->mbmode,s->mbtype, s->mcprec);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_y, linesize_y, 16, 16, 0, rnd, dxy_y_e[0], oof, 0, bwd, s->mbmode,s->mbtype, s->mcprec);         // **********  Cb  **********         // Determine whether to use top/bot field only based on fp & ft         future_cb = (s->fp && !s->bt) ? future_cb_bot : future_cb_top;         // Determine if reference block is out-of frame         x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Cb (16x16, bwd)", src_x_uv[0], src_y_uv[0], s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);         oof = x_bwd_pixel[x_bwd_blk_in].oof;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block         ptr = future_cb + src_y_uv[0] * linesize_uv + src_x_uv[0];         destptr = current_cb + (chroma_ypos * linesize_uv) + (s->xpos >> 1);         // calls one of the mc?? leaf functions for first chroma (cb)         if (!s->codstyl)              MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 4, bwd, s->mbmode,s->mbtype, s->mcprecuv);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 4, bwd, s->mbmode,s->mbtype, s->mcprecuv);         // **********  Cr  **********         // Determine whether to use top/bot field only based on fp & ft         future_cr = (s->fp && !s->bt) ? future_cr_bot : future_cr_top;         // Determine if reference block is out-of frame         x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Cr (16x16, bwd)", src_x_uv[0], src_y_uv[0], s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);         oof = x_bwd_pixel[x_bwd_blk_in].oof;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block         ptr = future_cr + src_y_uv[0] * linesize_uv + src_x_uv[0];         destptr = current_cr + (chroma_ypos * linesize_uv) + (s->xpos >> 1);         // calls one of the mc?? leaf functions for second chroma (cr)         if (!s->codstyl)              MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 5, bwd, s->mbmode,s->mbtype, s->mcprecuv);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 5, bwd, s->mbmode,s->mbtype, s->mcprecuv);         if (s->bc) {           // **********  Cb1  **********           // Determine whether to use top/bot field only based on fp & ft           future_cb = (s->fp && !s->bt) ? future_cb_bot : future_cb_top;             // Determine if reference block is out-of frame           x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Cb1 (16x16, bwd)", src_x_uv[0], src_y_uv[0]+8, s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);           oof = x_bwd_pixel[x_bwd_blk_in].oof;           // ptr is the pointer to the reference block           // destptr is the pointer to the destination block           ptr = future_cb + (src_y_uv[0] + 8) * linesize_uv + src_x_uv[0];           destptr = current_cb + ((chroma_ypos + 8) * linesize_uv) + (s->xpos >> 1);             // calls one of the mc?? leaf functions for first chroma (cb)           if (!s->codstyl)                MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 6, bwd, s->mbmode,s->mbtype, s->mcprecuv);           else             MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 6, bwd, s->mbmode,s->mbtype, s->mcprecuv);             // **********  Cr1  **********           // Determine whether to use top/bot field only based on fp & ft           future_cr = (s->fp && !s->bt) ? future_cr_bot : future_cr_top;             // Determine if reference block is out-of frame           x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Cr1 (16x16, bwd)", src_x_uv[0], src_y_uv[0]+8, s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);           oof = x_bwd_pixel[x_bwd_blk_in].oof;           // ptr is the pointer to the reference block           // destptr is the pointer to the destination block           ptr = future_cr + (src_y_uv[0] + 8) * linesize_uv + src_x_uv[0];           destptr = current_cr + ((chroma_ypos + 8) * linesize_uv) + (s->xpos >> 1);             // calls one of the mc?? leaf functions for second chroma (cr)           if (!s->codstyl)                MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 7, bwd, s->mbmode,s->mbtype, s->mcprecuv);           else             MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, 0, rnd, dxy_uv_e[0], oof, 7, bwd, s->mbmode,s->mbtype, s->mcprecuv);         } // if (s->bc)         break;    case MAE_MC_MODE_BIDIR:         // Need to get a second index into leaf functions for luma (y)         dxy_y[1] = ((mvy[2] & 3) << 2) | (mvx[2] & 3);           dxy_y_e[1] = ((mvx[2] & 3) << 2) | (mvy[2] & 3);           // Need to get second location for ref block for luma (y)         src_x_y[1] = s->xpos + (mvx[2] >> 2);            src_y_y[1] = s->ypos + (mvy[2] >> 2);         // Limit the location of the ref block         // EricS:  May need to change this for out-of-frame pixels         src_x_y[1] = mae_clip(src_x_y[1], y_clip_min_x, linesize_y_clip);	         if (src_x_y[1] == linesize_y_clip)           dxy_y[1] &= ~3;         src_y_y[1] = mae_clip(src_y_y[1], y_clip_min_y, height_y_clip);         if (src_y_y[1] == height_y_clip)           dxy_y[1] &= ~12;          // Need to get a second index into leaf functions for chroma (uv)         dxy_uv[1] = ((mvy[5] & 3) << 2) | (mvx[5] & 3);         dxy_uv[1] = (s->codstyl) ? dxy_uv[1] : (dxy_uv[1] & 0xfffffffa);         dxy_uv_e[1] = ((mvx[5] & 3) << 2) | (mvy[5] & 3);         dxy_uv_e[1] = (s->codstyl) ? dxy_uv_e[1] : (dxy_uv_e[1] & 0xfffffffa);         // Need to get second location for ref block for luma (y)         src_x_uv[1] = (s->xpos >> 1) + (mvx[5] >> 2);         src_y_uv[1] = chroma_ypos + (mvy[5] >> 2);         // Limit the location of the ref block         // EricS:  May need to change this for out-of-frame pixels         src_x_uv[1] = mae_clip(src_x_uv[1], uv_clip_min_x, linesize_uv_clip);         if (src_x_uv[1] == (linesize_uv_clip))           dxy_uv[1] &= ~3;         src_y_uv[1] = mae_clip(src_y_uv[1], uv_clip_min_y, height_uv_clip);         if (src_y_uv[1] == height_uv_clip)           dxy_uv[1] &= ~12;                 // **********  Y  **********         avg = 0; // only set for bidir to avg final pixel         bwd = 0; // bwd==0 means fwd         // Determine if reference block is out-of frame         x_fwd_pixel[x_fwd_blk_in].oof = MAE_create_oof_mask("Y (16x16, bi)", src_x_y[0], src_y_y[0], s->linesz, height_y, 48, ring_size_y, 16, 16, s->codstyl);         oof = x_fwd_pixel[x_fwd_blk_in].oof;         // Determine whether to use top/bot field only based on fp & ft         previous_y = (s->fp && !s->ft) ? previous_y_bot : previous_y_top;         future_y = (s->fp && !s->bt) ? future_y_bot : future_y_top;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block         ptr = previous_y + src_y_y[0] * linesize_y + src_x_y[0];         destptr = current_y + s->ypos * linesize_y + s->xpos;         // calls one of the mc?? leaf functions for luma (y)         if (!s->codstyl)              MAE_mpeg_hv_4t (destptr, ptr, linesize_y, linesize_y, 16, 16, 0, rnd, dxy_y_e[0], oof, 0, bwd, s->mbmode,s->mbtype, s->mcprec);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_y, linesize_y, 16, 16, 0, rnd, dxy_y_e[0], oof, 0, bwd, s->mbmode,s->mbtype, s->mcprec);         // Determine if reference block is out-of frame         x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Y (16x16, bi)", src_x_y[1], src_y_y[1], s->linesz, height_y, 48, ring_size_y, 16, 16, s->codstyl);         oof = x_bwd_pixel[x_bwd_blk_in].oof;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block and does not change         ptr = future_y + src_y_y[1] * linesize_y + src_x_y[1];         // We are now finding a reference block from the BWD frame and we are averaging         // this result with the result from the previous function call         avg = 1;         bwd = 1;         // calls one of the mc?? leaf functions for luma (y)         if (!s->codstyl)              MAE_mpeg_hv_4t (destptr, ptr, linesize_y, linesize_y, 16, 16, avg, rnd, dxy_y_e[1], oof, 0, bwd, s->mbmode,s->mbtype, s->mcprec);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_y, linesize_y, 16, 16, avg, rnd, dxy_y_e[1], oof, 0, bwd, s->mbmode,s->mbtype, s->mcprec);         // **********  Cb  **********         avg = 0; // only set for bidir to avg final pixel         bwd = 0; // bwd==0 means fwd         // Determine if reference block is out-of frame         x_fwd_pixel[x_fwd_blk_in].oof = MAE_create_oof_mask("Cb (16x16, bi)", src_x_uv[0], src_y_uv[0], s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);         oof = x_fwd_pixel[x_fwd_blk_in].oof;         // Determine whether to use top/bot field only based on fp & ft         previous_cb = (s->fp && !s->ft) ? previous_cb_bot : previous_cb_top;         future_cb = (s->fp && !s->bt) ? future_cb_bot : future_cb_top;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block         ptr = previous_cb + src_y_uv[0] * linesize_uv + src_x_uv[0];         destptr = current_cb + (chroma_ypos * linesize_uv) + (s->xpos >> 1);         // calls one of the mc?? leaf functions for first chroma (cb)         if (!s->codstyl)           MAE_mpeg_hv_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, avg, rnd, dxy_uv_e[0], oof, 4, bwd, s->mbmode,s->mbtype, s->mcprecuv);         else           MAE_wmv9_vh_4t (destptr, ptr, linesize_uv, linesize_uv, 8, 8, avg, rnd, dxy_uv_e[0], oof, 4, bwd, s->mbmode,s->mbtype, s->mcprecuv);         // Determine if reference block is out-of frame         x_bwd_pixel[x_bwd_blk_in].oof = MAE_create_oof_mask("Cb (16x16, bi)", src_x_uv[1], src_y_uv[1], s->linesz>>1, height_uv, 24, ring_size_uv, 8, 8, s->codstyl);         oof = x_bwd_pixel[x_bwd_blk_in].oof;         // ptr is the pointer to the reference block         // destptr is the pointer to the destination block and does not change         ptr = future_cb + src_y_uv[1] * linesize_uv + src_x_uv[1];         // We are now finding a reference block from the BWD frame and we are averaging         // this result with the result from the previous function call         avg = 1;         bwd = 1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -