refbuf.c
资源名称:chapter15.rar [点击查看]
上传用户:hjq518
上传日期:2021-12-09
资源大小:5084k
文件大小:2k
源码类别:
Audio
开发平台:
Visual C++
- /*!
- ************************************************************************
- * file refbuf.c
- *
- * brief
- * Declarations of the reference frame buffer types and functions
- ************************************************************************
- */
- #include "global.h"
- #include "refbuf.h"
- /*!
- ************************************************************************
- * brief
- * Yields a pel line _pointer_ from one of the 16 sub-images
- * Input does not require subpixel image indices
- ************************************************************************
- */
- imgpel *FastLine4X (imgpel ****Pic, int y, int x)
- {
- return &(Pic[(y & 0x03)][(x & 0x03)][y >> 2][x >> 2]);
- }
- /*!
- ************************************************************************
- * brief
- * Yields a pel line _pointer_ from one of the 16 sub-images
- * Input does not require subpixel image indices
- ************************************************************************
- */
- imgpel *UMVLine4X (imgpel ****Pic, int y, int x)
- {
- return &(Pic[(y & 0x03)][(x & 0x03)][iClip3( 0, height_pad, y >> 2)][iClip3( 0, width_pad , x >> 2)]);
- }
- /*!
- ************************************************************************
- * brief
- * Yields a pel line _pointer_ from one of the 16 (4:4:4), 32 (4:2:2),
- * or 64 (4:2:0) sub-images
- * Input does not require subpixel image indices
- ************************************************************************
- */
- imgpel *UMVLine8X_chroma (imgpel ****Pic, int y, int x)
- {
- return &(Pic[y & chroma_mask_mv_y][x & chroma_mask_mv_x][iClip3 (0, height_pad_cr, y >> chroma_shift_y)][iClip3 (0, width_pad_cr , x >> chroma_shift_x)]);
- }
- /*!
- ************************************************************************
- * brief
- * Yields a pel line _pointer_ from one of the 16 (4:4:4), 32 (4:2:2),
- * or 64 (4:2:0) sub-images
- * Input does not require subpixel image indices
- ************************************************************************
- */
- imgpel *FastLine8X_chroma (imgpel ****Pic, int y, int x)
- {
- return &(Pic[y & chroma_mask_mv_y][x & chroma_mask_mv_x][y >> chroma_shift_y][x >> chroma_shift_x]);
- }