Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Load reference 16x9 area for luma 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_Y_16x9.asm
  11. //
  12. // Load reference 16x9 area for luma 4x4 MC
  13.  
  14.  
  15. //#if !defined(__LOADREF_Y_16x9__)              // Make sure this is only included once
  16. //#define __LOADREF_Y_16x9__
  17.  
  18. #if 1
  19.  
  20.         // Compute integer and fractional components of MV
  21.     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w  //{NoDDClr}
  22.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w  //{NoDDChk}
  23.  
  24.     // Check whether MVY is integer
  25.         or.z.f0.1 (8) null:w                    gMVY_FRAC<0;1,0>:w                              0:w
  26.            
  27.         // Set message descriptor
  28.         (f0.1) add (1)  pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(2):ud
  29.         (-f0.1) add (1) pMSGDSC:ud              gMSGDSC_R:ud                                    RESP_LEN(5):ud
  30.  
  31.         // Compute top-left corner position to be loaded
  32.         // TODO: sel
  33.     (-f0.1) add (2)     gMSGSRC.0<1>:d  gMVX_INT<2;2,1>:w                               -0x02:d //{NoDDClr}
  34.     (-f0.1) mov (1)     gMSGSRC.2:ud    0x00080008:ud                                                   //{NoDDChk}
  35.     (f0.1) add (1)      gMSGSRC.0<1>:d  gMVX_INT<0;1,0>:w                               -0x02:d //{NoDDClr}
  36.         (f0.1) mov (1)  gMSGSRC.1<1>:d  gMVY_INT<0;1,0>:w                                               //{NoDDChk,NoDDClr}
  37.     (f0.1) mov (1)      gMSGSRC.2:ud    0x00030008:ud                                                   //{NoDDChk}
  38.  
  39.     // Read 16x9 pixels
  40.     send (8)    gudREF(0)<1>        mMSGHDRY                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  41.  
  42. #else
  43.  
  44.         // Compute integer and fractional components of MV
  45.     and (2)             gMVX_FRAC<1>:w          r[pMV,0]<2;2,1>:w                               0x03:w {NoDDClr} //
  46.     asr (2)             gMVX_INT<1>:w           r[pMV,0]<2;2,1>:w                               0x02:w {NoDDChk} //
  47.  
  48.         // Set message descriptor
  49.         add (1)         pMSGDSC:ud                      gMSGDSC_R:ud                                    RESP_LEN(5):ud
  50.    
  51.         // Compute top-left corner position to be loaded
  52.     add (2)             gMSGSRC.0<1>:d          gMVX_INT<2;2,1>:w                               -0x02:d {NoDDClr} //
  53.     mov (1)             gMSGSRC.2:ud            0x00080008:ud                                                   {NoDDChk} //
  54.  
  55.     // Read 16x9 pixels
  56.     send (8)    gudREF(0)<1>        mMSGHDRY                                            gMSGSRC<8;8,1>:ud       DAPREAD pMSGDSC:ud
  57.  
  58. #endif
  59.  
  60.        
  61. //#endif        // !defined(__LOADREF_Y_16x9__)
  62.