Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
3769 Serge 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
// File name: Scaling.inc
12
 
13
#ifndef _SCALING_INC_
14
#define _SCALING_INC_
15
 
16
// Local variables----------------------------------------------------------------------------------
17
#define MSGHDR_SCALE		m1		// Message Payload Header (Uses m2, m3, m4, m5 implicitly)
18
 
19
//--------------------------------------------------------------------------------------------------
20
//r10.0 thru r33.0; Primary surface read from sampler (16x8)
21
#define DEST_Y			uwTOP_Y
22
#define DEST_U			uwTOP_U
23
#define DEST_V			uwTOP_V
24
 
25
//r10.0 thru r41.0
26
.declare DEST_B		Base=REG(r,10)	ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
27
.declare DEST_G		Base=REG(r,18)	ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
28
.declare DEST_R		Base=REG(r,26)	ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
29
.declare DEST_A		Base=REG(r,34)	ElementSize=2 SrcRegion=REGION(8,1) DstRegion=<1> Type=uw
30
 
31
//r56.0 thru r79.0
32
.declare	SCALE_RESPONSE_YF  	Base=REG(r,nBOT_Y) 	ElementSize=4 SrcRegion=REGION(8,1) Type=f
33
.declare	SCALE_RESPONSE_UF  	Base=REG(r,nBOT_U) 	ElementSize=4 SrcRegion=REGION(8,1) Type=f
34
.declare	SCALE_RESPONSE_VF  	Base=REG(r,nBOT_V) 	ElementSize=4 SrcRegion=REGION(8,1) Type=f
35
 
36
.declare	SCALE_RESPONSE_YW  	Base=REG(r,nBOT_Y) 	ElementSize=2 SrcRegion=REGION(16,1) Type=uw
37
.declare	SCALE_RESPONSE_UW  	Base=REG(r,nBOT_U) 	ElementSize=2 SrcRegion=REGION(16,1) Type=uw
38
.declare	SCALE_RESPONSE_VW  	Base=REG(r,nBOT_V) 	ElementSize=2 SrcRegion=REGION(16,1) Type=uw
39
 
40
.declare	SCALE_RESPONSE_YD  	Base=REG(r,nBOT_Y) 	ElementSize=4 SrcRegion=REGION(8,1) Type=ud
41
.declare	SCALE_RESPONSE_UD  	Base=REG(r,nBOT_U) 	ElementSize=4 SrcRegion=REGION(8,1) Type=ud
42
.declare	SCALE_RESPONSE_VD  	Base=REG(r,nBOT_V) 	ElementSize=4 SrcRegion=REGION(8,1) Type=ud
43
 
44
.declare	SCALE_RESPONSE_YB  	Base=REG(r,nBOT_Y) 	ElementSize=1 SrcRegion=REGION(8,4) Type=ub
45
.declare	SCALE_RESPONSE_UB  	Base=REG(r,nBOT_U) 	ElementSize=1 SrcRegion=REGION(8,4) Type=ub
46
.declare	SCALE_RESPONSE_VB  	Base=REG(r,nBOT_V) 	ElementSize=1 SrcRegion=REGION(8,4) Type=ub
47
 
48
.declare	SAMPLER_RAMP   	Base=REG(r,42) ElementSize=4 SrcRegion=<8;8,1> Type=f	// 2 GRFs, 16 elements
49
 
50
//#define	SCALE_STEP_X	REG2(r,43,0)
51
//#define	SCALE_COORD_X	REG2(r,43,3)
52
 
53
#define SCALE_LINE_P255			REG2(r,43,4)	// = 255.0	Used in 'line' inst to multiply 255, add 0.5, and round to int.
54
#define SCALE_LINE_P0_5			REG2(r,43,7)	// = 0.5
55
 
56
//r44.0 thru r45.0
57
#define SCALE_COORD_Y		REG(r,44)	//2GRF
58
 
59
 
60
// Send Message [DevILK]                                Message Descriptor
61
//  MBZ MsgL=5 MsgR=8                            H MBZ   SIMD     MsgType   SmplrIndx BindTab
62
//  000 0 101 0 1000                             1  0     10     0000         0000    00000000
63
//    0     A    8                                     A             0             0     0     0
64
//     MsgL=1+2*2(u,v)=5 MsgR=8
65
#define SMPLR_MSG_DSC		0x0A8A0000	// ILK Sampler Message Descriptor
66
 
67
// Re-define new number of lines
68
#undef nY_NUM_OF_ROWS
69
#undef nUV_NUM_OF_ROWS
70
 
71
#define nY_NUM_OF_ROWS      8
72
#define nUV_NUM_OF_ROWS     8
73
 
74
 
75
#endif 	//_SCALING_INC_