~ubuntu-branches/ubuntu/natty/libva/natty

« back to all changes in this revision

Viewing changes to i965_drv_video/shaders/post_processing/Common/PL8x8_Save_P208.asm

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler, Artur Rona, Reinhard Tartler
  • Date: 2011-02-13 19:01:16 UTC
  • mfrom: (3.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110213190116-wy9fqh71nmomiacl
Tags: 1.0.8-3
[ Artur Rona ]
* Update library dependencies to fix FTBFS properly.

[ Reinhard Tartler ]
* Disable i965 driver on hurd-i386, Closes: #613102

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
// Module name: PL8x8_Save_P208.asm
 
13
//
 
14
// Save entire current planar frame data block of size 16x8
 
15
//---------------------------------------------------------------
 
16
//  Symbols needed to be defined before including this module
 
17
//
 
18
//      DWORD_ALIGNED_DEST:     only if DEST_Y, DEST_U, DEST_V data are DWord aligned
 
19
//      ORIX:
 
20
//---------------------------------------------------------------
 
21
 
 
22
#include "PL8x8_Save_P208.inc"
 
23
 
 
24
    mov  (8) mMSGHDR<1>:ud      rMSGSRC<8;8,1>:ud
 
25
 
 
26
#if !defined(SAVE_UV_ONLY)
 
27
// Save current planar frame Y block data (16x8) -------------------------------
 
28
 
 
29
    mov  (2) mMSGHDR.0<1>:d     wORIX<2;2,1>:w          // Block origin
 
30
    mov  (1) mMSGHDR.2<1>:ud    nDPW_BLOCK_SIZE_Y:ud    // Block width and height (16x8)
 
31
 
 
32
WritePlanarToDataPort:
 
33
    $for(0,0; <nY_NUM_OF_ROWS; 2,1) {
 
34
            mov (16) mubMSGPAYLOAD(%2,0)<1>     ub2DEST_Y(%1)REGION(16,2)
 
35
            mov (16) mubMSGPAYLOAD(%2,16)<1>    ub2DEST_Y(%1+1)REGION(16,2)
 
36
    } 
 
37
    send (8)    dNULLREG    mMSGHDR   udDUMMY_NULL    nDATAPORT_WRITE    nDPMW_MSGDSC+nDPW_MSG_SIZE_Y+nBI_DESTINATION_Y:ud
 
38
#endif
 
39
    
 
40
//** Save  8x8 packed U and V -----------------------------------------------------
 
41
// we could write directly wORIX to mMSGHDR and then execute asr on it, that way we could
 
42
// avoid using rMSGSRC as a buffer and have one command less in code, but it is unknown whether
 
43
//it is possible to do asr on mMSGHDR so we use rMSGSRC.
 
44
    mov (2)  rMSGSRC.0<1>:d    wORIX<2;2,1>:w             // Block origin
 
45
                                                                                                        
 
46
    mov (1)  rMSGSRC.2<1>:ud   nDPW_BLOCK_SIZE_UV:ud      // U/V block width and height (16x4)
 
47
    mov (8)  mMSGHDR<1>:ud     rMSGSRC<8;8,1>:ud
 
48
 
 
49
    $for(0,0; <nY_NUM_OF_ROWS;2,1) {
 
50
        mov (16) mubMSGPAYLOAD(%2,0)<2>     ub2DEST_U(%2)REGION(16,2) 
 
51
        mov (16) mubMSGPAYLOAD(%2,1)<2>     ub2DEST_V(%2)REGION(16,2) 
 
52
    }
 
53
    send (8)    dNULLREG    mMSGHDR    udDUMMY_NULL    nDATAPORT_WRITE    nDPMW_MSGDSC+nDPW_MSG_SIZE_UV+nBI_DESTINATION_UV:ud
 
54
 
 
55
//End of PL8x8_Save_P208.asm  
 
56