Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * All Video Processing kernels
  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.  
  11.  
  12. .declare SRC_B          Base=REG(r,10)  ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
  13. .declare SRC_G          Base=REG(r,18)  ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
  14. .declare SRC_R          Base=REG(r,26)  ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
  15. .declare SRC_A          Base=REG(r,34)  ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
  16.  
  17. #define DEST_ARGB               ubBOT_ARGB
  18.  
  19. #undef  nSRC_REGION
  20. #define nSRC_REGION             nREGION_2
  21.  
  22.  
  23. //Pack directly to mrf as optimization - vK
  24.  
  25. $for(0, 0; <8; 1, 2) {
  26. //      mov     (16)    DEST_ARGB(%2,0)<4>              SRC_B(%1)                                       { Compr, NoDDClr }                      // 16 B
  27. //      mov     (16)    DEST_ARGB(%2,1)<4>              SRC_G(%1)                                       { Compr, NoDDClr, NoDDChk }     // 16 G
  28. //      mov     (16)    DEST_ARGB(%2,2)<4>              SRC_R(%1)                                       { Compr, NoDDClr, NoDDChk }     // 16 R //these 2 inst can be merged - vK
  29. //      mov     (16)    DEST_ARGB(%2,3)<4>              SRC_A(%1)                                       { Compr, NoDDChk }                      //DEST_RGB_FORMAT<0;1,0>:ub     { Compr, NoDDChk }                      // 16 A
  30.  
  31.         mov     (8)     DEST_ARGB(%2,  0)<4>            SRC_B(%1)                                       { NoDDClr }                             // 8 B
  32.         mov     (8)     DEST_ARGB(%2,  1)<4>            SRC_G(%1)                                       { NoDDClr, NoDDChk }    // 8 G
  33.         mov     (8)     DEST_ARGB(%2,  2)<4>            SRC_R(%1)                                       { NoDDClr, NoDDChk }    // 8 R
  34.         mov     (8)     DEST_ARGB(%2,  3)<4>            SRC_A(%1)                                       { NoDDChk }                             // 8 A
  35.  
  36.         mov     (8)     DEST_ARGB(%2+1,0)<4>            SRC_B(%1,8)                             { NoDDClr }                             // 8 B
  37.         mov     (8)     DEST_ARGB(%2+1,1)<4>            SRC_G(%1,8)                                     { NoDDClr, NoDDChk }    // 8 G
  38.         mov     (8)     DEST_ARGB(%2+1,2)<4>            SRC_R(%1,8)                                     { NoDDClr, NoDDChk }    // 8 R
  39.         mov     (8)     DEST_ARGB(%2+1,3)<4>            SRC_A(%1,8)                                     { NoDDChk }                             // 8 A
  40. }
  41.