Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Load reference 16x13 area for luma 8x8 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_Y_16x13.asm
  11. //
  12. // Load reference 16x13 area for luma 8x8 MC
  13.  
  14.  
  15. //#if !defined(__LOADREF_Y_16x13__)             // Make sure this is only included once
  16. //#define __LOADREF_Y_16x13__
  17.  
  18. #if 1
  19.  
  20. #if 1
  21.  
  22.         // Check whether MVX is integer MV
  23.         and.z.f0.0 (1) null:w                   r[pMV,0]<0;1,0>:w                               0x3:w
  24.  
  25.         // Compute integer and fractional components of MV
  26.     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w  //{NoDDClr}
  27.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w  //{NoDDChk}
  28.    
  29.     // Check whether MVY is integer
  30.         or.z.f0.1 (8) null:w                    gMVY_FRAC<0;1,0>:w                              0:w
  31.        
  32.         // If MVX is a multiple of 4 (..., -4, 0, 4, ...) integer MV, do special handling
  33.         (f0.0)  jmpi (1)        INTERLABEL(LOADREF_MVXZERO)    
  34.        
  35.     // Set message descriptor
  36.     (f0.1) add (1)      pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(4):ud 
  37.         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(7):ud
  38.        
  39.         // Compute top-left corner position to be loaded
  40.         // TODO: sel
  41.     (-f0.1) add (2)     gMSGSRC.0<1>:d  gMVX_INT<2;2,1>:w                               -0x02:d //{NoDDClr}
  42.     (-f0.1) mov (1)     gMSGSRC.2:ud    0x000c000c:ud                                                   //{NoDDChk}
  43.     (f0.1) add (1)      gMSGSRC.0<1>:d  gMVX_INT<0;1,0>:w                               -0x02:d //{NoDDClr}
  44.         (f0.1) mov (1)  gMSGSRC.1<1>:d  gMVY_INT<0;1,0>:w                                               //{NoDDChk,NoDDClr}
  45.     (f0.1) mov (1)      gMSGSRC.2:ud    0x0007000c:ud                                                   //{NoDDChk}
  46.  
  47.     // Read 16x13 pixels
  48.     send (8)    gudREF(0)<1>            mMSGHDRY                                                gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  49.    
  50.     jmpi INTERLABEL(EXIT_LOADREF_Y_16x13)
  51.    
  52. INTERLABEL(LOADREF_MVXZERO):
  53.    
  54.     // Set message descriptor
  55. #ifdef DEV_ILK
  56.     (f0.1) add (1)      pMSGDSC:ud              gMSGDSC_R:ud                                    0x00200000:ud  
  57.         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    0x00400000:ud
  58. #else
  59.     (f0.1) add (1)      pMSGDSC:ud              gMSGDSC_R:ud                                    0x00020000:ud  
  60.         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    0x00040000:ud
  61. #endif
  62.        
  63.         // Compute top-left corner position to be loaded
  64.         // TODO: sel
  65.         mov (2) gMSGSRC.0<1>:d  gMVX_INT<2;2,1>:w
  66.     (-f0.1) add (1)     gMSGSRC.1<1>:d  gMVY_INT<0;1,0>:w                               -0x02:d
  67.     (-f0.1) mov (1)     gMSGSRC.2:ud    0x000c0007:ud                                                   //{NoDDChk}
  68.     (f0.1) mov (1)      gMSGSRC.2:ud    0x00070007:ud                                                   //{NoDDChk}
  69.  
  70.     // Read 16x13 pixels
  71.     send (8)    gudREF(0)<1>            mMSGHDRY                                                gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  72.    
  73.  
  74. #else
  75.         // Compute integer and fractional components of MV
  76.     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w  //{NoDDClr}
  77.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w  //{NoDDChk}
  78.    
  79.     // Check whether MVY is integer
  80.         or.z.f0.1 (8) null:w                    gMVY_FRAC<0;1,0>:w                              0:w
  81.        
  82.     // Set message descriptor
  83. #ifdef DEV_ILK
  84.     (f0.1) add (1)      pMSGDSC:ud              gMSGDSC_R:ud                                    0x00400000:ud  
  85.         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    0x00700000:ud
  86. #else
  87.     (f0.1) add (1)      pMSGDSC:ud              gMSGDSC_R:ud                                    0x00040000:ud  
  88.         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    0x00070000:ud
  89. #endif
  90.        
  91.         // Compute top-left corner position to be loaded
  92.         // TODO: sel
  93.     (-f0.1) add (2)     gMSGSRC.0<1>:d  gMVX_INT<2;2,1>:w                               -0x02:d //{NoDDClr}
  94.     (-f0.1) mov (1)     gMSGSRC.2:ud    0x000c000c:ud                                                   //{NoDDChk}
  95.     (f0.1) add (1)      gMSGSRC.0<1>:d  gMVX_INT<0;1,0>:w                               -0x02:d //{NoDDClr}
  96.         (f0.1) mov (1)  gMSGSRC.1<1>:d  gMVY_INT<0;1,0>:w                                               //{NoDDChk,NoDDClr}
  97.     (f0.1) mov (1)      gMSGSRC.2:ud    0x0007000c:ud                                                   //{NoDDChk}
  98.  
  99.     // Read 16x13 pixels
  100.     send (8)    gudREF(0)<1>            mMSGHDRY                                                gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  101. #endif
  102.    
  103. #else  
  104.  
  105.         // Compute integer and fractional components of MV
  106.     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w  {NoDDClr} //
  107.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w  {NoDDChk} //
  108.    
  109.     // Set message descriptor
  110. #ifdef DEV_ILK
  111.     add (1)             pMSGDSC:ud                      gMSGDSC_R:ud                                    0x00700000:ud
  112. #else
  113.     add (1)             pMSGDSC:ud                      gMSGDSC_R:ud                                    0x00070000:ud
  114. #endif  // DEV_ILK
  115.    
  116.         // Compute top-left corner position to be loaded
  117.     add (2)             gMSGSRC.0<1>:d          gMVX_INT<2;2,1>:w                               -0x02:d {NoDDClr} //
  118.     mov (1)             gMSGSRC.2:ud            0x000c000c:ud                                                   {NoDDChk} //
  119.  
  120.     // Read 16x13 pixels
  121.     send (8)    gudREF(0)<1>        mMSGHDRY                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  122.    
  123. #endif
  124.  
  125. INTERLABEL(EXIT_LOADREF_Y_16x13):
  126.  
  127. //#endif        // !defined(__LOADREF_Y_16x13__)
  128.