Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright © <2010>, Intel Corporation.
  3.  *
  4.  * This program is licensed under the terms and conditions of the
  5.  * Eclipse Public License (EPL), version 1.0.  The full text of the EPL is at
  6.  * http://www.opensource.org/licenses/eclipse-1.0.php.
  7.  *
  8.  */
  9. // Module name: saveNV12_16x4.asm
  10. //
  11. // Save a NV12 16x4 block
  12. //
  13. //----------------------------------------------------------------
  14. //  Symbols need to be defined before including this module
  15. //
  16. //      Source region in :ud
  17. //      SRC_YD:                 SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud                     // 2 GRFs
  18. //      SRC_UD:                 SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud                     // 1 GRF
  19. //
  20. //      Binding table index:
  21. //      BI_DEST_Y:              Binding table index of Y surface
  22. //      BI_DEST_UV:             Binding table index of UV surface (NV12)
  23. //
  24. //----------------------------------------------------------------
  25.  
  26. #if defined(_DEBUG)
  27.         mov             (1)             EntrySignatureC:w                       0xDDD5:w
  28. #endif
  29.  
  30.     mov (2)     MSGSRC.0<1>:ud  ORIX_TOP<2;2,1>:w                                                       // Block origin
  31.     mov (1)     MSGSRC.2<1>:ud  0x0003000F:ud                                                           // Block width and height (16x4)
  32.  
  33.         // Pack Y    
  34.         mov     (16)    MSGPAYLOADD(0)<1>               SRC_YD(0)                                               // Compressed inst
  35.    
  36.     send (8)    NULLREG MSGHDR  MSGSRC<8;8,1>:ud        DAPWRITE        MSG_LEN(2)+DWBWMSGDSC+BI_DEST_Y         // Write 2 GRFs
  37.  
  38.  
  39.     asr (1)     MSGSRC.1:ud             MSGSRC.1:ud                     1:w                                             // NV12 U+V block origin y = half of Y comp
  40.     mov (1)     MSGSRC.2<1>:ud  0x0001000F:ud                                                           // NV12 U+V block width and height (16x2)
  41.  
  42.         // Pack U and V
  43. //      mov (16)        MSGPAYLOADB(0,0)<2>             SRC_UB(0,0)
  44. //      mov (16)        MSGPAYLOADB(0,1)<2>             SRC_VB(0,0)
  45.        
  46.         mov (8) MSGPAYLOADD(0,0)<1>             SRC_UD(0)      
  47.        
  48.     send (8)    NULLREG MSGHDR  MSGSRC<8;8,1>:ud        DAPWRITE        MSG_LEN(1)+DWBWMSGDSC+BI_DEST_UV        // Write 1 GRF
  49.  
  50. // End of saveNV12_16x4.asm
  51.