Пример #1
0
        public void SetMbMi(int width, int height)
        {
            int alignedWidth  = BitUtils.AlignPowerOfTwo(width, Constants.MiSizeLog2);
            int alignedHeight = BitUtils.AlignPowerOfTwo(height, Constants.MiSizeLog2);

            MiCols   = alignedWidth >> Constants.MiSizeLog2;
            MiRows   = alignedHeight >> Constants.MiSizeLog2;
            MiStride = CalcMiSize(MiCols);

            MbCols = (MiCols + 1) >> 1;
            MbRows = (MiRows + 1) >> 1;
            MBs    = MbRows * MbCols;
        }
Пример #2
0
 public static int MiColsAlignedToSb(int nMis)
 {
     return(BitUtils.AlignPowerOfTwo(nMis, Constants.MiBlockSizeLog2));
 }