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 * Zhang Hua jun <huajun.zhang@intel.com> 2603b705cfSriastradh * Xing Dong sheng <dongsheng.xing@intel.com> 2703b705cfSriastradh * 2803b705cfSriastradh */ 2903b705cfSriastradh 3003b705cfSriastradh/* shader for backward predict mc 3103b705cfSriastradh*/ 3203b705cfSriastradh 3303b705cfSriastradh/* save payload */ 3403b705cfSriastradhmov (8) g76.0<1>UD g1.0<8,8,1>UD {align1}; 3503b705cfSriastradh//mov (8) g77.0<1>UD g2.0<8,8,1>UD {align1}; 3603b705cfSriastradh 3703b705cfSriastradhinclude(`block_clear.g4i') 3803b705cfSriastradh 3903b705cfSriastradhmov (8) g115.0<1>UD g1.0<8,8,1>UD {align1}; 4003b705cfSriastradhmov (1) g1.8<1>UD 0x0070007UD {align1}; 4103b705cfSriastradhdefine(`input_surface', `4') 4203b705cfSriastradhdefine(`mv1', `g115.14') 4303b705cfSriastradhdefine(`mv2', `g115.16') 4403b705cfSriastradh/* Y */ 4503b705cfSriastradh/* (x', y') = (x, y) + (motion_vector.x >> 1, motion_vector.y >> 1) */ 4603b705cfSriastradhasr (2) g1.14<1>W g115.14<2,2,1>W 1W {align1}; 4703b705cfSriastradhadd (2) g2.0<1>UD g115.0<2,2,1>UD g1.14<2,2,1>W {align1}; 4803b705cfSriastradhinclude(`motion_frame_y.g4i') 4903b705cfSriastradh/* motion_vector = motion_vector >> 1 */ 5003b705cfSriastradh/* (x', y') = (x, y) + (motion_vector.x >> 1, motion_vector.y >> 1) */ 5103b705cfSriastradh/* U */ 5203b705cfSriastradhshr (2) g1.0<1>UD g115.0<2,2,1>UD 1UD {align1}; 5303b705cfSriastradhasr (2) g115.14<1>W g115.14<2,2,1>W 1W {align1}; 5403b705cfSriastradhasr (2) g1.14<1>W g115.14<2,2,1>W 1W {align1}; 5503b705cfSriastradhadd (2) g2.0<1>UD g1.0<2,2,1>UD g1.14<2,2,1>W {align1}; 5603b705cfSriastradhdefine(`input_surface1', `5') 5703b705cfSriastradhdefine(`input_surface2', `6') 5803b705cfSriastradhmov (1) g2.8<1>UD 0x007000fUD {align1}; 5903b705cfSriastradhinclude(`motion_frame_uv.g4i') 6003b705cfSriastradh/* V */ 6103b705cfSriastradh/* (x', y') = (x, y) + (motion_vector.x >> 1, motion_vector.y >> 1) */ 6203b705cfSriastradhinclude(`addidct.g4i') 6303b705cfSriastradh 6403b705cfSriastradhsend (16) 0 acc0<1>UW g0<8,8,1>UW 6503b705cfSriastradh thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT}; 66