103b705cfSriastradh/* 203b705cfSriastradh * Copyright © 2008 Intel Corporation 303b705cfSriastradh * 403b705cfSriastradh * Permission is hereby granted, free of charge, to any person obtaining a 503b705cfSriastradh * copy of this software and associated documentation files (the "Software"), 603b705cfSriastradh * to deal in the Software without restriction, including without limitation 703b705cfSriastradh * the rights to use, copy, modify, merge, publish, distribute, sublicense, 803b705cfSriastradh * and/or sell copies of the Software, and to permit persons to whom the 903b705cfSriastradh * Software is furnished to do so, subject to the following conditions: 1003b705cfSriastradh * 1103b705cfSriastradh * The above copyright notice and this permission notice (including the next 1203b705cfSriastradh * paragraph) shall be included in all copies or substantial portions of the 1303b705cfSriastradh * Software. 1403b705cfSriastradh * 1503b705cfSriastradh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1603b705cfSriastradh * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1703b705cfSriastradh * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1803b705cfSriastradh * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1903b705cfSriastradh * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2003b705cfSriastradh * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 2103b705cfSriastradh * SOFTWARE. 2203b705cfSriastradh * 2303b705cfSriastradh * Author: 2403b705cfSriastradh * Zou Nan hai <nanhai.zou@intel.com> 2503b705cfSriastradh * Yan Li <li.l.yan@intel.com> 2603b705cfSriastradh * Liu Xi bin<xibin.liu@intel.com> 2703b705cfSriastradh */ 2803b705cfSriastradh/* GRF allocation: 2903b705cfSriastradh g1~g30: constant buffer 3003b705cfSriastradh g1~g2:intra IQ matrix 3103b705cfSriastradh g3~g4:non intra IQ matrix 3203b705cfSriastradh g5~g20:IDCT table 3303b705cfSriastradh g112~g115: intra IQ matrix in UW format (in order to use instruction compress), copys from g1~g2 3403b705cfSriastradh g[a0.0]:DCT data of a block 3503b705cfSriastradh g125: ip before jump 3603b705cfSriastradh if(v==0 && u==0 && intra_mb) 3703b705cfSriastradh F''[v][u] = QF[v][u] * intra_dc_mult 3803b705cfSriastradh else 3903b705cfSriastradh F''[v][u] = (QF[v][u]*W[w][v][u]*quantiser_scale*2)/32 4003b705cfSriastradh*/ 4103b705cfSriastradhDO_IQ_INTRA: 4203b705cfSriastradhadd (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1}; 4303b705cfSriastradhmov (1) g111.0<1>W g[a0.0]<1,1,1>W {align1}; 4403b705cfSriastradhmul (16) g116.0<1>D g[a0.0]<8,8,1>W g112.0<8,8,1>UW {align1 compr}; 4503b705cfSriastradhmul (16) g116.0<1>D g116.0<8,8,1>D g109.0<8,8,0>UW {align1 compr}; 4603b705cfSriastradhasr (16) g116.0<1>D g116.0<8,8,1>D 4UW {align1 compr}; 4703b705cfSriastradhmul (1) g116.0<1>D g111<1,1,1>W g109.4<1,1,1>UW {align1}; //intra_dc_mult 4803b705cfSriastradh 4903b705cfSriastradhadd (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1}; 5003b705cfSriastradhmul (16) g118.0<1>D g[a0.0]<8,8,1>W g113.0<8,8,1>UW {align1 compr}; 5103b705cfSriastradhmul (16) g118.0<1>D g118.0<8,8,1>D g109.0<8,8,0>UW {align1 compr}; 5203b705cfSriastradhasr (16) g118.0<1>D g118.0<8,8,1>D 4UW {align1 compr}; 5303b705cfSriastradh 5403b705cfSriastradhadd (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1}; 5503b705cfSriastradhmul (16) g120.0<1>D g[a0.0]<8,8,1>W g114.0<8,8,1>UW {align1 compr}; 5603b705cfSriastradhmul (16) g120.0<1>D g120.0<8,8,1>D g109.0<8,8,0>UW {align1 compr}; 5703b705cfSriastradhasr (16) g120.0<1>D g120.0<8,8,1>D 4UW {align1 compr}; 5803b705cfSriastradh 5903b705cfSriastradhadd (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1}; 6003b705cfSriastradhmul (16) g122.0<1>D g[a0.0]<8,8,1>W g115.0<8,8,1>UW {align1 compr}; 6103b705cfSriastradhmul (16) g122.0<1>D g122.0<8,8,1>D g109.0<8,8,0>UW {align1 compr}; 6203b705cfSriastradhasr (16) g122.0<1>D g122.0<8,8,1>D 4UW {align1 compr}; 6303b705cfSriastradh 6403b705cfSriastradhadd (1) ip g125.0<1,1,1>UD 0x20UD {align1}; //jump back 65