Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Load reference 10x5 area for chroma NV12 4x4 MC
  3.  * Copyright © <2010>, Intel Corporation.
  4.  *
  5.  * This program is licensed under the terms and conditions of the
  6.  * Eclipse Public License (EPL), version 1.0.  The full text of the EPL is at
  7.  * http://www.opensource.org/licenses/eclipse-1.0.php.
  8.  *
  9.  */
  10. // Kernel name: LoadRef_C_10x5.asm
  11. //
  12. // Load reference 10x5 area for chroma NV12 4x4 MC
  13.  
  14.  
  15. //#if !defined(__LOADREF_C_10x5__)              // Make sure this is only included once
  16. //#define __LOADREF_C_10x5__
  17.  
  18.  
  19. #if 1
  20.  
  21.         // Compute integer and fractional components of MV
  22.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x03:w {NoDDClr}
  23.     and (2)             gMVX_FRACC<1>:w         r[pMV,0]<2;2,1>:w                               0x07:w {NoDDChk}
  24.    
  25.     // Check whether MVY is integer
  26.         or.z.f0.0 (8) null:w                    gMVY_FRACC<0;1,0>:w                             0:w
  27.        
  28.         // Compute top-left corner position to be loaded
  29.     mov (2)             gMSGSRC.0<1>:d          gMVX_INT<2;2,1>:w
  30.         shl (1)         gMSGSRC.0:d                     gMSGSRC.0:d                                             1:w
  31.  
  32.         (f0.0) add (1)  pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(2)+nBI_LC_DIFF:ud
  33.         (-f0.0) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(3)+nBI_LC_DIFF:ud
  34.        
  35.     // Read 16x5 pixels - TODO: Reading 12x5 instead of 16x5 took more time on CL. Why?
  36.     (f0.0) mov (1)      gMSGSRC.2:ud    0x00030009:ud                                   //{NoDDChk}
  37.     (-f0.0) mov (1)     gMSGSRC.2:ud    0x00040009:ud                                   //{NoDDChk}
  38.     send (8)    gudREFC(0)<1>       mMSGHDRC                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  39.  
  40. #else
  41.  
  42.         add (1)         pMSGDSC:ud                      gMSGDSC_R:ud                                    RESP_LEN(3)+nBI_LC_DIFF:ud
  43.  
  44.         // Compute integer and fractional components of MV
  45.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x03:w {NoDDClr}
  46.     and (2)             gMVX_FRACC<1>:w         r[pMV,0]<2;2,1>:w                               0x07:w {NoDDChk}
  47.        
  48.         // Compute top-left corner position to be loaded
  49.     mov (2)             gMSGSRC.0<1>:d          gMVX_INT<2;2,1>:w
  50.         shl (1)         gMSGSRC.0:d                     gMSGSRC.0:d                                             1:w
  51.  
  52.     // Read 16x5 pixels
  53.     mov (1)             gMSGSRC.2:ud            0x00040009:ud                                   {NoDDChk}
  54.     send (8)    gudREFC(0)<1>       mMSGHDRC                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  55. #endif
  56.        
  57. //#endif        // !defined(__LOADREF_C_10x5__)
  58.