summaryrefslogtreecommitdiff
path: root/src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-10-13 03:07:45 +0800
committerSean V Kelley <seanvk@posteo.de>2016-10-24 15:36:55 -0700
commit78b6841fa3e247f15005ea3450d8404c59938ac3 (patch)
treeec06b2eec1fbd93ef3f8802ee11a09484cfcf45b /src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a
parent852cea1cdfc83e0b6531dfefda14badafc9ee206 (diff)
Use Media Read message if possible on Gen8+
AVS can't gurantee bit-match for a large surface. This fixes the failure reported by gtest case Common/JPEGEncodeInputTest.Full/95. before: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms) [----------] 1 test from Common/JPEGEncodeInputTest (9239 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (9361 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") after: [ OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms) [----------] 1 test from Common/JPEGEncodeInputTest (15250 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (15365 ms total) [ PASSED ] 1 test. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a')
-rw-r--r--src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a b/src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a
new file mode 100644
index 0000000..5a46019
--- /dev/null
+++ b/src/shaders/post_processing/gen8/PL2_media_read_buf0123.g8a
@@ -0,0 +1,65 @@
+
+ and.nz.f0.0 (1) null<1>:uw r2.3:uw 0x2:uw
+ (-f0.0)jmpi (1) __SKIP_MEDIA_READ
+
+ mov (8) r28<1>:ud r27<8;8,1>:ud
+ mov (2) r28.0<1>:d r9.0<2;2,1>:w //ORI Y (LUMA) = ORI
+ mov (1) r28.2<1>:ud 0xF000F:ud // Y Block width and height (16x16)
+
+ send (1) r29<1>:d r28 0xc 0x2890003:ud
+
+ /* Save data in uwBuffer, it is not an efficient way, but we can re-use Save_AVS_NV12.g8a and Save_AVS_PL3.g8a */
+ shl (16) uwBUFFER_0(0)<1> r29.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_0(1)<1> r29.16<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_0(2)<1> r30.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_0(3)<1> r30.16<16;16,1>:ub 8:w
+
+ shl (16) uwBUFFER_1(0)<1> r31.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_1(1)<1> r31.16<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_1(2)<1> r32.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_1(3)<1> r32.16<16;16,1>:ub 8:w
+
+ shl (16) uwBUFFER_2(0)<1> r33.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_2(1)<1> r33.16<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_2(2)<1> r34.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_2(3)<1> r34.16<16;16,1>:ub 8:w
+
+ shl (16) uwBUFFER_3(0)<1> r35.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_3(1)<1> r35.16<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_3(2)<1> r36.0<16;16,1>:ub 8:w
+ shl (16) uwBUFFER_3(3)<1> r36.16<16;16,1>:ub 8:w
+
+ mov (8) r37<1>:ud r27<8;8,1>:ud
+ mov (1) r37.0<1>:d r9.0<0;1,0>:w
+ shr (1) r37.1<1>:d r9.1<0;1,0>:w 1:w
+ mov (1) r37.2<1>:ud 0x7000F:ud // U Block width and height (8x8)
+
+ send (1) r38<1>:d r37 0xc 0x2490004:ud
+
+ shl (8) uwBUFFER_0(4)<2> r38.0<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_0(6)<2> r38.16<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_1(4)<2> r39.0<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_1(6)<2> r39.16<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_2(4)<2> r40.0<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_2(6)<2> r40.16<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_3(4)<2> r41.0<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_3(6)<2> r41.16<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_0(8)<2> r38.1<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_0(10)<2> r38.17<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_1(8)<2> r39.1<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_1(10)<2> r39.17<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_2(8)<2> r40.1<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_2(10)<2> r40.17<16;8,2>:ub 8:w
+
+ shl (8) uwBUFFER_3(8)<2> r41.1<16;8,2>:ub 8:w
+ shl (8) uwBUFFER_3(10)<2> r41.17<16;8,2>:ub 8:w
+
+ jmpi (1) __SAVE_BUF0123
+
+__SKIP_MEDIA_READ: \ No newline at end of file