├── AUTHORS ├── COPYING ├── Makefile.am ├── NEWS ├── README ├── README.md ├── autogen.sh ├── configure.ac ├── debian.upstream ├── Makefile.am ├── changelog.in ├── compat ├── control.in ├── copyright ├── libva-intel-driver.install └── rules └── src ├── Android.mk ├── Makefile.am ├── dso_utils.c ├── dso_utils.h ├── i965_mutext.h ├── i965_output_wayland.c ├── i965_output_wayland.h ├── intel_compiler.h ├── media_drv_batchbuffer.c ├── media_drv_batchbuffer.h ├── media_drv_common.c ├── media_drv_common.h ├── media_drv_data.h ├── media_drv_decoder.c ├── media_drv_decoder.h ├── media_drv_defines.h ├── media_drv_driver.c ├── media_drv_driver.h ├── media_drv_encoder.c ├── media_drv_encoder.h ├── media_drv_encoder_vp8.c ├── media_drv_encoder_vp8.h ├── media_drv_encoder_vp8_g7.c ├── media_drv_encoder_vp8_g7.h ├── media_drv_gen75_render.c ├── media_drv_gen8_render.c ├── media_drv_gen9_render.c ├── media_drv_gpe_utils.c ├── media_drv_gpe_utils.h ├── media_drv_hw.c ├── media_drv_hw.h ├── media_drv_hw_g7.c ├── media_drv_hw_g7.h ├── media_drv_hw_g75.c ├── media_drv_hw_g75.h ├── media_drv_hw_g8.c ├── media_drv_hw_g8.h ├── media_drv_hw_g9.c ├── media_drv_hw_g9.h ├── media_drv_hwcmds.c ├── media_drv_hwcmds.h ├── media_drv_hwcmds_g8.c ├── media_drv_hwcmds_g8.h ├── media_drv_hybrid_vp9_common.cpp ├── media_drv_hybrid_vp9_common.h ├── media_drv_init.c ├── media_drv_init.h ├── media_drv_kernels.c ├── media_drv_kernels.h ├── media_drv_kernels_g7.c ├── media_drv_kernels_g7.h ├── media_drv_output_dri.c ├── media_drv_output_dri.h ├── media_drv_render.c ├── media_drv_render.h ├── media_drv_surface.c ├── media_drv_surface.h ├── media_drv_util.c ├── media_drv_util.h ├── media_render_common.h ├── object_heap.c ├── object_heap.h ├── shaders ├── Makefile ├── Makefile.am ├── Makefile.in ├── gpp.py ├── render │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── exa_sf.g4a │ ├── exa_sf.g4b │ ├── exa_sf.g4b.gen5 │ ├── exa_wm.g4i │ ├── exa_wm_affine.g4i │ ├── exa_wm_src_affine.g4a │ ├── exa_wm_src_affine.g4b │ ├── exa_wm_src_affine.g4b.gen5 │ ├── exa_wm_src_affine.g6a │ ├── exa_wm_src_affine.g6b │ ├── exa_wm_src_affine.g7a │ ├── exa_wm_src_affine.g7b │ ├── exa_wm_src_affine.g8a │ ├── exa_wm_src_affine.g8b │ ├── exa_wm_src_affine.g9b │ ├── exa_wm_src_sample_argb.g4a │ ├── exa_wm_src_sample_argb.g4b │ ├── exa_wm_src_sample_argb.g4b.gen5 │ ├── exa_wm_src_sample_argb.g6a │ ├── exa_wm_src_sample_argb.g6b │ ├── exa_wm_src_sample_argb.g7a │ ├── exa_wm_src_sample_argb.g7b │ ├── exa_wm_src_sample_argb.g8a │ ├── exa_wm_src_sample_argb.g8b │ ├── exa_wm_src_sample_argb.g9b │ ├── exa_wm_src_sample_planar.g4a │ ├── exa_wm_src_sample_planar.g4b │ ├── exa_wm_src_sample_planar.g4b.gen5 │ ├── exa_wm_src_sample_planar.g6a │ ├── exa_wm_src_sample_planar.g6b │ ├── exa_wm_src_sample_planar.g7a │ ├── exa_wm_src_sample_planar.g7b │ ├── exa_wm_src_sample_planar.g7b.haswell │ ├── exa_wm_src_sample_planar.g8a │ ├── exa_wm_src_sample_planar.g8b │ ├── exa_wm_src_sample_planar.g9b │ ├── exa_wm_write.g4a │ ├── exa_wm_write.g4b │ ├── exa_wm_write.g4b.gen5 │ ├── exa_wm_write.g6a │ ├── exa_wm_write.g6b │ ├── exa_wm_write.g7a │ ├── exa_wm_write.g7b │ ├── exa_wm_write.g8a │ ├── exa_wm_write.g8b │ ├── exa_wm_write.g9b │ ├── exa_wm_xy.g4a │ ├── exa_wm_xy.g4b │ ├── exa_wm_xy.g4b.gen5 │ ├── exa_wm_yuv_color_balance.g4a │ ├── exa_wm_yuv_color_balance.g4b │ ├── exa_wm_yuv_color_balance.g4b.gen5 │ ├── exa_wm_yuv_color_balance.g6a │ ├── exa_wm_yuv_color_balance.g6b │ ├── exa_wm_yuv_color_balance.g7a │ ├── exa_wm_yuv_color_balance.g7b │ ├── exa_wm_yuv_color_balance.g7b.haswell │ ├── exa_wm_yuv_color_balance.g8a │ ├── exa_wm_yuv_color_balance.g8b │ ├── exa_wm_yuv_color_balance.g9b │ ├── exa_wm_yuv_color_balance.gxa │ ├── exa_wm_yuv_rgb.g4a │ ├── exa_wm_yuv_rgb.g4b │ ├── exa_wm_yuv_rgb.g4b.gen5 │ ├── exa_wm_yuv_rgb.g6a │ ├── exa_wm_yuv_rgb.g6b │ ├── exa_wm_yuv_rgb.g7a │ ├── exa_wm_yuv_rgb.g7b │ ├── exa_wm_yuv_rgb.g8a │ ├── exa_wm_yuv_rgb.g8b │ ├── exa_wm_yuv_rgb.g9b │ ├── exa_yuv_gen4.g4i │ ├── exa_yuv_gen6.g4i │ └── exa_yuv_rgb.gxa └── utils │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── end_thread.asm │ ├── mfc_batchbuffer.inc │ ├── mfc_batchbuffer_avc_inter.asm │ ├── mfc_batchbuffer_avc_inter.g6a │ ├── mfc_batchbuffer_avc_inter.g6b │ ├── mfc_batchbuffer_avc_inter.g7a │ ├── mfc_batchbuffer_avc_inter.g7b │ ├── mfc_batchbuffer_avc_intra.asm │ ├── mfc_batchbuffer_avc_intra.g6a │ ├── mfc_batchbuffer_avc_intra.g6b │ ├── mfc_batchbuffer_avc_intra.g7a │ ├── mfc_batchbuffer_avc_intra.g7b │ ├── mfc_batchbuffer_head.asm │ ├── mfc_batchbuffer_hsw.asm │ ├── mfc_batchbuffer_hsw.g75a │ ├── mfc_batchbuffer_hsw.g75b │ ├── mfc_batchbuffer_hsw.inc │ └── mfc_batchbuffer_tail.asm ├── sysdeps.h ├── va_backend_compat.h ├── va_private.h ├── vp9hdec ├── LIBVPX_AUTHORS ├── LIBVPX_PATENTS ├── Makefile.am ├── cmrt_api.h ├── decode_hybrid_vp9.cpp ├── decode_hybrid_vp9.h ├── intel_hybrid_common_vp9.h ├── intel_hybrid_debug_dump.cpp ├── intel_hybrid_debug_dump.h ├── intel_hybrid_hostvld_vp9.cpp ├── intel_hybrid_hostvld_vp9.h ├── intel_hybrid_hostvld_vp9_context.cpp ├── intel_hybrid_hostvld_vp9_context.h ├── intel_hybrid_hostvld_vp9_context_tables.h ├── intel_hybrid_hostvld_vp9_engine.cpp ├── intel_hybrid_hostvld_vp9_engine.h ├── intel_hybrid_hostvld_vp9_internal.h ├── intel_hybrid_hostvld_vp9_loopfilter.cpp ├── intel_hybrid_hostvld_vp9_loopfilter.h ├── intel_hybrid_hostvld_vp9_parser.cpp ├── intel_hybrid_hostvld_vp9_parser.h ├── intel_hybrid_hostvld_vp9_parser_tables.h ├── intel_hybrid_vp9_kernel_g75.cpp ├── intel_hybrid_vp9_kernel_g8.cpp ├── intel_hybrid_vp9_kernel_g8lp.cpp └── intel_hybrid_vp9_kernel_g9.cpp ├── wayland-drm-client-protocol.h └── wayland ├── Makefile ├── Makefile.am ├── Makefile.in └── wayland-drm.xml /AUTHORS: -------------------------------------------------------------------------------- 1 | intel Linux graphics/media team working on the driver: 2 | 3 | Daniel Charles 4 | Sean V Kelley 5 | Sameer Kibey 6 | Midhunchandra Kodiyath 7 | Wei W Lin 8 | Lina Sun 9 | Haihao Xiang 10 | Yakui Zhao 11 | 12 | 13 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a 2 | copy of this software and associated documentation files (the 3 | "Software"), to deal in the Software without restriction, including 4 | without limitation the rights to use, copy, modify, merge, publish, 5 | distribute, sub license, and/or sell copies of the Software, and to 6 | permit persons to whom the Software is furnished to do so, subject to 7 | the following conditions: 8 | 9 | The above copyright notice and this permission notice (including the 10 | next paragraph) shall be included in all copies or substantial portions 11 | of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 16 | IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 17 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 18 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 19 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign 2 | 3 | SUBDIRS = debian.upstream src 4 | 5 | # Extra clean files so that maintainer-clean removes *everything* 6 | MAINTAINERCLEANFILES = \ 7 | aclocal.m4 compile config.guess config.sub \ 8 | configure depcomp install-sh ltmain.sh \ 9 | Makefile.in missing 10 | 11 | DEB_BUILDDIR = debian.build 12 | 13 | deb: 14 | @[ -d debian ] || ln -s debian.upstream debian 15 | dpkg-buildpackage -rfakeroot -uc -us 16 | 17 | deb.upstream: dist 18 | -mkdir -p $(DEB_BUILDDIR) 19 | cd $(DEB_BUILDDIR) && \ 20 | rm -rf $(PACKAGE)-$(VERSION) && \ 21 | tar zxvf ../$(PACKAGE)-$(VERSION).tar.gz && \ 22 | cd $(PACKAGE)-$(VERSION) && \ 23 | $(MAKE) deb -f Makefile.am 24 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | intel-hybrid-driver NEWS -- summary of changes. 2016-08-10 2 | Copyright (C) 2016 Intel Corporation 3 | 4 | Version 1.0.2 - 2016-08-10 5 | * Remove hard coded libdrm_intel dep 6 | * Fix libcmrt library checking and linkage 7 | * Fix out-of-tree builds 8 | 9 | Version 1.0.1 - 2015-09-09 10 | * Fix the CMRT name to libcmrt.so 11 | * Clean compiler warnings 12 | 13 | Version 1.0.0 - 2015-09-02 14 | * Initial release supporting CrOS 15 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | libva-intel-hybrid-driver 2 | VA driver for Intel G45 & HD Graphics family 3 | Copyright (C) 2009-2015 Intel Corporation 4 | 5 | License 6 | ------- 7 | Please read the COPYING file available in this package. 8 | 9 | Overview 10 | -------- 11 | libva-intel-hybrid-driver is the VA-API implementation for Intel G45 chipsets 12 | and Intel HD Graphics for Intel Core processor family. 13 | 14 | Platform definitions: 15 | HSW: Haswell 16 | BYT: Bay-Trail-M 17 | BDW: Broadwell 18 | BSW: Braswell 19 | 20 | Codecs 21 | ------ 22 | Hybrid VP8 Encoder 23 | Hybrid VP9 Decoder 24 | 25 | Requirements 26 | ------------ 27 | libva >= 1.0.16 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DISCONTINUATION OF PROJECT. 2 | 3 | This project will no longer be maintained by Intel. 4 | 5 | Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project. 6 | 7 | Intel no longer accepts patches to this project. 8 | 9 | If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project. 10 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | autoreconf -v --install 4 | 5 | if test -z "$NOCONFIGURE"; then 6 | ./configure "$@" 7 | fi 8 | -------------------------------------------------------------------------------- /debian.upstream/Makefile.am: -------------------------------------------------------------------------------- 1 | DEBIANFILES = \ 2 | changelog.in \ 3 | compat \ 4 | control.in \ 5 | copyright \ 6 | libva-intel-driver.install \ 7 | rules \ 8 | $(NULL) 9 | 10 | DEBIANGENFILES = \ 11 | changelog \ 12 | control \ 13 | $(NULL) 14 | 15 | EXTRA_DIST = $(DEBIANFILES) 16 | 17 | dist_noinst_DATA = $(DEBIANGENFILES) 18 | 19 | # Extra clean files so that maintainer-clean removes *everything* 20 | MAINTAINERCLEANFILES = Makefile.in $(DEBIANGENFILES) 21 | 22 | $(DEBIANGENFILES): %: %.in Makefile 23 | -$(AM_V_GEN)sed \ 24 | -e 's|\@DATE\@|'"`LC_ALL=C date +'%a, %d %b %Y %X %z'`"'|' \ 25 | -e 's|\@LIBDRM_VERSION\@|$(LIBDRM_VERSION)|' \ 26 | -e 's|\@LIBVA_PACKAGE_VERSION\@|$(LIBVA_PACKAGE_VERSION)|' \ 27 | -e 's|\@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|' \ 28 | $< > $@ 29 | -------------------------------------------------------------------------------- /debian.upstream/changelog.in: -------------------------------------------------------------------------------- 1 | libva-intel-driver (@PACKAGE_VERSION@-1) unstable; urgency=low 2 | 3 | * Autogenerated package, see NEWS file for ChangeLog. 4 | 5 | -- Gwenole Beauchesne @DATE@ 6 | -------------------------------------------------------------------------------- /debian.upstream/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /debian.upstream/control.in: -------------------------------------------------------------------------------- 1 | Source: libva-intel-driver 2 | Section: libs 3 | Priority: optional 4 | Maintainer: Gwenole Beauchesne 5 | Build-Depends: debhelper (>= 5), 6 | cdbs, 7 | libdrm-dev (>= @LIBDRM_VERSION@), 8 | libva-dev (>= @LIBVA_PACKAGE_VERSION@) 9 | Standards-Version: 3.7.2 10 | 11 | Package: libva-intel-driver 12 | Section: libs 13 | Architecture: any 14 | Depends: libva1 (>= @LIBVA_PACKAGE_VERSION@), 15 | ${shlibs:Depends}, ${misc:Depends} 16 | Description: VA driver for Intel G45 & HD Graphics family 17 | Video decode & encode driver for Intel G45 chipsets and Intel HD 18 | Graphics for Intel Core processor family. 19 | 20 | Package: libva-intel-driver-dbg 21 | Section: libdevel 22 | Architecture: any 23 | Depends: libva-intel-driver (= ${Source-Version}) 24 | Description: VA driver for Intel G45 & HD Graphics family (debug symbols) 25 | Video decode & encode driver for Intel G45 chipsets and Intel HD 26 | Graphics for Intel Core processor family. 27 | . 28 | This package contains the debug files. 29 | -------------------------------------------------------------------------------- /debian.upstream/copyright: -------------------------------------------------------------------------------- 1 | This package is maintained by: 2 | Gwenole Beauchesne 3 | 4 | 5 | License: 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a 8 | copy of this software and associated documentation files (the 9 | "Software"), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sub license, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the 16 | next paragraph) shall be included in all copies or substantial portions 17 | of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 22 | IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 23 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /debian.upstream/libva-intel-driver.install: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/lib/dri/*.so 2 | -------------------------------------------------------------------------------- /debian.upstream/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | include /usr/share/cdbs/1/rules/debhelper.mk 4 | include /usr/share/cdbs/1/class/autotools.mk 5 | include /usr/share/cdbs/1/rules/utils.mk 6 | 7 | # Allow SMP build 8 | ifeq ($(DEBIAN_BUILD_NCPUS),) 9 | DEBIAN_BUILD_NCPUS = $(shell /usr/bin/getconf _NPROCESSORS_ONLN) 10 | endif 11 | ifneq ($(DEBIAN_BUILD_NCPUS),) 12 | EXTRA_MAKE_FLAGS += -j$(DEBIAN_BUILD_NCPUS) 13 | endif 14 | MAKE += $(EXTRA_MAKE_FLAGS) 15 | -------------------------------------------------------------------------------- /src/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Intel Corporation. All Rights Reserved. 2 | # 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the 6 | # "Software"), to deal in the Software without restriction, including 7 | # without limitation the rights to use, copy, modify, merge, publish, 8 | # distribute, sub license, and/or sell copies of the Software, and to 9 | # permit persons to whom the Software is furnished to do so, subject to 10 | # the following conditions: 11 | # 12 | # The above copyright notice and this permission notice (including the 13 | # next paragraph) shall be included in all copies or substantial portions 14 | # of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | # IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | # 24 | 25 | LOCAL_PATH:= $(call my-dir) 26 | 27 | include $(CLEAR_VARS) 28 | 29 | LOCAL_SRC_FILES := \ 30 | gen6_mfc_common.c \ 31 | gen6_mfc.c \ 32 | gen6_mfd.c \ 33 | gen6_vme.c \ 34 | gen7_mfd.c \ 35 | gen7_mfc.c \ 36 | gen7_vme.c \ 37 | gen75_mfc.c \ 38 | gen75_mfd.c \ 39 | gen75_vme.c \ 40 | gen75_picture_process.c \ 41 | gen75_vpp_vebox.c \ 42 | gen75_vpp_gpe.c \ 43 | i965_avc_bsd.c \ 44 | i965_avc_hw_scoreboard.c\ 45 | i965_avc_ildb.c \ 46 | i965_decoder_utils.c \ 47 | i965_drv_video.c \ 48 | i965_encoder.c \ 49 | i965_encoder_utils.c \ 50 | i965_gpe_utils.c \ 51 | i965_media.c \ 52 | i965_media_h264.c \ 53 | i965_media_mpeg2.c \ 54 | i965_post_processing.c \ 55 | i965_render.c \ 56 | intel_media_common.c \ 57 | intel_batchbuffer.c \ 58 | intel_batchbuffer_dump.c\ 59 | intel_driver.c \ 60 | intel_memman.c \ 61 | object_heap.c 62 | 63 | LOCAL_CFLAGS := -DLINUX -DANDROID -g -Wall -Wno-unused -fvisibility=hidden 64 | 65 | LOCAL_C_INCLUDES := \ 66 | $(TARGET_OUT_HEADERS)/libva \ 67 | $(TARGET_OUT_HEADERS)/libdrm 68 | 69 | LOCAL_MODULE_TAGS := optional 70 | LOCAL_MODULE := i965_drv_video 71 | 72 | LOCAL_SHARED_LIBRARIES := libdl libdrm libdrm_intel libcutils \ 73 | libva libva-android libstdc++ 74 | 75 | ifeq ($(strip $(DRIVER_LOG_ENABLE)),true) 76 | LOCAL_CFLAGS += -DDRIVER_LOG_ENABLE 77 | LOCAL_SHARED_LIBRARIES += liblog 78 | endif 79 | 80 | include $(BUILD_SHARED_LIBRARY) 81 | 82 | 83 | -------------------------------------------------------------------------------- /src/dso_utils.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #define _GNU_SOURCE 1 26 | #include 27 | #include 28 | #include 29 | #include "dso_utils.h" 30 | 31 | struct dso_handle { 32 | void *handle; 33 | }; 34 | 35 | /* Opens the named shared library */ 36 | struct dso_handle * 37 | dso_open(const char *path) 38 | { 39 | struct dso_handle *h; 40 | 41 | h = calloc(1, sizeof(*h)); 42 | if (!h) 43 | return NULL; 44 | 45 | if (path) { 46 | h->handle = dlopen(path, RTLD_LAZY|RTLD_LOCAL); 47 | if (!h->handle) 48 | goto error; 49 | } 50 | else 51 | h->handle = RTLD_DEFAULT; 52 | return h; 53 | 54 | error: 55 | dso_close(h); 56 | return NULL; 57 | } 58 | 59 | /* Closes and disposed any allocated data */ 60 | void 61 | dso_close(struct dso_handle *h) 62 | { 63 | if (!h) 64 | return; 65 | 66 | if (h->handle) { 67 | if (h->handle != RTLD_DEFAULT) 68 | dlclose(h->handle); 69 | h->handle = NULL; 70 | } 71 | free(h); 72 | } 73 | 74 | /* Load symbol into the supplied location */ 75 | static bool 76 | get_symbol(struct dso_handle *h, void *func_vptr, const char *name) 77 | { 78 | dso_generic_func func, * const func_ptr = func_vptr; 79 | const char *error; 80 | 81 | dlerror(); 82 | func = (dso_generic_func)dlsym(h->handle, name); 83 | error = dlerror(); 84 | if (error) { 85 | fprintf(stderr, "error: failed to resolve %s(): %s\n", name, error); 86 | return false; 87 | } 88 | *func_ptr = func; 89 | return true; 90 | } 91 | 92 | /* Loads symbols into the supplied vtable */ 93 | bool 94 | dso_get_symbols( 95 | struct dso_handle *h, 96 | void *vtable, 97 | unsigned int vtable_length, 98 | const struct dso_symbol *symbols 99 | ) 100 | { 101 | const struct dso_symbol *s; 102 | 103 | for (s = symbols; s->name != NULL; s++) { 104 | if (s->offset + sizeof(dso_generic_func) > vtable_length) 105 | return false; 106 | if (!get_symbol(h, ((char *)vtable) + s->offset, s->name)) 107 | return false; 108 | } 109 | return true; 110 | } 111 | -------------------------------------------------------------------------------- /src/dso_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifndef DSO_UTILS_H 26 | #define DSO_UTILS_H 27 | 28 | #include 29 | 30 | /** Generic pointer to function. */ 31 | typedef void (*dso_generic_func)(void); 32 | 33 | /** Library handle (opaque). */ 34 | struct dso_handle; 35 | 36 | /** Symbol lookup table. */ 37 | struct dso_symbol { 38 | /** Symbol name */ 39 | const char *name; 40 | /** Offset into the supplied vtable where symbol is to be loaded. */ 41 | unsigned int offset; 42 | }; 43 | 44 | /** 45 | * Opens the named shared library. 46 | * 47 | * @param[in] path the library name, or NULL to lookup into loaded libraries 48 | * @return the newly allocated library handle 49 | */ 50 | struct dso_handle * 51 | dso_open(const char *path); 52 | 53 | /** Closes and disposed any allocated data. */ 54 | void 55 | dso_close(struct dso_handle *h); 56 | 57 | /** 58 | * Loads symbols into the supplied vtable. 59 | * 60 | * @param[in] handle the DSO handle 61 | * @param[in] vtable the function table to fill in 62 | * @param[in] vtable_length the size (in bytes) of the function table 63 | * @param[in] symbols the NULL terminated array of symbols to lookup 64 | * @return true on success, false otherwise 65 | **/ 66 | bool 67 | dso_get_symbols( 68 | struct dso_handle *h, 69 | void *vtable, 70 | unsigned int vtable_length, 71 | const struct dso_symbol *symbols 72 | ); 73 | 74 | #endif /* DSO_UTILS_H */ 75 | -------------------------------------------------------------------------------- /src/i965_mutext.h: -------------------------------------------------------------------------------- 1 | #ifndef _I965_MUTEX_H_ 2 | #define _I965_MUTEX_H_ 3 | 4 | #include "intel_compiler.h" 5 | 6 | #if defined PTHREADS 7 | #include 8 | 9 | typedef pthread_mutex_t _I965Mutex; 10 | 11 | static INLINE void _i965InitMutex(_I965Mutex *m) 12 | { 13 | pthread_mutex_init(m, NULL); 14 | } 15 | 16 | static INLINE void 17 | _i965DestroyMutex(_I965Mutex *m) 18 | { 19 | pthread_mutex_destroy(m); 20 | } 21 | 22 | static INLINE void 23 | _i965LockMutex(_I965Mutex *m) 24 | { 25 | pthread_mutex_lock(m); 26 | } 27 | 28 | static INLINE void 29 | _i965UnlockMutex(_I965Mutex *m) 30 | { 31 | pthread_mutex_unlock(m); 32 | } 33 | 34 | #define _I965_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER 35 | #define _I965_DECLARE_MUTEX(m) \ 36 | _I965Mutex m = _I965_MUTEX_INITIALIZER 37 | 38 | #else 39 | 40 | typedef int _I965Mutex; 41 | static INLINE void _i965InitMutex(_I965Mutex *m) { (void) m; } 42 | static INLINE void _i965DestroyMutex(_I965Mutex *m) { (void) m; } 43 | static INLINE void _i965LockMutex(_I965Mutex *m) { (void) m; } 44 | static INLINE void _i965UnlockMutex(_I965Mutex *m) { (void) m; } 45 | 46 | #define _I965_MUTEX_INITIALIZER 0 47 | #define _I965_DECLARE_MUTEX(m) \ 48 | _I965Mutex m = _I965_MUTEX_INITIALIZER 49 | 50 | #endif 51 | 52 | #endif /* _I965_MUTEX_H_ */ 53 | -------------------------------------------------------------------------------- /src/i965_output_wayland.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifndef I965_OUTPUT_WAYLAND_H 26 | #define I965_OUTPUT_WAYLAND_H 27 | 28 | #include 29 | 30 | bool 31 | i965_output_wayland_init(VADriverContextP ctx); 32 | 33 | void 34 | i965_output_wayland_terminate(VADriverContextP ctx); 35 | 36 | #endif /* I965_OUTPUT_WAYLAND_H */ 37 | -------------------------------------------------------------------------------- /src/intel_compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTEL_COMPILER_H_ 2 | #define _INTEL_COMPILER_H_ 3 | 4 | /** 5 | * Function inlining 6 | */ 7 | #if defined(__GNUC__) 8 | # define INLINE __inline__ 9 | #elif (__STDC_VERSION__ >= 199901L) /* C99 */ 10 | # define INLINE inline 11 | #else 12 | # define INLINE 13 | #endif 14 | 15 | /** 16 | * Function visibility 17 | */ 18 | #if defined(__GNUC__) 19 | # define DLL_HIDDEN __attribute__((visibility("hidden"))) 20 | # define DLL_EXPORT __attribute__((visibility("default"))) 21 | #else 22 | # define DLL_HIDDEN 23 | # define DLL_EXPORT 24 | #endif 25 | 26 | #endif /* _INTEL_COMPILER_H_ */ 27 | -------------------------------------------------------------------------------- /src/media_drv_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_COMMON_H 30 | #define _MEDIA__DRIVER_COMMON_H 31 | 32 | // BRC Flag in BRC Init Kernel 33 | #define BRC_INIT_CBR 0x0010 34 | #define BRC_INIT_VBR 0x0020 35 | #define BRC_INIT_AVBR 0x0040 36 | #define BRC_INIT_FIELD_PIC 0x0100 37 | #define BRC_INIT_ICQ 0x0200 38 | #define BRC_INIT_VCM 0x0400 39 | #define BRC_INIT_IGNORE_PICTURE_HEADER_SIZE 0x2000 40 | #define BRC_INIT_DISABLE_MBBRC 0x8000 41 | 42 | UINT SEARCH_PATH_TABLE[2][8][16]; 43 | UINT ME_CURBE_INIT_DATA[30]; 44 | #endif 45 | -------------------------------------------------------------------------------- /src/media_drv_decoder.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "media_drv_defines.h" 36 | #include "media_drv_init.h" 37 | #include "media_drv_util.h" 38 | #include "media_drv_gpe_utils.h" 39 | #include "media_drv_surface.h" 40 | #include "media_drv_driver.h" 41 | #include "media_drv_decoder.h" 42 | 43 | #include "media_drv_hw.h" 44 | #include "media_drv_hybrid_vp9_common.h" 45 | 46 | /* 47 | * Currently this is bogus. It is only for calling back the structure/function 48 | * related with decoding. 49 | * The real implementation will be added later. 50 | */ 51 | 52 | static VAStatus 53 | intel_media_decode_picture(VADriverContextP ctx, 54 | VAProfile profile, 55 | union codec_state *codec_state, 56 | struct hw_context *hw_context) 57 | { 58 | return VA_STATUS_ERROR_UNIMPLEMENTED; 59 | } 60 | 61 | static void 62 | intel_media_context_destroy(void *hw_context) 63 | { 64 | struct hw_context *decoder_context = hw_context; 65 | 66 | if (decoder_context) 67 | free(decoder_context); 68 | return; 69 | } 70 | 71 | struct hw_context * 72 | media_dec_hw_context_init (VADriverContextP ctx, 73 | struct object_config *obj_config) 74 | { 75 | MEDIA_DRV_CONTEXT *drv_ctx = (MEDIA_DRV_CONTEXT *) (ctx->pDriverData); 76 | struct hw_context *decoder_context = NULL; 77 | 78 | if (drv_ctx->codec_info->vp9_dec_hybrid_support && 79 | (obj_config->profile == VAProfileVP9Profile0)) { 80 | return media_hybrid_dec_hw_context_init(ctx, obj_config); 81 | } 82 | 83 | decoder_context = (struct hw_context *) media_drv_alloc_memory (sizeof(struct hw_context)); 84 | 85 | decoder_context->run = intel_media_decode_picture; 86 | decoder_context->destroy = intel_media_context_destroy; 87 | 88 | return decoder_context; 89 | } 90 | -------------------------------------------------------------------------------- /src/media_drv_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_DECODER_H_ 30 | #define _MEDIA__DRIVER_DECODER_H_ 31 | #include "media_drv_init.h" 32 | #include "media_drv_gpe_utils.h" 33 | #include "media_drv_util.h" 34 | 35 | extern struct hw_context *media_dec_hw_context_init (VADriverContextP ctx, 36 | struct object_config *obj_config); 37 | #endif 38 | -------------------------------------------------------------------------------- /src/media_drv_encoder_vp8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_ENCODER_VP8_H 30 | #define _MEDIA__DRIVER_ENCODER_VP8_H 31 | VOID gpe_context_vfe_scoreboardinit_vp8 (MEDIA_GPE_CTX * gpe_context); 32 | VOID gpe_context_vfe_scoreboardinit_pak_vp8 (MEDIA_GPE_CTX * gpe_context); 33 | VOID media_alloc_resource_mbpak (VADriverContextP ctx, 34 | MEDIA_ENCODER_CTX * encoder_context); 35 | VOID 36 | media_alloc_resource_mbenc (VADriverContextP ctx,MEDIA_ENCODER_CTX * encoder_context); 37 | VOID media_object_walker_pak_init(UINT pak_phase_type,MEDIA_ENCODER_CTX * encoder_context,MEDIA_OBJ_WALKER_PARAMS *media_obj_walker_params); 38 | VOID media_object_walker_mbenc_init(BOOL mbenc_i_frame_dist_in_use,BOOL mbenc_phase_2,MEDIA_ENCODER_CTX * encoder_context,MEDIA_OBJ_WALKER_PARAMS *media_obj_walker_params); 39 | VOID media_encoder_init_vp8 (VADriverContextP ctx,MEDIA_ENCODER_CTX * encoder_context); 40 | VOID 41 | media_alloc_resource_brc_init_reset (VADriverContextP ctx, 42 | MEDIA_ENCODER_CTX * encoder_context); 43 | VOID 44 | media_alloc_resource_brc_update (VADriverContextP ctx, 45 | MEDIA_ENCODER_CTX * encoder_context); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/media_drv_encoder_vp8_g7.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_ENCODER_VP8_G7_H 30 | #define _MEDIA__DRIVER_ENCODER_VP8_G7_H 31 | VOID 32 | media_mbenc_context_init_g7 (VADriverContextP ctx, 33 | MEDIA_ENCODER_CTX * encoder_context); 34 | VOID 35 | media_mbpak_context_init_vp8_g7 (VADriverContextP ctx, 36 | MEDIA_ENCODER_CTX * encoder_context); 37 | VOID 38 | media_brc_init_reset_context_init_g7(VADriverContextP ctx, 39 | MEDIA_ENCODER_CTX * encoder_context); 40 | VOID 41 | media_brc_update_context_init_g7(VADriverContextP ctx, 42 | MEDIA_ENCODER_CTX * encoder_context); 43 | VOID 44 | media_scaling_context_init_g7 (VADriverContextP ctx, 45 | MEDIA_ENCODER_CTX * encoder_context); 46 | 47 | VOID 48 | media_me_context_init_g7 (VADriverContextP ctx, 49 | MEDIA_ENCODER_CTX * encoder_context); 50 | #endif 51 | -------------------------------------------------------------------------------- /src/media_drv_gen75_render.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/intel-hybrid-driver/79619456ab8f613dcd7b26bf716e8d990704e5ca/src/media_drv_gen75_render.c -------------------------------------------------------------------------------- /src/media_drv_gen8_render.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/intel-hybrid-driver/79619456ab8f613dcd7b26bf716e8d990704e5ca/src/media_drv_gen8_render.c -------------------------------------------------------------------------------- /src/media_drv_gen9_render.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/intel-hybrid-driver/79619456ab8f613dcd7b26bf716e8d990704e5ca/src/media_drv_gen9_render.c -------------------------------------------------------------------------------- /src/media_drv_hw.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #include "media_drv_init.h" 30 | #include "media_drv_driver.h" 31 | #include "media_drv_hw_g75.h" 32 | #include "media_drv_hw_g7.h" 33 | #include "media_drv_hw_g8.h" 34 | #include "media_drv_hw_g9.h" 35 | 36 | VOID 37 | media_hw_context_init(VADriverContextP ctx) 38 | { 39 | MEDIA_DRV_CONTEXT *drv_ctx = (MEDIA_DRV_CONTEXT *) (ctx->pDriverData); 40 | MEDIA_HW_CONTEXT *hw_ctx = &drv_ctx->hw_context; 41 | 42 | if (IS_HASWELL (drv_ctx->drv_data.device_id)) { 43 | media_hw_context_init_g75(ctx, hw_ctx); 44 | } else if (IS_GEN7 (drv_ctx->drv_data.device_id)) { 45 | media_hw_context_init_g7(ctx, hw_ctx); 46 | } else if (IS_GEN8 (drv_ctx->drv_data.device_id)) { 47 | media_hw_context_init_g8(ctx, hw_ctx); 48 | } else if (IS_GEN9 (drv_ctx->drv_data.device_id)) { 49 | media_hw_context_init_g9(ctx, hw_ctx); 50 | } else { 51 | printf ("Platform not supported"); 52 | MEDIA_DRV_ASSERT (0); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/media_drv_hw_g8.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #include 30 | #include 31 | #include "media_drv_hw_g7.h" 32 | #include "media_drv_hw_g8.h" 33 | #include "media_drv_surface.h" 34 | //#define DEBUG 35 | struct hw_codec_info gen8_hw_codec_info = { 36 | .max_width = 4096, 37 | .max_height = 4096, 38 | .tiled_surface = 1, 39 | .vp8_enc_hybrid_support = 0, 40 | .vp9_dec_hybrid_support = 1, 41 | .ratecontrol= VA_RC_CQP, 42 | .render_init = media_drv_gen8_render_init, 43 | }; 44 | 45 | struct hw_codec_info chv_hw_codec_info = { 46 | .max_width = 4096, 47 | .max_height = 4096, 48 | .vp9_dec_hybrid_support = 1, 49 | .tiled_surface = 1, 50 | .render_init = media_drv_gen8_render_init, 51 | }; 52 | 53 | 54 | VOID 55 | media_hw_context_init_g8(VADriverContextP ctx, MEDIA_HW_CONTEXT *hw_ctx) 56 | { 57 | } 58 | -------------------------------------------------------------------------------- /src/media_drv_hw_g8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_HW_G8_H 30 | #define _MEDIA__DRIVER_HW_G8_H 31 | #include "media_drv_hw.h" 32 | #include "media_drv_hw_g75.h" 33 | 34 | extern struct hw_codec_info gen8_hw_codec_info; 35 | extern struct hw_codec_info chv_hw_codec_info; 36 | 37 | VOID 38 | media_hw_context_init_g8(VADriverContextP ctx, MEDIA_HW_CONTEXT *hw_ctx); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/media_drv_hw_g9.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #include 30 | #include "media_drv_hw_g9.h" 31 | #include "media_drv_surface.h" 32 | 33 | struct hw_codec_info gen9_hw_codec_info = { 34 | .max_width = 4096, 35 | .max_height = 4096, 36 | .tiled_surface = 1, 37 | .vp9_dec_hybrid_support = 1, 38 | .render_init = media_drv_gen9_render_init, 39 | }; 40 | 41 | VOID 42 | media_hw_context_init_g9(VADriverContextP ctx, MEDIA_HW_CONTEXT *hw_ctx) 43 | { 44 | } 45 | -------------------------------------------------------------------------------- /src/media_drv_hw_g9.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_HW_G9_H 30 | #define _MEDIA__DRIVER_HW_G9_H 31 | #include "media_drv_hw.h" 32 | 33 | extern struct hw_codec_info gen9_hw_codec_info; 34 | 35 | VOID 36 | media_hw_context_init_g9(VADriverContextP ctx, MEDIA_HW_CONTEXT *hw_ctx); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/media_drv_hwcmds_g8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_HWCMDS_G8_H 30 | #define _MEDIA__DRIVER_HWCMDS_G8_H 31 | 32 | #include "media_drv_batchbuffer.h" 33 | #define CMD_PIPE_CONTROL_WC_FLUSH (1 << 12) 34 | 35 | STATUS media_object_walker_cmd_g8 (MEDIA_BATCH_BUFFER * batch,MEDIA_OBJ_WALKER_PARAMS * params); 36 | STATUS mediadrv_gen_pipe_ctrl_cmd_g8 (MEDIA_BATCH_BUFFER * batch,PIPE_CONTROL_PARAMS * params); 37 | STATUS mediadrv_gen_state_base_address_cmd_g8 (MEDIA_BATCH_BUFFER * batch,STATE_BASE_ADDR_PARAMS * params); 38 | STATUS mediadrv_gen_media_vfe_state_cmd_g8 (MEDIA_BATCH_BUFFER * batch,VFE_STATE_PARAMS * params); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/media_drv_hybrid_vp9_common.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | #include "media_drv_hybrid_vp9_common.h" 30 | #include "decode_hybrid_vp9.h" 31 | 32 | 33 | extern struct hw_context * 34 | media_hybrid_dec_hw_context_init(VADriverContextP ctx, struct object_config *obj_config) 35 | { 36 | void *vp9_context = calloc(1, sizeof(hybrid_vp9_hw_context)); 37 | 38 | Intel_HybridVp9Decode_Initialize(ctx, (void *)vp9_context); 39 | 40 | return (struct hw_context *)(vp9_context); 41 | } 42 | -------------------------------------------------------------------------------- /src/media_drv_hybrid_vp9_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | #ifndef _HYBRID_VP9_COMMON_H_ 30 | #define _HYBRID_VP9_COMMON_H_ 31 | 32 | #include 33 | #include "media_drv_driver.h" 34 | 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | 41 | extern struct hw_context * 42 | media_hybrid_dec_hw_context_init(VADriverContextP ctx, struct object_config *obj_config); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif /* _HYBRID_VP9_COMMON_H_ */ 49 | -------------------------------------------------------------------------------- /src/media_drv_kernels.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | 30 | #ifndef _MEDIA__DRIVER_KERNELS_H 31 | #define _MEDIA__DRIVER_KERNELS_H 32 | #include "media_drv_defines.h" 33 | #define MEDIA_VP8_MBENC_I_SZ 0x5c40 34 | extern const UINT MEDIA_VP8_MBENC_I[MEDIA_VP8_MBENC_I_SZ]; 35 | 36 | #define MEDIA_VP8_MBENC_ICHROMA_SZ 0xa300 37 | extern const UINT MEDIA_VP8_MBENC_ICHROMA[MEDIA_VP8_MBENC_ICHROMA_SZ]; 38 | 39 | #define MEDIA_VP8_MBENC_FRM_P_SZ 0x6f40 //0x10750 40 | extern const UINT MEDIA_VP8_MBENC_FRM_P[MEDIA_VP8_MBENC_FRM_P_SZ]; 41 | 42 | 43 | #define MEDIA_VP8_MBENC_ILuma_SZ 0xb9f0 44 | extern const UINT MEDIA_VP8_MBENC_ILuma[MEDIA_VP8_MBENC_ILuma_SZ]; 45 | 46 | 47 | #define MEDIA_VP8_HME_P_SZ 0x1190 48 | extern const UINT MEDIA_VP8_HME_P[MEDIA_VP8_HME_P_SZ]; 49 | 50 | 51 | #define MEDIA_VP8_HME_DOWNSCALE_SZ 0xf10 52 | extern const UINT MEDIA_VP8_HME_DOWNSCALE[MEDIA_VP8_HME_DOWNSCALE_SZ]; 53 | 54 | #define MEDIA_VP8_PAK_PHASE1_SZ 0x78d0 55 | extern const UINT MEDIA_VP8_PAK_PHASE1[MEDIA_VP8_PAK_PHASE1_SZ]; 56 | 57 | #define MEDIA_VP8_PAK_PHASE2_SZ 0x9a80 58 | extern const UINT MEDIA_VP8_PAK_PHASE2[MEDIA_VP8_PAK_PHASE2_SZ]; 59 | 60 | 61 | #define MEDIA_VP8_INTRA_DIS_BRC_SZ 0xa10 62 | extern const UINT MEDIA_VP8_INTRA_DIS_BRC[MEDIA_VP8_INTRA_DIS_BRC_SZ]; 63 | 64 | #define MEDIA_VP8_BRC_INIT_SZ 0x17c0 65 | extern const UINT MEDIA_VP8_BRC_INIT[MEDIA_VP8_BRC_INIT_SZ]; 66 | 67 | 68 | #define MEDIA_VP8_BRC_RESET_SZ 0x19f0 69 | extern const UINT MEDIA_VP8_BRC_RESET[MEDIA_VP8_BRC_RESET_SZ]; 70 | 71 | #define MEDIA_VP8_BRC_UPDATE_SZ 0x9280 72 | extern const UINT MEDIA_VP8_BRC_UPDATE[MEDIA_VP8_BRC_UPDATE_SZ]; 73 | #endif 74 | -------------------------------------------------------------------------------- /src/media_drv_kernels_g7.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_KERNELS_G7_H 30 | #define _MEDIA__DRIVER_KERNELS_G7_H 31 | #include "media_drv_defines.h" 32 | 33 | #define MEDIA_VP8_MBENC_I_SZ_G7 0x62c0 34 | extern const UINT MEDIA_VP8_MBENC_I_G7[MEDIA_VP8_MBENC_I_SZ_G7]; 35 | 36 | #define MEDIA_VP8_MBENC_ICHROMA_SZ_G7 0xe300 //0xe310 37 | extern const UINT MEDIA_VP8_MBENC_ICHROMA_G7[MEDIA_VP8_MBENC_ICHROMA_SZ_G7]; 38 | 39 | #define MEDIA_VP8_MBENC_FRM_P_SZ_G7 0xb1c0 40 | extern const UINT MEDIA_VP8_MBENC_FRM_P_G7[MEDIA_VP8_MBENC_FRM_P_SZ_G7]; 41 | 42 | #define MEDIA_VP8_PAK_PHASE1_SZ_G7 0x7780 43 | extern const UINT MEDIA_VP8_PAK_PHASE1_G7[MEDIA_VP8_PAK_PHASE1_SZ_G7]; 44 | 45 | #define MEDIA_VP8_PAK_PHASE2_SZ_G7 0x9a10 46 | extern const UINT MEDIA_VP8_PAK_PHASE2_G7[MEDIA_VP8_PAK_PHASE2_SZ_G7]; 47 | 48 | #define MEDIA_VP8_INTRA_DIS_BRC_SZ_G7 0xe00 49 | extern const UINT MEDIA_VP8_INTRA_DIS_BRC_G7[MEDIA_VP8_INTRA_DIS_BRC_SZ_G7]; 50 | 51 | #define MEDIA_VP8_BRC_INIT_SZ_G7 0x17c0 52 | extern const UINT MEDIA_VP8_BRC_INIT_G7[MEDIA_VP8_BRC_INIT_SZ_G7]; 53 | 54 | #define MEDIA_VP8_BRC_RESET_SZ_G7 0x1a00 55 | extern const UINT MEDIA_VP8_BRC_RESET_G7[MEDIA_VP8_BRC_RESET_SZ_G7]; 56 | 57 | #define MEDIA_VP8_BRC_UPDATE_SZ_G7 0x8a80 58 | extern const UINT MEDIA_VP8_BRC_UPDATE_G7[MEDIA_VP8_BRC_UPDATE_SZ_G7]; 59 | 60 | #define MEDIA_VP8_MBENC_ILuma_SZ_G7 16 61 | extern const UINT MEDIA_VP8_MBENC_ILuma_G7[MEDIA_VP8_MBENC_ILuma_SZ_G7]; 62 | 63 | #define MEDIA_VP8_HME_P_SZ_G7 0x900 64 | extern const UINT MEDIA_VP8_HME_P_G7[MEDIA_VP8_HME_P_SZ_G7]; 65 | 66 | #define MEDIA_VP8_HME_DOWNSCALE_SZ_G7 0xf80 67 | extern const UINT MEDIA_VP8_HME_DOWNSCALE_G7[MEDIA_VP8_HME_DOWNSCALE_SZ_G7]; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/media_drv_output_dri.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_OUT_DRI_H 30 | #define _MEDIA__DRIVER_OUT_DRI_H 31 | #include 32 | #include "media_drv_defines.h" 33 | #define LIBVA_X11_NAME "libva-x11.so.1" 34 | VOID media_output_dri_terminate (VADriverContextP ctx); 35 | BOOL media_output_dri_init (VADriverContextP ctx); 36 | 37 | VAStatus 38 | media_put_surface_dri( 39 | VADriverContextP ctx, 40 | VASurfaceID surface, 41 | void *draw, 42 | const VARectangle *src_rect, 43 | const VARectangle *dst_rect, 44 | const VARectangle *cliprects, 45 | unsigned int num_cliprects, 46 | unsigned int flags 47 | ); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/media_drv_render.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Xiang Haihao 26 | * Midhunchandra Kodiyath 27 | * 28 | */ 29 | 30 | #include 31 | #include "media_drv_util.h" 32 | #include "media_drv_driver.h" 33 | #include "media_drv_render.h" 34 | #include "media_drv_hw.h" 35 | 36 | BOOL 37 | media_render_init (VADriverContextP ctx) 38 | { 39 | MEDIA_DRV_CONTEXT *drv_ctx = ctx->pDriverData; 40 | MEDIA_DRV_ASSERT (ctx); 41 | 42 | if (drv_ctx->codec_info && drv_ctx->codec_info->render_init) 43 | drv_ctx->codec_info->render_init(ctx); 44 | 45 | return true; 46 | } 47 | 48 | VOID 49 | media_render_terminate (VADriverContextP ctx) 50 | { 51 | MEDIA_DRV_CONTEXT *drv_ctx = ctx->pDriverData; 52 | MEDIA_DRV_ASSERT (ctx); 53 | struct media_render_state *render_state = &drv_ctx->render_state; 54 | 55 | 56 | if (render_state->render_terminate) 57 | render_state->render_terminate(ctx); 58 | } 59 | -------------------------------------------------------------------------------- /src/media_drv_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Midhunchandra Kodiyath 26 | * 27 | */ 28 | 29 | #ifndef _MEDIA__DRIVER_UTIL_H 30 | #define _MEDIA__DRIVER_UTIL_H 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include "media_drv_defines.h" 39 | #include "media_drv_data.h" 40 | 41 | #define MEDIA_DRV_ASSERT(val) assert(val); 42 | #define ALIGN(i, n) (((i) + (n) - 1) & ~((n) - 1)) 43 | #define ALIGN_FLOOR(i,n) ((i) & (~(n-1))) 44 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) 45 | #define MAX(a, b) ((a) > (b) ? (a) : (b)) 46 | #define ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) 47 | typedef enum _MEDIA_DRV_STATUS_ 48 | { 49 | SUCESSS, 50 | INVALID_PARAMETER, 51 | UNKNOW_STATUS 52 | } MEDIA_DRV_STATUS; 53 | BOOL 54 | media_drv_memcpy (VOID * dst_ptr, size_t dst_len, const VOID * src_ptr, 55 | size_t src_len); 56 | 57 | VOID media_drv_mutex_init (MEDIA_DRV_MUTEX * mutex); 58 | VOID media_drv_mutex_destroy (MEDIA_DRV_MUTEX * mutex); 59 | INT media_get_sampling_from_fourcc (UINT fourcc); 60 | VOID *media_drv_alloc_memory ( /*size_t */ UINT size); 61 | VOID media_drv_free_memory (VOID * ptr); 62 | INT get_sampling_from_fourcc (UINT fourcc); 63 | VOID 64 | media_guess_surface_format (VADriverContextP ctx, 65 | VASurfaceID surface, 66 | UINT * fourcc, UINT * is_tiled); 67 | VOID media_drv_memset (VOID * dest_ptr, size_t len); 68 | int media_drv_va_misc_type_to_index(VAEncMiscParameterType type); 69 | VAEncMiscParameterType media_drv_index_to_va_misc_type(int index); 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /src/object_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifndef _OBJECT_HEAP_H_ 26 | #define _OBJECT_HEAP_H_ 27 | 28 | #include "i965_mutext.h" 29 | 30 | #define OBJECT_HEAP_OFFSET_MASK 0x7F000000 31 | #define OBJECT_HEAP_ID_MASK 0x00FFFFFF 32 | 33 | typedef struct object_base *object_base_p; 34 | typedef struct object_heap *object_heap_p; 35 | 36 | struct object_base { 37 | int id; 38 | int next_free; 39 | }; 40 | 41 | struct object_heap { 42 | int object_size; 43 | int id_offset; 44 | int next_free; 45 | int heap_size; 46 | int heap_increment; 47 | _I965Mutex mutex; 48 | void **bucket; 49 | int num_buckets; 50 | }; 51 | 52 | typedef int object_heap_iterator; 53 | 54 | /* 55 | * Return 0 on success, -1 on error 56 | * 57 | */ 58 | 59 | #ifdef __cplusplus 60 | extern "C" { 61 | #endif 62 | 63 | int object_heap_init( object_heap_p heap, int object_size, int id_offset); 64 | 65 | /* 66 | * Allocates an object 67 | * Returns the object ID on success, returns -1 on error 68 | */ 69 | int object_heap_allocate( object_heap_p heap ); 70 | 71 | /* 72 | * Lookup an allocated object by object ID 73 | * Returns a pointer to the object on success, returns NULL on error 74 | */ 75 | object_base_p object_heap_lookup( object_heap_p heap, int id ); 76 | 77 | /* 78 | * Iterate over all objects in the heap. 79 | * Returns a pointer to the first object on the heap, returns NULL if heap is empty. 80 | */ 81 | object_base_p object_heap_first( object_heap_p heap, object_heap_iterator *iter ); 82 | 83 | /* 84 | * Iterate over all objects in the heap. 85 | * Returns a pointer to the next object on the heap, returns NULL if heap is empty. 86 | */ 87 | object_base_p object_heap_next( object_heap_p heap, object_heap_iterator *iter ); 88 | 89 | /* 90 | * Frees an object 91 | */ 92 | void object_heap_free( object_heap_p heap, object_base_p obj ); 93 | 94 | /* 95 | * Destroys a heap, the heap must be empty. 96 | */ 97 | void object_heap_destroy( object_heap_p heap ); 98 | 99 | 100 | #ifdef __cplusplus 101 | } 102 | #endif 103 | 104 | #endif /* _OBJECT_HEAP_H_ */ 105 | -------------------------------------------------------------------------------- /src/shaders/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = render utils 2 | 3 | EXTRA_DIST = gpp.py 4 | 5 | # Extra clean files so that maintainer-clean removes *everything* 6 | MAINTAINERCLEANFILES = Makefile.in 7 | -------------------------------------------------------------------------------- /src/shaders/render/exa_sf.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Keith Packard 25 | * Eric Anholt 26 | * 27 | */ 28 | 29 | /* 30 | * Inputs (note all sub-register addresses are bytes, not float indices) 31 | * 32 | * Note that the vertices will have been reordered: 33 | * 34 | * V0 is topmost (leftmost among topmost) (upper left) 35 | * V1 is next clockwise (lower right) 36 | * V2 is remaining (lower left) 37 | * 38 | * V0 ...................... XX 39 | * | . 40 | * | . 41 | * | . 42 | * V2------------------------V1 43 | * 44 | * G0 thread state -- just pass along 45 | * 46 | * G1 and G2 are fixed by SF spec 47 | * 48 | * G1.0 reserved 49 | * G1.4 Provoking vertex 50 | * G1.8 Determinant 51 | * G1.12 X1 - X0 52 | * G1.16 X2 - X0 53 | * G1.20 Y1 - Y0 54 | * G1.24 Y2 - Y0 55 | * G1.30 reserved 56 | * 57 | * G2.0 Z0 58 | * G2.4 1/W0 59 | * G2.8 Z1 60 | * G2.12 1/W1 61 | * G2.16 Z2 62 | * G2.20 1/W2 63 | * G2.24 reserved 64 | * G2.30 reserved 65 | * 66 | * G3 is V0 Vertex Attribute Data from URB (upper left) 67 | * 68 | * G3.0 u0 69 | * G3.4 v0 70 | * 71 | * G4 is V1 Vertex Attribute Data from URB (lower right) 72 | * 73 | * G4.0 u1 74 | * G4.4 v1 75 | * 76 | * G5 is V2 Vertex Attribute Data from URB (lower left) 77 | * 78 | */ 79 | 80 | /* Compute inverses of the input deltas */ 81 | send (4) 0 g6<1>F g1.12<4,4,1>F math inv mlen 1 rlen 1 { align1 }; 82 | 83 | /* texture location at V0 */ 84 | mov (4) m3<1>F g3<4,4,1>F { align1 }; 85 | 86 | /* compute V1 - V2 (motion in X) for texture coordinates */ 87 | add (4) g7<1>F g4<4,4,1>F -g5<4,4,1>F { align1 }; 88 | 89 | /* multiply by 1/dx */ 90 | mul (4) m1<1>F g7<4,4,1>F g6.0<0,1,0>F { align1 }; 91 | 92 | /* Compute V2 - V0 (motion in Y) for texture coordinates */ 93 | add (4) g7<1>F g5<4,4,1>F -g3<4,4,1>F { align1 }; 94 | 95 | /* multiply by 1/dy */ 96 | mul (4) m2<1>F g7<4,4,1>F g6.8<0,1,0>F {align1 }; 97 | 98 | /* and we're done */ 99 | send (8) 0 null g0<8,8,1>F urb 0 transpose used complete mlen 4 rlen 0 { align1 EOT }; 100 | nop; 101 | nop; 102 | nop; 103 | nop; 104 | nop; 105 | nop; 106 | nop; 107 | nop; 108 | -------------------------------------------------------------------------------- /src/shaders/render/exa_sf.g4b: -------------------------------------------------------------------------------- 1 | { 0x00400031, 0x20c01fbd, 0x0069002c, 0x01110001 }, 2 | { 0x00400001, 0x206003be, 0x00690060, 0x00000000 }, 3 | { 0x00400040, 0x20e077bd, 0x00690080, 0x006940a0 }, 4 | { 0x00400041, 0x202077be, 0x006900e0, 0x000000c0 }, 5 | { 0x00400040, 0x20e077bd, 0x006900a0, 0x00694060 }, 6 | { 0x00400041, 0x204077be, 0x006900e0, 0x000000c8 }, 7 | { 0x00600031, 0x20001fbc, 0x008d0000, 0x8640c800 }, 8 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 9 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 10 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 11 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 12 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 13 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 14 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 15 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_sf.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x00400031, 0x20c01fbd, 0x1069002c, 0x02100001 }, 2 | { 0x00400001, 0x206003be, 0x00690060, 0x00000000 }, 3 | { 0x00400040, 0x20e077bd, 0x00690080, 0x006940a0 }, 4 | { 0x00400041, 0x202077be, 0x006900e0, 0x000000c0 }, 5 | { 0x00400040, 0x20e077bd, 0x006900a0, 0x00694060 }, 6 | { 0x00400041, 0x204077be, 0x006900e0, 0x000000c8 }, 7 | { 0x00600031, 0x20001fbc, 0x648d0000, 0x8808c800 }, 8 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 9 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 10 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 11 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 12 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 13 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 14 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 15 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_affine.g4i: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* 29 | * Fragment to compute src u/v values under an affine transform 30 | */ 31 | 32 | /********** Compute u *************/ 33 | 34 | mul (16) temp_x<1>F dst_x<8,8,1>F du_dx { compr align1 }; 35 | mul (16) temp_y<1>F dst_y<8,8,1>F du_dy { compr align1 }; 36 | add (16) temp_x<1>F temp_x<8,8,1>F temp_y<8,8,1>F { compr align1 }; 37 | add (16) u<1>F temp_x<8,8,1>F uo { compr align1 }; 38 | 39 | /********** Compute v *************/ 40 | 41 | mul (16) temp_x<1>F dst_x<8,8,1>F dv_dx { compr align1 }; 42 | mul (16) temp_y<1>F dst_y<8,8,1>F dv_dy { compr align1 }; 43 | add (16) temp_x<1>F temp_x<8,8,1>F temp_y<8,8,1>F { compr align1 }; 44 | add (16) v<1>F temp_x<8,8,1>F vo { compr align1 }; 45 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* 29 | * Fragment to compute src u/v values under an affine transform 30 | */ 31 | 32 | include(`exa_wm.g4i') 33 | 34 | define(`du_dx', `src_du_dx') 35 | define(`du_dy', `src_du_dy') 36 | define(`uo', `src_uo') 37 | 38 | define(`dv_dx', `src_dv_dx') 39 | define(`dv_dy', `src_dv_dy') 40 | define(`vo', `src_vo') 41 | 42 | define(`u', `src_u') 43 | define(`v', `src_v') 44 | 45 | include(`exa_wm_affine.g4i') 46 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g4b: -------------------------------------------------------------------------------- 1 | { 0x00802041, 0x23c077bd, 0x008d0540, 0x000000c0 }, 2 | { 0x00802041, 0x238077bd, 0x008d0580, 0x000000c4 }, 3 | { 0x00802040, 0x23c077bd, 0x008d03c0, 0x008d0380 }, 4 | { 0x00802040, 0x204077be, 0x008d03c0, 0x000000cc }, 5 | { 0x00802041, 0x23c077bd, 0x008d0540, 0x000000d0 }, 6 | { 0x00802041, 0x238077bd, 0x008d0580, 0x000000d4 }, 7 | { 0x00802040, 0x23c077bd, 0x008d03c0, 0x008d0380 }, 8 | { 0x00802040, 0x208077be, 0x008d03c0, 0x000000dc }, 9 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x00802041, 0x23c077bd, 0x008d0540, 0x000000c0 }, 2 | { 0x00802041, 0x238077bd, 0x008d0580, 0x000000c4 }, 3 | { 0x00802040, 0x23c077bd, 0x008d03c0, 0x008d0380 }, 4 | { 0x00802040, 0x204077be, 0x008d03c0, 0x000000cc }, 5 | { 0x00802041, 0x23c077bd, 0x008d0540, 0x000000d0 }, 6 | { 0x00802041, 0x238077bd, 0x008d0580, 0x000000d4 }, 7 | { 0x00802040, 0x23c077bd, 0x008d03c0, 0x008d0380 }, 8 | { 0x00802040, 0x208077be, 0x008d03c0, 0x000000dc }, 9 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | */ 24 | 25 | /* 26 | * Fragment to compute src u/v values 27 | */ 28 | include(`exa_wm.g4i') 29 | 30 | define(`ul', `src_u') 31 | define(`uh', `m3') 32 | define(`vl', `src_v') 33 | define(`vh', `m5') 34 | 35 | define(`bl', `g2.0<8,8,1>F') 36 | define(`bh', `g4.0<8,8,1>F') 37 | 38 | /* U */ 39 | pln (8) ul<1>F a0_a_x bl { align1 }; /* pixel 0-7 */ 40 | pln (8) uh<1>F a0_a_x bh { align1 }; /* pixel 8-15 */ 41 | 42 | /* V */ 43 | pln (8) vl<1>F a0_a_y bl { align1 }; /* pixel 0-7 */ 44 | pln (8) vh<1>F a0_a_y bh { align1 }; /* pixel 8-15 */ 45 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g6b: -------------------------------------------------------------------------------- 1 | { 0x0060005a, 0x204077be, 0x00000140, 0x008d0040 }, 2 | { 0x0060005a, 0x206077be, 0x00000140, 0x008d0080 }, 3 | { 0x0060005a, 0x208077be, 0x00000150, 0x008d0040 }, 4 | { 0x0060005a, 0x20a077be, 0x00000150, 0x008d0080 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | */ 24 | 25 | /* 26 | * Fragment to compute src u/v values 27 | */ 28 | include(`exa_wm.g4i') 29 | 30 | define(`ul', `g66') 31 | define(`uh', `g67') 32 | define(`vl', `g68') 33 | define(`vh', `g69') 34 | 35 | define(`bl', `g2.0<8,8,1>F') 36 | define(`bh', `g4.0<8,8,1>F') 37 | 38 | 39 | /* U */ 40 | pln (8) ul<1>F a0_a_x bl { align1 }; /* pixel 0-7 */ 41 | pln (8) uh<1>F a0_a_x bh { align1 }; /* pixel 8-15 */ 42 | 43 | /* V */ 44 | pln (8) vl<1>F a0_a_y bl { align1 }; /* pixel 0-7 */ 45 | pln (8) vh<1>F a0_a_y bh { align1 }; /* pixel 8-15 */ 46 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g7b: -------------------------------------------------------------------------------- 1 | { 0x0060005a, 0x284077bd, 0x00000140, 0x008d0040 }, 2 | { 0x0060005a, 0x286077bd, 0x00000140, 0x008d0080 }, 3 | { 0x0060005a, 0x288077bd, 0x00000150, 0x008d0040 }, 4 | { 0x0060005a, 0x28a077bd, 0x00000150, 0x008d0080 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g8a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | */ 24 | 25 | /* 26 | * Fragment to compute src u/v values 27 | */ 28 | include(`exa_wm.g4i') 29 | 30 | define(`ul', `g66') 31 | define(`uh', `g67') 32 | define(`vl', `g68') 33 | define(`vh', `g69') 34 | 35 | define(`bl', `g2.0<8,8,1>F') 36 | define(`bh', `g4.0<8,8,1>F') 37 | 38 | 39 | /* U */ 40 | pln (8) ul<1>F a0_a_x bl { align1 }; /* pixel 0-7 */ 41 | pln (8) uh<1>F a0_a_x bh { align1 }; /* pixel 8-15 */ 42 | 43 | /* V */ 44 | pln (8) vl<1>F a0_a_y bl { align1 }; /* pixel 0-7 */ 45 | pln (8) vh<1>F a0_a_y bh { align1 }; /* pixel 8-15 */ 46 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g8b: -------------------------------------------------------------------------------- 1 | { 0x0060005a, 0x28403ae8, 0x3a000140, 0x008d0040 }, 2 | { 0x0060005a, 0x28603ae8, 0x3a000140, 0x008d0080 }, 3 | { 0x0060005a, 0x28803ae8, 0x3a000150, 0x008d0040 }, 4 | { 0x0060005a, 0x28a03ae8, 0x3a000150, 0x008d0080 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_affine.g9b: -------------------------------------------------------------------------------- 1 | { 0x0060005a, 0x28403ae8, 0x3a000140, 0x008d0040 }, 2 | { 0x0060005a, 0x28603ae8, 0x3a000140, 0x008d0080 }, 3 | { 0x0060005a, 0x28803ae8, 0x3a000150, 0x008d0040 }, 4 | { 0x0060005a, 0x28a03ae8, 0x3a000150, 0x008d0080 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* Sample the src surface */ 29 | 30 | include(`exa_wm.g4i') 31 | 32 | define(`global_alpha', `r2.0<0,1,0>f') 33 | 34 | /* prepare sampler read back gX register, which would be written back to output */ 35 | 36 | /* use simd16 sampler, param 0 is u, param 1 is v. */ 37 | /* 'payload' loading, assuming tex coord start from g4 */ 38 | 39 | /* load argb */ 40 | mov (1) g0.8<1>UD 0x00000000UD { align1 mask_disable }; 41 | 42 | /* src_msg will be copied with g0, as it contains send desc */ 43 | /* emit sampler 'send' cmd */ 44 | send (16) src_msg_ind /* msg reg index */ 45 | src_sample_base<1>UW /* readback */ 46 | g0<8,8,1>UW /* copy to msg start reg*/ 47 | sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) 48 | /* here(src->dst) we should use src_sampler and src_surface */ 49 | mlen 5 rlen 8 { align1 }; /* required message len 5, readback len 8 */ 50 | 51 | mul (8) src_sample_a_01<1>f src_sample_a_01<8,8,1>f global_alpha { align1 }; 52 | mul (8) src_sample_a_23<1>f src_sample_a_23<8,8,1>f global_alpha { align1 }; 53 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g4b: -------------------------------------------------------------------------------- 1 | { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, 2 | { 0x01800031, 0x21c01d29, 0x008d0000, 0x02580001 }, 3 | { 0x00600041, 0x228077bd, 0x008d0280, 0x00000040 }, 4 | { 0x00600041, 0x22a077bd, 0x008d02a0, 0x00000040 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, 2 | { 0x01800031, 0x21c01d29, 0x208d0000, 0x0a8a0001 }, 3 | { 0x00600041, 0x228077bd, 0x008d0280, 0x00000040 }, 4 | { 0x00600041, 0x22a077bd, 0x008d02a0, 0x00000040 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* Sample the src surface */ 29 | 30 | include(`exa_wm.g4i') 31 | 32 | /* subpicture global alpha */ 33 | define(`global_alpha', `r6.0<0,1,0>f') 34 | 35 | /* prepare sampler read back gX register, which would be written back to output */ 36 | 37 | /* use simd16 sampler, param 0 is u, param 1 is v. */ 38 | /* 'payload' loading, assuming tex coord start from g4 */ 39 | 40 | /* load argb */ 41 | mov (1) g0.8<1>UD 0x00000000UD { align1 mask_disable }; 42 | mov (8) src_msg<1>UD g0<8,8,1>UD { align1 mask_disable }; 43 | 44 | /* src_msg will be copied with g0, as it contains send desc */ 45 | /* emit sampler 'send' cmd */ 46 | send (16) src_msg_ind /* msg reg index */ 47 | src_sample_base<1>UW /* readback */ 48 | null 49 | sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) 50 | /* here(src->dst) we should use src_sampler and src_surface */ 51 | mlen 5 rlen 8 { align1 }; /* required message len 5, readback len 8 */ 52 | 53 | mul (8) src_sample_a_01<1>f src_sample_a_01<8,8,1>f global_alpha { align1 }; 54 | mul (8) src_sample_a_23<1>f src_sample_a_23<1>f global_alpha { align1 }; 55 | 56 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g6b: -------------------------------------------------------------------------------- 1 | { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, 2 | { 0x00600201, 0x20200022, 0x008d0000, 0x00000000 }, 3 | { 0x02800031, 0x21c01cc9, 0x00000020, 0x0a8a0001 }, 4 | { 0x00600041, 0x228077bd, 0x008d0280, 0x000000c0 }, 5 | { 0x00600041, 0x22a077bd, 0x002002a0, 0x000000c0 }, 6 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* Sample the src surface */ 29 | 30 | include(`exa_wm.g4i') 31 | 32 | /* Ivybridge uses GRFs in SEND instruction */ 33 | define(`src_msg_gen7', `g65') 34 | define(`src_msg_ind_gen7',`65') 35 | 36 | /* subpicture global alpha */ 37 | define(`global_alpha', `r6.0<0,1,0>f') 38 | 39 | /* prepare sampler read back gX register, which would be written back to output */ 40 | 41 | /* use simd16 sampler, param 0 is u, param 1 is v. */ 42 | /* 'payload' loading, assuming tex coord start from g4 */ 43 | 44 | /* load argb */ 45 | mov (1) g0.8<1>UD 0x00000000UD { align1 mask_disable }; 46 | mov (8) src_msg_gen7<1>UD g0<8,8,1>UD { align1 mask_disable }; 47 | 48 | /* src_msg will be copied with g0, as it contains send desc */ 49 | /* emit sampler 'send' cmd */ 50 | send (16) src_msg_ind_gen7 /* msg reg index */ 51 | src_sample_base<1>UW /* readback */ 52 | null 53 | sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) 54 | /* here(src->dst) we should use src_sampler and src_surface */ 55 | mlen 5 rlen 8 { align1 }; /* required message len 5, readback len 8 */ 56 | 57 | mul (8) src_sample_a_01<1>f src_sample_a_01<8,8,1>f global_alpha { align1 mask_disable }; 58 | mul (8) src_sample_a_23<1>f src_sample_a_23<8,8,1>f global_alpha { align1 mask_disable }; 59 | 60 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g7b: -------------------------------------------------------------------------------- 1 | { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, 2 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 3 | { 0x02800031, 0x21c01ca9, 0x00000820, 0x0a8c0001 }, 4 | { 0x00600241, 0x228077bd, 0x008d0280, 0x000000c0 }, 5 | { 0x00600241, 0x22a077bd, 0x008d02a0, 0x000000c0 }, 6 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g8a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* Sample the src surface */ 29 | 30 | include(`exa_wm.g4i') 31 | 32 | /* Ivybridge uses GRFs in SEND instruction */ 33 | define(`src_msg_gen8', `g65') 34 | define(`src_msg_ind_gen8',`65') 35 | 36 | /* subpicture global alpha */ 37 | define(`global_alpha', `r6.0<0,1,0>f') 38 | 39 | /* prepare sampler read back gX register, which would be written back to output */ 40 | 41 | /* use simd16 sampler, param 0 is u, param 1 is v. */ 42 | /* 'payload' loading, assuming tex coord start from g4 */ 43 | 44 | /* load argb */ 45 | mov (1) g0.8<1>UD 0x00000000UD { align1 mask_disable }; 46 | mov (8) src_msg_gen8<1>UD g0<8,8,1>UD { align1 mask_disable }; 47 | 48 | /* src_msg will be copied with g0, as it contains send desc */ 49 | /* emit sampler 'send' cmd */ 50 | send (16) src_msg_ind_gen8 /* msg reg index */ 51 | src_sample_base<1>UW /* readback */ 52 | null 53 | sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) 54 | /* here(src->dst) we should use src_sampler and src_surface */ 55 | mlen 5 rlen 8 { align1 }; /* required message len 5, readback len 8 */ 56 | 57 | mul (8) src_sample_a_01<1>f src_sample_a_01<8,8,1>f global_alpha { align1 mask_disable }; 58 | mul (8) src_sample_a_23<1>f src_sample_a_23<8,8,1>f global_alpha { align1 mask_disable }; 59 | 60 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g8b: -------------------------------------------------------------------------------- 1 | { 0x00000001, 0x2008060c, 0x00000000, 0x00000000 }, 2 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 3 | { 0x02800031, 0x21c00a48, 0x0e000820, 0x0a8c0001 }, 4 | { 0x00600041, 0x22803aec, 0x3a8d0280, 0x000000c0 }, 5 | { 0x00600041, 0x22a03aec, 0x3a8d02a0, 0x000000c0 }, 6 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_argb.g9b: -------------------------------------------------------------------------------- 1 | { 0x00000001, 0x2008060c, 0x00000000, 0x00000000 }, 2 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 3 | { 0x02800031, 0x21c00a48, 0x06000820, 0x0a8c0001 }, 4 | { 0x00600041, 0x22803aec, 0x3a8d0280, 0x000000c0 }, 5 | { 0x00600041, 0x22a03aec, 0x3a8d02a0, 0x000000c0 }, 6 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* Sample the src surface in planar format */ 29 | 30 | include(`exa_wm.g4i') 31 | 32 | /* prepare sampler read back gX register, which would be written back to output */ 33 | 34 | /* use simd16 sampler, param 0 is u, param 1 is v. */ 35 | /* 'payload' loading, assuming tex coord start from g4 */ 36 | 37 | and.nz (1) null interleaved_uv 0x01UW {align1}; 38 | (f0) jmpi INTERLEAVED_UV; 39 | 40 | /* load r */ 41 | mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; 42 | 43 | /* src_msg will be copied with g0, as it contains send desc */ 44 | /* emit sampler 'send' cmd */ 45 | 46 | /* sample U (Cr) */ 47 | send (16) src_msg_ind /* msg reg index */ 48 | src_sample_g<1>UW /* readback */ 49 | g0<8,8,1>UW /* copy to msg start reg*/ 50 | sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype) 51 | /* here(src->dst) we should use src_sampler and src_surface */ 52 | mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ 53 | 54 | /* sample V (Cb) */ 55 | send (16) src_msg_ind /* msg reg index */ 56 | src_sample_b<1>UW /* readback */ 57 | g0<8,8,1>UW /* copy to msg start reg*/ 58 | sampler (5,4,F) /* sampler message description, (binding_table,sampler_index,datatype) 59 | /* here(src->dst) we should use src_sampler and src_surface */ 60 | mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ 61 | 62 | jmpi SAMPLE_Y; 63 | 64 | INTERLEAVED_UV: 65 | /* load r */ 66 | mov (1) g0.8<1>UD 0x0000c000UD { align1 mask_disable }; 67 | 68 | /* sample UV (CrCb) */ 69 | send (16) src_msg_ind /* msg reg index */ 70 | src_sample_g<1>UW /* readback */ 71 | g0<8,8,1>UW /* copy to msg start reg*/ 72 | sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype) 73 | /* here(src->dst) we should use src_sampler and src_surface */ 74 | mlen 5 rlen 4 { align1 }; /* required message len 5, readback len 8 */ 75 | 76 | /* load r */ 77 | mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; 78 | 79 | SAMPLE_Y: 80 | /* sample Y */ 81 | send (16) src_msg_ind /* msg reg index */ 82 | src_sample_r<1>UW /* readback */ 83 | g0<8,8,1>UW /* copy to msg start reg*/ 84 | sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) 85 | /* here(src->dst) we should use src_sampler and src_surface */ 86 | mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ 87 | 88 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g4b: -------------------------------------------------------------------------------- 1 | { 0x02000005, 0x20002d3c, 0x00000040, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 }, 3 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 4 | { 0x01800031, 0x22001d29, 0x008d0000, 0x02520203 }, 5 | { 0x01800031, 0x22401d29, 0x008d0000, 0x02520405 }, 6 | { 0x00000020, 0x34001c00, 0x00001400, 0x00000003 }, 7 | { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, 8 | { 0x01800031, 0x22001d29, 0x008d0000, 0x02540203 }, 9 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 10 | { 0x01800031, 0x21c01d29, 0x008d0000, 0x02520001 }, 11 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x02000005, 0x20002d3c, 0x00000040, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 }, 3 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 4 | { 0x01800031, 0x22001d29, 0x208d0000, 0x0a2a0203 }, 5 | { 0x01800031, 0x22401d29, 0x208d0000, 0x0a2a0405 }, 6 | { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 }, 7 | { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, 8 | { 0x01800031, 0x22001d29, 0x208d0000, 0x0a4a0203 }, 9 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 10 | { 0x01800031, 0x21c01d29, 0x208d0000, 0x0a2a0001 }, 11 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* Sample the src surface in planar format */ 29 | 30 | include(`exa_wm.g4i') 31 | /* UV flag */ 32 | define(`nv12', `g6.0<0,1,0>UW') 33 | 34 | /* prepare sampler read back gX register, which would be written back to output */ 35 | 36 | /* use simd16 sampler, param 0 is u, param 1 is v. */ 37 | /* 'payload' loading, assuming tex coord start from g4 */ 38 | cmp.g.f0.0 (1) null nv12 0x0UW {align1}; 39 | (f0.0) jmpi INTERLEAVED_UV; 40 | 41 | /* load r */ 42 | mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; 43 | mov (8) src_msg<1>UD g0<8,8,1>UD { align1 mask_disable }; 44 | 45 | /* src_msg will be copied with g0, as it contains send desc */ 46 | /* emit sampler 'send' cmd */ 47 | 48 | /* sample U (Cr) */ 49 | send (16) src_msg_ind /* msg reg index */ 50 | src_sample_g<1>UW /* readback */ 51 | null 52 | sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype) 53 | /* here(src->dst) we should use src_sampler and src_surface */ 54 | mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ 55 | 56 | /* sample V (Cb) */ 57 | mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; 58 | mov (8) src_msg<1>UD g0<8,8,1>UD { align1 mask_disable }; 59 | 60 | send (16) src_msg_ind /* msg reg index */ 61 | src_sample_b<1>UW /* readback */ 62 | null 63 | sampler (5,4,F) /* sampler message description, (binding_table,sampler_index,datatype) 64 | /* here(src->dst) we should use src_sampler and src_surface */ 65 | mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ 66 | 67 | jmpi SAMPLE_Y; 68 | 69 | INTERLEAVED_UV: 70 | mov (1) g0.8<1>UD 0x0000c000UD { align1 mask_disable }; 71 | mov (8) src_msg<1>UD g0<8,8,1>UD { align1 mask_disable }; 72 | 73 | /* sample UV (CrCb) */ 74 | send (16) src_msg_ind /* msg reg index */ 75 | src_sample_g<1>UW /* readback */ 76 | null 77 | sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype) 78 | /* here(src->dst) we should use src_sampler and src_surface */ 79 | mlen 5 rlen 4 { align1 }; /* required message len 5, readback len 8 */ 80 | 81 | SAMPLE_Y: 82 | mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; 83 | mov (8) src_msg<1>UD g0<8,8,1>UD { align1 mask_disable }; 84 | 85 | /* sample Y */ 86 | send (16) src_msg_ind /* msg reg index */ 87 | src_sample_r<1>UW /* readback */ 88 | null 89 | sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) 90 | /* here(src->dst) we should use src_sampler and src_surface */ 91 | mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ 92 | 93 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g6b: -------------------------------------------------------------------------------- 1 | { 0x03000010, 0x20002d3c, 0x000000c0, 0x00000000 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x0000000e }, 3 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 4 | { 0x00600201, 0x20200022, 0x008d0000, 0x00000000 }, 5 | { 0x02800031, 0x22001cc9, 0x00000020, 0x0a2a0203 }, 6 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 7 | { 0x00600201, 0x20200022, 0x008d0000, 0x00000000 }, 8 | { 0x02800031, 0x22401cc9, 0x00000020, 0x0a2a0405 }, 9 | { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 }, 10 | { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, 11 | { 0x00600201, 0x20200022, 0x008d0000, 0x00000000 }, 12 | { 0x02800031, 0x22001cc9, 0x00000020, 0x0a4a0203 }, 13 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 14 | { 0x00600201, 0x20200022, 0x008d0000, 0x00000000 }, 15 | { 0x02800031, 0x21c01cc9, 0x00000020, 0x0a2a0001 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g7b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x000000c0, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 }, 3 | { 0x01000010, 0x20002d3c, 0x000000c0, 0x00020002 }, 4 | { 0x00010020, 0x34001c00, 0x00001400, 0x0000000e }, 5 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 6 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 7 | { 0x02800031, 0x22001ca9, 0x00000820, 0x0a2c0203 }, 8 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 9 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 10 | { 0x02800031, 0x22401ca9, 0x00000820, 0x0a2c0405 }, 11 | { 0x00000020, 0x34001c00, 0x00001400, 0x0000000c }, 12 | { 0x00800201, 0x220003fd, 0x00000000, 0x3f000000 }, 13 | { 0x00800201, 0x224003fd, 0x00000000, 0x3f000000 }, 14 | { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 }, 15 | { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, 16 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 17 | { 0x02800031, 0x22001ca9, 0x00000820, 0x0a4c0203 }, 18 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 19 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 20 | { 0x02800031, 0x21c01ca9, 0x00000820, 0x0a2c0001 }, 21 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g7b.haswell: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x000000c0, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x000000c0 }, 3 | { 0x01000010, 0x20002d3c, 0x000000c0, 0x00020002 }, 4 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000070 }, 5 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 6 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 7 | { 0x02800031, 0x22001ca9, 0x00000820, 0x0a2c0203 }, 8 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 9 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 10 | { 0x02800031, 0x22401ca9, 0x00000820, 0x0a2c0405 }, 11 | { 0x00000020, 0x34001c00, 0x00001400, 0x00000060 }, 12 | { 0x00800201, 0x220003fd, 0x00000000, 0x3f000000 }, 13 | { 0x00800201, 0x224003fd, 0x00000000, 0x3f000000 }, 14 | { 0x00000020, 0x34001c00, 0x00001400, 0x00000030 }, 15 | { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, 16 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 17 | { 0x02800031, 0x22001ca9, 0x00000820, 0x0a4c0203 }, 18 | { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, 19 | { 0x00600201, 0x28200021, 0x008d0000, 0x00000000 }, 20 | { 0x02800031, 0x21c01ca9, 0x00000820, 0x0a2c0001 }, 21 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g8b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x200012e0, 0x160000c0, 0x00010001 }, 2 | { 0x00010020, 0x34000000, 0x0e001400, 0x000000c0 }, 3 | { 0x01000010, 0x200012e0, 0x160000c0, 0x00020002 }, 4 | { 0x00010020, 0x34000000, 0x0e001400, 0x00000070 }, 5 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, 6 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 7 | { 0x02800031, 0x22000a48, 0x0e000820, 0x0a2c0203 }, 8 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, 9 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 10 | { 0x02800031, 0x22400a48, 0x0e000820, 0x0a2c0405 }, 11 | { 0x00000020, 0x34000000, 0x0e001400, 0x00000060 }, 12 | { 0x00800001, 0x22003eec, 0x38000000, 0x3f000000 }, 13 | { 0x00800001, 0x22403eec, 0x38000000, 0x3f000000 }, 14 | { 0x00000020, 0x34000000, 0x0e001400, 0x00000030 }, 15 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000c000 }, 16 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 17 | { 0x02800031, 0x22000a48, 0x0e000820, 0x0a4c0203 }, 18 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, 19 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 20 | { 0x02800031, 0x21c00a48, 0x0e000820, 0x0a2c0001 }, 21 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_src_sample_planar.g9b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x200012e0, 0x160000c0, 0x00010001 }, 2 | { 0x00010020, 0x34000000, 0x0e001400, 0x000000c0 }, 3 | { 0x01000010, 0x200012e0, 0x160000c0, 0x00020002 }, 4 | { 0x00010020, 0x34000000, 0x0e001400, 0x00000070 }, 5 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, 6 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 7 | { 0x02800031, 0x22000a48, 0x06000820, 0x0a2c0203 }, 8 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, 9 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 10 | { 0x02800031, 0x22400a48, 0x06000820, 0x0a2c0405 }, 11 | { 0x00000020, 0x34000000, 0x0e001400, 0x00000060 }, 12 | { 0x00800001, 0x22003eec, 0x38000000, 0x3f000000 }, 13 | { 0x00800001, 0x22403eec, 0x38000000, 0x3f000000 }, 14 | { 0x00000020, 0x34000000, 0x0e001400, 0x00000030 }, 15 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000c000 }, 16 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 17 | { 0x02800031, 0x22000a48, 0x06000820, 0x0a4c0203 }, 18 | { 0x00000001, 0x2008060c, 0x00000000, 0x0000e000 }, 19 | { 0x00600001, 0x2820020c, 0x008d0000, 0x00000000 }, 20 | { 0x02800031, 0x21c00a48, 0x06000820, 0x0a2c0001 }, 21 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | include(`exa_wm.g4i') 29 | 30 | /* 31 | * Prepare data in m2-m5 for subspan(1,0), m6-m9 for subspan(3,2), 32 | * 33 | * Note that the SIMD16 write message takes data for the first 34 | * two sub-spans followed by the data for the second two sub-spans 35 | * instead of having the two sub-spans interleaved by channel. Weird. 36 | */ 37 | 38 | mov (8) data_port_r_01<1>F g14<8,8,1>F { align1 }; 39 | mov (8) data_port_g_01<1>F g16<8,8,1>F { align1 }; 40 | mov (8) data_port_b_01<1>F g18<8,8,1>F { align1 }; 41 | mov (8) data_port_a_01<1>F src_sample_a_01<8,8,1>F { align1 }; 42 | 43 | mov (8) data_port_r_23<1>F src_sample_r_23<8,8,1>F { sechalf align1 }; 44 | mov (8) data_port_g_23<1>F src_sample_g_23<8,8,1>F { sechalf align1 }; 45 | mov (8) data_port_b_23<1>F src_sample_b_23<8,8,1>F { sechalf align1 }; 46 | mov (8) data_port_a_23<1>F src_sample_a_23<8,8,1>F { sechalf align1 }; 47 | 48 | 49 | mov (8) data_port_r_01<1>F src_sample_r_01<8,8,1>F { align1 }; 50 | mov (8) data_port_g_01<1>F src_sample_g_01<8,8,1>F { align1 }; 51 | mov (8) data_port_b_01<1>F src_sample_b_01<8,8,1>F { align1 }; 52 | mov (8) data_port_a_01<1>F src_sample_a_01<8,8,1>F { align1 }; 53 | 54 | mov (8) data_port_r_23<1>F src_sample_r_23<8,8,1>F { sechalf align1 }; 55 | mov (8) data_port_g_23<1>F src_sample_g_23<8,8,1>F { sechalf align1 }; 56 | mov (8) data_port_b_23<1>F src_sample_b_23<8,8,1>F { sechalf align1 }; 57 | mov (8) data_port_a_23<1>F src_sample_a_23<8,8,1>F { sechalf align1 }; 58 | 59 | /* m0, m1 are all direct passed by PS thread payload */ 60 | mov (8) data_port_msg_1<1>UD g1<8,8,1>UD { mask_disable align1 }; 61 | 62 | /* write */ 63 | send (16) 64 | data_port_msg_0_ind 65 | acc0<1>UW 66 | g0<8,8,1>UW 67 | write ( 68 | 0, /* binding_table */ 69 | 8, /* pixel scordboard clear, msg type simd16 single source */ 70 | 4, /* render target write */ 71 | 0 /* no write commit message */ 72 | ) 73 | mlen 10 74 | rlen 0 75 | { align1 EOT }; 76 | 77 | nop; 78 | nop; 79 | nop; 80 | nop; 81 | nop; 82 | nop; 83 | nop; 84 | nop; 85 | 86 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g4b: -------------------------------------------------------------------------------- 1 | { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 }, 2 | { 0x00600001, 0x206003be, 0x008d0200, 0x00000000 }, 3 | { 0x00600001, 0x208003be, 0x008d0240, 0x00000000 }, 4 | { 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 }, 5 | { 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 }, 6 | { 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 }, 7 | { 0x00601001, 0x210003be, 0x008d0260, 0x00000000 }, 8 | { 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 }, 9 | { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 }, 10 | { 0x00600001, 0x206003be, 0x008d0200, 0x00000000 }, 11 | { 0x00600001, 0x208003be, 0x008d0240, 0x00000000 }, 12 | { 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 }, 13 | { 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 }, 14 | { 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 }, 15 | { 0x00601001, 0x210003be, 0x008d0260, 0x00000000 }, 16 | { 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 }, 17 | { 0x00600201, 0x20200022, 0x008d0020, 0x00000000 }, 18 | { 0x00800031, 0x24001d28, 0x008d0000, 0x85a04800 }, 19 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 20 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 21 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 22 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 23 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 24 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 25 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 26 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 27 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 }, 2 | { 0x00600001, 0x206003be, 0x008d0200, 0x00000000 }, 3 | { 0x00600001, 0x208003be, 0x008d0240, 0x00000000 }, 4 | { 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 }, 5 | { 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 }, 6 | { 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 }, 7 | { 0x00601001, 0x210003be, 0x008d0260, 0x00000000 }, 8 | { 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 }, 9 | { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 }, 10 | { 0x00600001, 0x206003be, 0x008d0200, 0x00000000 }, 11 | { 0x00600001, 0x208003be, 0x008d0240, 0x00000000 }, 12 | { 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 }, 13 | { 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 }, 14 | { 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 }, 15 | { 0x00601001, 0x210003be, 0x008d0260, 0x00000000 }, 16 | { 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 }, 17 | { 0x00600201, 0x20200022, 0x008d0020, 0x00000000 }, 18 | { 0x00800031, 0x24001d28, 0x548d0000, 0x94084800 }, 19 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 20 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 21 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 22 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 23 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 24 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 25 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 26 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 27 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | */ 24 | 25 | include(`exa_wm.g4i') 26 | 27 | /* 28 | * Prepare data in m2-m3 for Red channel, m4-m5 for Green channel, 29 | * m6-m7 for Blue and m8-m9 for Alpha channel 30 | */ 31 | define(`slot_r_00', `m2') 32 | define(`slot_r_01', `m3') 33 | define(`slot_g_00', `m4') 34 | define(`slot_g_01', `m5') 35 | define(`slot_b_00', `m6') 36 | define(`slot_b_01', `m7') 37 | define(`slot_a_00', `m8') 38 | define(`slot_a_01', `m9') 39 | define(`data_port_msg_2_ind', `2') 40 | 41 | mov (8) slot_r_00<1>F src_sample_r_01<8,8,1>F { align1 }; 42 | mov (8) slot_r_01<1>F src_sample_r_23<8,8,1>F { align1 }; 43 | 44 | mov (8) slot_g_00<1>F src_sample_g_01<8,8,1>F { align1 }; 45 | mov (8) slot_g_01<1>F src_sample_g_23<8,8,1>F { align1 }; 46 | 47 | mov (8) slot_b_00<1>F src_sample_b_01<8,8,1>F { align1 }; 48 | mov (8) slot_b_01<1>F src_sample_b_23<8,8,1>F { align1 }; 49 | 50 | mov (8) slot_a_00<1>F src_sample_a_01<8,8,1>F { align1 }; 51 | mov (8) slot_a_01<1>F src_sample_a_23<8,8,1>F { align1 }; 52 | 53 | /* write */ 54 | send (16) 55 | data_port_msg_2_ind 56 | acc0<1>UW 57 | null 58 | write ( 59 | 0, /* binding_table */ 60 | 16, /* pixel scordboard clear, msg type simd16 single source */ 61 | 12, /* render target write */ 62 | 0, /* no write commit message */ 63 | 0 /* headerless render target write */ 64 | ) 65 | mlen 8 66 | rlen 0 67 | { align1 EOT }; 68 | 69 | nop; 70 | nop; 71 | nop; 72 | nop; 73 | nop; 74 | nop; 75 | nop; 76 | nop; 77 | 78 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g6b: -------------------------------------------------------------------------------- 1 | { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 }, 2 | { 0x00600001, 0x206003be, 0x008d01e0, 0x00000000 }, 3 | { 0x00600001, 0x208003be, 0x008d0200, 0x00000000 }, 4 | { 0x00600001, 0x20a003be, 0x008d0220, 0x00000000 }, 5 | { 0x00600001, 0x20c003be, 0x008d0240, 0x00000000 }, 6 | { 0x00600001, 0x20e003be, 0x008d0260, 0x00000000 }, 7 | { 0x00600001, 0x210003be, 0x008d0280, 0x00000000 }, 8 | { 0x00600001, 0x212003be, 0x008d02a0, 0x00000000 }, 9 | { 0x05800031, 0x24001cc8, 0x00000040, 0x90019000 }, 10 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 11 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 12 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 13 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 14 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 15 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 16 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 17 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 18 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | */ 24 | 25 | include(`exa_wm.g4i') 26 | 27 | /* header */ 28 | define(`data_port_msg_2_0', `g64') 29 | define(`data_port_msg_2_1', `g65') 30 | define(`data_port_msg_2_ind', `64') 31 | 32 | mov (8) data_port_msg_2_0<1>UD g0<8,8,1>UD {align1 mask_disable}; 33 | mov (8) data_port_msg_2_1<1>UD g1<8,8,1>UD {align1 mask_disable}; 34 | 35 | /* 36 | * Prepare data in g66-g67 for Red channel, g68-g69 for Green channel, 37 | * g70-g71 for Blue and g72-g73 for Alpha channel 38 | */ 39 | define(`slot_r_00', `g66') 40 | define(`slot_r_01', `g67') 41 | define(`slot_g_00', `g68') 42 | define(`slot_g_01', `g69') 43 | define(`slot_b_00', `g70') 44 | define(`slot_b_01', `g71') 45 | define(`slot_a_00', `g72') 46 | define(`slot_a_01', `g73') 47 | 48 | mov (8) slot_r_00<1>F src_sample_r_01<8,8,1>F { align1 mask_disable }; 49 | mov (8) slot_r_01<1>F src_sample_r_23<8,8,1>F { align1 mask_disable }; 50 | 51 | mov (8) slot_g_00<1>F src_sample_g_01<8,8,1>F { align1 mask_disable }; 52 | mov (8) slot_g_01<1>F src_sample_g_23<8,8,1>F { align1 mask_disable }; 53 | 54 | mov (8) slot_b_00<1>F src_sample_b_01<8,8,1>F { align1 mask_disable }; 55 | mov (8) slot_b_01<1>F src_sample_b_23<8,8,1>F { align1 mask_disable }; 56 | 57 | mov (8) slot_a_00<1>F src_sample_a_01<8,8,1>F { align1 mask_disable }; 58 | mov (8) slot_a_01<1>F src_sample_a_23<8,8,1>F { align1 mask_disable }; 59 | 60 | send (16) 61 | data_port_msg_2_ind 62 | null<1>UW 63 | null 64 | write ( 65 | 0, /* binding table index */ 66 | 16, /* last render target(1) + slots 15:0(0) + msg type simd16 single source(000) */ 67 | 12, /* render target write */ 68 | 0, /* ignore for Ivybridge */ 69 | 1 /* header present */ 70 | ) 71 | mlen 10 72 | rlen 0 73 | { align1 EOT }; 74 | 75 | nop; 76 | nop; 77 | nop; 78 | nop; 79 | nop; 80 | nop; 81 | nop; 82 | nop; 83 | 84 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g7b: -------------------------------------------------------------------------------- 1 | { 0x00600201, 0x28000021, 0x008d0000, 0x00000000 }, 2 | { 0x00600201, 0x28200021, 0x008d0020, 0x00000000 }, 3 | { 0x00600201, 0x284003bd, 0x008d01c0, 0x00000000 }, 4 | { 0x00600201, 0x286003bd, 0x008d01e0, 0x00000000 }, 5 | { 0x00600201, 0x288003bd, 0x008d0200, 0x00000000 }, 6 | { 0x00600201, 0x28a003bd, 0x008d0220, 0x00000000 }, 7 | { 0x00600201, 0x28c003bd, 0x008d0240, 0x00000000 }, 8 | { 0x00600201, 0x28e003bd, 0x008d0260, 0x00000000 }, 9 | { 0x00600201, 0x290003bd, 0x008d0280, 0x00000000 }, 10 | { 0x00600201, 0x292003bd, 0x008d02a0, 0x00000000 }, 11 | { 0x05800031, 0x20001ca8, 0x00000800, 0x940b1000 }, 12 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 13 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 14 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 15 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 16 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 17 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 18 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 19 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 20 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g8a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | */ 24 | 25 | include(`exa_wm.g4i') 26 | 27 | /* header */ 28 | define(`data_port_msg_2_0', `g64') 29 | define(`data_port_msg_2_1', `g65') 30 | define(`data_port_msg_2_ind', `64') 31 | 32 | mov (8) data_port_msg_2_0<1>UD g0<8,8,1>UD {align1 mask_disable}; 33 | mov (8) data_port_msg_2_1<1>UD g1<8,8,1>UD {align1 mask_disable}; 34 | 35 | /* 36 | * Prepare data in g66-g67 for Red channel, g68-g69 for Green channel, 37 | * g70-g71 for Blue and g72-g73 for Alpha channel 38 | */ 39 | define(`slot_r_00', `g66') 40 | define(`slot_r_01', `g67') 41 | define(`slot_g_00', `g68') 42 | define(`slot_g_01', `g69') 43 | define(`slot_b_00', `g70') 44 | define(`slot_b_01', `g71') 45 | define(`slot_a_00', `g72') 46 | define(`slot_a_01', `g73') 47 | 48 | mov (8) slot_r_00<1>F src_sample_r_01<8,8,1>F { align1 mask_disable }; 49 | mov (8) slot_r_01<1>F src_sample_r_23<8,8,1>F { align1 mask_disable }; 50 | 51 | mov (8) slot_g_00<1>F src_sample_g_01<8,8,1>F { align1 mask_disable }; 52 | mov (8) slot_g_01<1>F src_sample_g_23<8,8,1>F { align1 mask_disable }; 53 | 54 | mov (8) slot_b_00<1>F src_sample_b_01<8,8,1>F { align1 mask_disable }; 55 | mov (8) slot_b_01<1>F src_sample_b_23<8,8,1>F { align1 mask_disable }; 56 | 57 | mov (8) slot_a_00<1>F src_sample_a_01<8,8,1>F { align1 mask_disable }; 58 | mov (8) slot_a_01<1>F src_sample_a_23<8,8,1>F { align1 mask_disable }; 59 | 60 | send (16) 61 | data_port_msg_2_ind 62 | null<1>UW 63 | null 64 | write ( 65 | 0, /* binding table index */ 66 | 16, /* last render target(1) + slots 15:0(0) + msg type simd16 single source(000) */ 67 | 12, /* render target write */ 68 | 0, /* ignore for Ivybridge */ 69 | 1 /* header present */ 70 | ) 71 | mlen 10 72 | rlen 0 73 | { align1 EOT }; 74 | 75 | nop; 76 | nop; 77 | nop; 78 | nop; 79 | nop; 80 | nop; 81 | nop; 82 | nop; 83 | 84 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g8b: -------------------------------------------------------------------------------- 1 | { 0x00600001, 0x2800020c, 0x008d0000, 0x00000000 }, 2 | { 0x00600001, 0x2820020c, 0x008d0020, 0x00000000 }, 3 | { 0x00600001, 0x28403aec, 0x008d01c0, 0x00000000 }, 4 | { 0x00600001, 0x28603aec, 0x008d01e0, 0x00000000 }, 5 | { 0x00600001, 0x28803aec, 0x008d0200, 0x00000000 }, 6 | { 0x00600001, 0x28a03aec, 0x008d0220, 0x00000000 }, 7 | { 0x00600001, 0x28c03aec, 0x008d0240, 0x00000000 }, 8 | { 0x00600001, 0x28e03aec, 0x008d0260, 0x00000000 }, 9 | { 0x00600001, 0x29003aec, 0x008d0280, 0x00000000 }, 10 | { 0x00600001, 0x29203aec, 0x008d02a0, 0x00000000 }, 11 | { 0x05800031, 0x20000a40, 0x0e000800, 0x940b1000 }, 12 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 13 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 14 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 15 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 16 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 17 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 18 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 19 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 20 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_write.g9b: -------------------------------------------------------------------------------- 1 | { 0x00600001, 0x2e00020c, 0x008d0000, 0x00000000 }, 2 | { 0x00600001, 0x2e20020c, 0x008d0020, 0x00000000 }, 3 | { 0x00600001, 0x2e403aec, 0x008d01c0, 0x00000000 }, 4 | { 0x00600001, 0x2e603aec, 0x008d01e0, 0x00000000 }, 5 | { 0x00600001, 0x2e803aec, 0x008d0200, 0x00000000 }, 6 | { 0x00600001, 0x2ea03aec, 0x008d0220, 0x00000000 }, 7 | { 0x00600001, 0x2ec03aec, 0x008d0240, 0x00000000 }, 8 | { 0x00600001, 0x2ee03aec, 0x008d0260, 0x00000000 }, 9 | { 0x00600001, 0x2f003aec, 0x008d0280, 0x00000000 }, 10 | { 0x00600001, 0x2f203aec, 0x008d02a0, 0x00000000 }, 11 | { 0x05800031, 0x20000a40, 0x06000e00, 0x940b1000 }, 12 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 13 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 14 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 15 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 16 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 17 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 18 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 19 | { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, 20 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_xy.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Wang Zhenyu 25 | * Keith Packard 26 | */ 27 | 28 | /* 29 | * Register assignments: 30 | * 31 | * x g6/g7 32 | * y g8/g9 33 | * 34 | * temp x g10/g11 35 | * temp y g12/g13 36 | * 37 | * src w g14/g15 38 | * src u m1/m2 39 | * src v m3/m4 40 | */ 41 | 42 | /* Fragment to compute per-pixel XY values */ 43 | 44 | include(`exa_wm.g4i') 45 | 46 | /* Load X and Y coordinates and compute per-pixel coordinates */ 47 | add (16) temp_x_uw<1>UW dst_x_uw 0x10101010V { align1 }; 48 | add (16) temp_y_uw<1>UW dst_y_uw 0x11001100V { align1 }; 49 | 50 | /* subtract screen-space origin of vertex 0 */ 51 | add (16) dst_x<1>F temp_x_uw<8,8,1>UW -screen_x0 { compr align1 }; 52 | add (16) dst_y<1>F temp_y_uw<8,8,1>UW -screen_y0 { compr align1 }; 53 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_xy.g4b: -------------------------------------------------------------------------------- 1 | { 0x00800040, 0x23c06d29, 0x00480028, 0x10101010 }, 2 | { 0x00800040, 0x23806d29, 0x0048002a, 0x11001100 }, 3 | { 0x00802040, 0x2540753d, 0x008d03c0, 0x00004020 }, 4 | { 0x00802040, 0x2580753d, 0x008d0380, 0x00004024 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_xy.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x00800040, 0x23c06d29, 0x00480028, 0x10101010 }, 2 | { 0x00800040, 0x23806d29, 0x0048002a, 0x11001100 }, 3 | { 0x00802040, 0x2540753d, 0x008d03c0, 0x00004020 }, 4 | { 0x00802040, 0x2580753d, 0x008d0380, 0x00004024 }, 5 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Haihao Xiang 25 | * 26 | */ 27 | 28 | include(`exa_wm.g4i') 29 | 30 | /* Color Balance parameters */ 31 | define(`skip_color_balance', `g2.2<0,1,0>uw') 32 | define(`contrast', `g2.16<0,1,0>f') 33 | define(`brightness', `g2.20<0,1,0>f') 34 | define(`cos_c_s', `g2.24<0,1,0>f') 35 | define(`sin_c_s', `g2.28<0,1,0>f') 36 | define(`sin_c_s_t', `g2.28') 37 | 38 | include(`exa_wm_yuv_color_balance.gxa') 39 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g4b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x00000042, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x0000000d }, 3 | { 0x00802040, 0x24007fbd, 0x008d01c0, 0xbd808081 }, 4 | { 0x00802041, 0x240077bd, 0x008d0400, 0x00000050 }, 5 | { 0x00802040, 0x240077bd, 0x008d0400, 0x00000054 }, 6 | { 0x00802040, 0x21c07fbd, 0x008d0400, 0x3d808081 }, 7 | { 0x00802040, 0x24807fbd, 0x008d0200, 0xbf008084 }, 8 | { 0x00802040, 0x24407fbd, 0x008d0240, 0xbf008084 }, 9 | { 0x00802001, 0x240003fc, 0x00000000, 0x3f008084 }, 10 | { 0x00802048, 0x240077bc, 0x008d0440, 0x0000005c }, 11 | { 0x00802048, 0x220077bd, 0x008d0480, 0x00000058 }, 12 | { 0x00000041, 0x205c7fbd, 0x0000005c, 0xbf800000 }, 13 | { 0x00802001, 0x240003fc, 0x00000000, 0x3f008084 }, 14 | { 0x00802048, 0x240077bc, 0x008d0480, 0x0000005c }, 15 | { 0x00802048, 0x224077bd, 0x008d0440, 0x00000058 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x00000042, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x0000001a }, 3 | { 0x00802040, 0x24007fbd, 0x008d01c0, 0xbd808081 }, 4 | { 0x00802041, 0x240077bd, 0x008d0400, 0x00000050 }, 5 | { 0x00802040, 0x240077bd, 0x008d0400, 0x00000054 }, 6 | { 0x00802040, 0x21c07fbd, 0x008d0400, 0x3d808081 }, 7 | { 0x00802040, 0x24807fbd, 0x008d0200, 0xbf008084 }, 8 | { 0x00802040, 0x24407fbd, 0x008d0240, 0xbf008084 }, 9 | { 0x00802001, 0x240003fc, 0x00000000, 0x3f008084 }, 10 | { 0x00802048, 0x240077bc, 0x008d0440, 0x0000005c }, 11 | { 0x00802048, 0x220077bd, 0x008d0480, 0x00000058 }, 12 | { 0x00000041, 0x205c7fbd, 0x0000005c, 0xbf800000 }, 13 | { 0x00802001, 0x240003fc, 0x00000000, 0x3f008084 }, 14 | { 0x00802048, 0x240077bc, 0x008d0480, 0x0000005c }, 15 | { 0x00802048, 0x224077bd, 0x008d0440, 0x00000058 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Haihao Xiang 25 | * 26 | */ 27 | 28 | include(`exa_wm.g4i') 29 | 30 | /* Color Balance parameters */ 31 | define(`skip_color_balance', `g6.2<0,1,0>uw') 32 | define(`contrast', `g6.16<0,1,0>f') 33 | define(`brightness', `g6.20<0,1,0>f') 34 | define(`cos_c_s', `g6.24<0,1,0>f') 35 | define(`sin_c_s', `g6.28<0,1,0>f') 36 | define(`sin_c_s_t', `g6.28') 37 | 38 | include(`exa_wm_yuv_color_balance.gxa') 39 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g6b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x000000c2, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x0000001a }, 3 | { 0x00800040, 0x24007fbd, 0x008d01c0, 0xbd808081 }, 4 | { 0x00800041, 0x240077bd, 0x008d0400, 0x000000d0 }, 5 | { 0x00800040, 0x240077bd, 0x008d0400, 0x000000d4 }, 6 | { 0x00800040, 0x21c07fbd, 0x008d0400, 0x3d808081 }, 7 | { 0x00800040, 0x24807fbd, 0x008d0200, 0xbf008084 }, 8 | { 0x00800040, 0x24407fbd, 0x008d0240, 0xbf008084 }, 9 | { 0x00800001, 0x240003fc, 0x00000000, 0x3f008084 }, 10 | { 0x00800048, 0x240077bc, 0x008d0440, 0x000000dc }, 11 | { 0x00800048, 0x220077bd, 0x008d0480, 0x000000d8 }, 12 | { 0x00000041, 0x20dc7fbd, 0x000000dc, 0xbf800000 }, 13 | { 0x00800001, 0x240003fc, 0x00000000, 0x3f008084 }, 14 | { 0x00800048, 0x240077bc, 0x008d0480, 0x000000dc }, 15 | { 0x00800048, 0x224077bd, 0x008d0440, 0x000000d8 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Haihao Xiang 25 | * 26 | */ 27 | 28 | include(`exa_wm.g4i') 29 | 30 | /* Color Balance parameters */ 31 | define(`skip_color_balance', `g6.2<0,1,0>uw') 32 | define(`contrast', `g6.16<0,1,0>f') 33 | define(`brightness', `g6.20<0,1,0>f') 34 | define(`cos_c_s', `g6.24<0,1,0>f') 35 | define(`sin_c_s', `g6.28<0,1,0>f') 36 | define(`sin_c_s_t', `g6.28') 37 | 38 | include(`exa_wm_yuv_color_balance.gxa') 39 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g7b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x000000c2, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x0000001a }, 3 | { 0x00800040, 0x24007fbd, 0x008d01c0, 0xbd808081 }, 4 | { 0x00800041, 0x240077bd, 0x008d0400, 0x000000d0 }, 5 | { 0x00800040, 0x240077bd, 0x008d0400, 0x000000d4 }, 6 | { 0x00800040, 0x21c07fbd, 0x008d0400, 0x3d808081 }, 7 | { 0x00800040, 0x24807fbd, 0x008d0200, 0xbf008084 }, 8 | { 0x00800040, 0x24407fbd, 0x008d0240, 0xbf008084 }, 9 | { 0x00800001, 0x240003fc, 0x00000000, 0x3f008084 }, 10 | { 0x00800048, 0x240077bc, 0x008d0440, 0x000000dc }, 11 | { 0x00800048, 0x220077bd, 0x008d0480, 0x000000d8 }, 12 | { 0x00000041, 0x20dc7fbd, 0x000000dc, 0xbf800000 }, 13 | { 0x00800001, 0x240003fc, 0x00000000, 0x3f008084 }, 14 | { 0x00800048, 0x240077bc, 0x008d0480, 0x000000dc }, 15 | { 0x00800048, 0x224077bd, 0x008d0440, 0x000000d8 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g7b.haswell: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x20002d3c, 0x000000c2, 0x00010001 }, 2 | { 0x00010020, 0x34001c00, 0x00001400, 0x000000d0 }, 3 | { 0x00800040, 0x24007fbd, 0x008d01c0, 0xbd808081 }, 4 | { 0x00800041, 0x240077bd, 0x008d0400, 0x000000d0 }, 5 | { 0x00800040, 0x240077bd, 0x008d0400, 0x000000d4 }, 6 | { 0x00800040, 0x21c07fbd, 0x008d0400, 0x3d808081 }, 7 | { 0x00800040, 0x24807fbd, 0x008d0200, 0xbf008084 }, 8 | { 0x00800040, 0x24407fbd, 0x008d0240, 0xbf008084 }, 9 | { 0x00800001, 0x240003fc, 0x00000000, 0x3f008084 }, 10 | { 0x00800048, 0x240077bc, 0x008d0440, 0x000000dc }, 11 | { 0x00800048, 0x220077bd, 0x008d0480, 0x000000d8 }, 12 | { 0x00000041, 0x20dc7fbd, 0x000000dc, 0xbf800000 }, 13 | { 0x00800001, 0x240003fc, 0x00000000, 0x3f008084 }, 14 | { 0x00800048, 0x240077bc, 0x008d0480, 0x000000dc }, 15 | { 0x00800048, 0x224077bd, 0x008d0440, 0x000000d8 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g8a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Haihao Xiang 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | include(`exa_wm.g4i') 30 | 31 | /* Color Balance parameters */ 32 | define(`skip_color_balance', `g6.2<0,1,0>uw') 33 | define(`contrast', `g6.16<0,1,0>f') 34 | define(`brightness', `g6.20<0,1,0>f') 35 | define(`cos_c_s', `g6.24<0,1,0>f') 36 | define(`sin_c_s', `g6.28<0,1,0>f') 37 | define(`sin_c_s_t', `g6.28') 38 | 39 | include(`exa_wm_yuv_color_balance.gxa') 40 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g8b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x200012e0, 0x160000c2, 0x00010001 }, 2 | { 0x00010020, 0x34000000, 0x0e001400, 0x000000d0 }, 3 | { 0x00800040, 0x24003ae8, 0x3e8d01c0, 0xbd808081 }, 4 | { 0x00800041, 0x24003ae8, 0x3a8d0400, 0x000000d0 }, 5 | { 0x00800040, 0x24003ae8, 0x3a8d0400, 0x000000d4 }, 6 | { 0x00800040, 0x21c03ae8, 0x3e8d0400, 0x3d808081 }, 7 | { 0x00800040, 0x24803ae8, 0x3e8d0200, 0xbf008084 }, 8 | { 0x00800040, 0x24403ae8, 0x3e8d0240, 0xbf008084 }, 9 | { 0x00800001, 0x24003ee0, 0x38000000, 0x3f008084 }, 10 | { 0x00800048, 0x24003ae0, 0x3a8d0440, 0x000000dc }, 11 | { 0x00800048, 0x22003ae8, 0x3a8d0480, 0x000000d8 }, 12 | { 0x00000041, 0x20dc3ae8, 0x3e0000dc, 0xbf800000 }, 13 | { 0x00800001, 0x24003ee0, 0x38000000, 0x3f008084 }, 14 | { 0x00800048, 0x24003ae0, 0x3a8d0480, 0x000000dc }, 15 | { 0x00800048, 0x22403ae8, 0x3a8d0440, 0x000000d8 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.g9b: -------------------------------------------------------------------------------- 1 | { 0x01000010, 0x200012e0, 0x160000c2, 0x00010001 }, 2 | { 0x00010020, 0x34000000, 0x0e001400, 0x000000d0 }, 3 | { 0x00800040, 0x24003ae8, 0x3e8d01c0, 0xbd808081 }, 4 | { 0x00800041, 0x24003ae8, 0x3a8d0400, 0x000000d0 }, 5 | { 0x00800040, 0x24003ae8, 0x3a8d0400, 0x000000d4 }, 6 | { 0x00800040, 0x21c03ae8, 0x3e8d0400, 0x3d808081 }, 7 | { 0x00800040, 0x24803ae8, 0x3e8d0200, 0xbf008084 }, 8 | { 0x00800040, 0x24403ae8, 0x3e8d0240, 0xbf008084 }, 9 | { 0x00800001, 0x24003ee0, 0x38000000, 0x3f008084 }, 10 | { 0x00800048, 0x24003ae0, 0x3a8d0440, 0x000000dc }, 11 | { 0x00800048, 0x22003ae8, 0x3a8d0480, 0x000000d8 }, 12 | { 0x00000041, 0x20dc3ae8, 0x3e0000dc, 0xbf800000 }, 13 | { 0x00800001, 0x24003ee0, 0x38000000, 0x3f008084 }, 14 | { 0x00800048, 0x24003ae0, 0x3a8d0480, 0x000000dc }, 15 | { 0x00800048, 0x22403ae8, 0x3a8d0440, 0x000000d8 }, 16 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_color_balance.gxa: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Haihao Xiang 25 | * 26 | */ 27 | 28 | define(`Cr', `src_sample_b') 29 | define(`Cr_01', `src_sample_b_01') 30 | define(`Cr_23', `src_sample_b_23') 31 | 32 | define(`Y', `src_sample_r') 33 | define(`Y_01', `src_sample_r_01') 34 | define(`Y_23', `src_sample_r_23') 35 | 36 | define(`Cb', `src_sample_g') 37 | define(`Cb_01', `src_sample_g_01') 38 | define(`Cb_23', `src_sample_g_23') 39 | 40 | define(`Crn', `color_balance_g') 41 | define(`Crn_01', `color_balance_g_01') 42 | define(`Crn_23', `color_balance_g_23') 43 | 44 | define(`Yn', `color_balance_r') 45 | define(`Yn_01', `color_balance_r_01') 46 | define(`Yn_23', `color_balance_r_23') 47 | 48 | define(`Cbn', `color_balance_b') 49 | define(`Cbn_01', `color_balance_b_01') 50 | define(`Cbn_23', `color_balance_b_23') 51 | 52 | cmp.e.f0.0 (1) null skip_color_balance 0x1uw {align1}; 53 | (f0.0) jmpi _DONE_COLOR_BALANCE; 54 | 55 | /* Yout = (Yin - 16 / 255) * contrast + brightness + 16 / 255 */ 56 | add (16) Yn<1>F Y<8,8,1>F -0.0627451F { compr align1 }; 57 | mul (16) Yn<1>F Yn<8,8,1>F contrast { compr align1 }; 58 | add (16) Yn<1>F Yn<8,8,1>F brightness { compr align1 }; 59 | add (16) Y<1>F Yn<8,8,1>F 0.0627451F { compr align1 }; 60 | 61 | /* Uout = (Uin - 128 / 255) * cos_c_s + (Vin - 128 / 255) * sin_c_s + 128 / 255 */ 62 | /* Vout = (Vin - 128 / 255) * cos_c_s - (Uin - 128 / 255) * sin_c_s + 128 / 255 */ 63 | add (16) Cbn<1>F Cb<8,8,1>F -0.501961F { compr align1 }; 64 | add (16) Crn<1>F Cr<8,8,1>F -0.501961F { compr align1 }; 65 | 66 | mov (16) acc0<1>F 0.501961F { compr align1 }; 67 | mac (16) acc0<1>F Crn<8,8,1>F sin_c_s { compr align1 }; 68 | mac (16) Cb<1>F Cbn<8,8,1>F cos_c_s { compr align1 }; 69 | 70 | mul (1) sin_c_s_t<1>F sin_c_s -1.0F { align1}; 71 | mov (16) acc0<1>F 0.501961F { compr align1 }; 72 | mac (16) acc0<1>F Cbn<8,8,1>F sin_c_s { compr align1 }; 73 | mac (16) Cr<1>F Crn<8,8,1>F cos_c_s { compr align1 }; 74 | 75 | _DONE_COLOR_BALANCE: 76 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g4a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006-2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Keith Packard 25 | * Eric Anholt 26 | * 27 | */ 28 | 29 | include(`exa_wm.g4i') 30 | include(`exa_yuv_gen4.g4i') 31 | include(`exa_yuv_rgb.gxa') 32 | 33 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g4b: -------------------------------------------------------------------------------- 1 | { 0x00802040, 0x22c077bd, 0x008d01c0, 0x0000006c }, 2 | { 0x00802040, 0x230077bd, 0x008d0200, 0x0000007c }, 3 | { 0x00802040, 0x234077bd, 0x008d0240, 0x0000008c }, 4 | { 0x00802041, 0x240077bc, 0x008d02c0, 0x00000060 }, 5 | { 0x00802048, 0x240077bc, 0x008d0300, 0x00000064 }, 6 | { 0x80802048, 0x21c077bd, 0x008d0340, 0x00000068 }, 7 | { 0x00802041, 0x240077bc, 0x008d02c0, 0x00000070 }, 8 | { 0x00802048, 0x240077bc, 0x008d0300, 0x00000074 }, 9 | { 0x80802048, 0x220077bd, 0x008d0340, 0x00000078 }, 10 | { 0x00802041, 0x240077bc, 0x008d02c0, 0x00000080 }, 11 | { 0x00802048, 0x240077bc, 0x008d0300, 0x00000084 }, 12 | { 0x80802048, 0x224077bd, 0x008d0340, 0x00000088 }, 13 | { 0x00802001, 0x228003fd, 0x00000000, 0x3f800000 }, 14 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g4b.gen5: -------------------------------------------------------------------------------- 1 | { 0x00802040, 0x22c077bd, 0x008d01c0, 0x0000006c }, 2 | { 0x00802040, 0x230077bd, 0x008d0200, 0x0000007c }, 3 | { 0x00802040, 0x234077bd, 0x008d0240, 0x0000008c }, 4 | { 0x00802041, 0x240077bc, 0x008d02c0, 0x00000060 }, 5 | { 0x00802048, 0x240077bc, 0x008d0300, 0x00000064 }, 6 | { 0x80802048, 0x21c077bd, 0x008d0340, 0x00000068 }, 7 | { 0x00802041, 0x240077bc, 0x008d02c0, 0x00000070 }, 8 | { 0x00802048, 0x240077bc, 0x008d0300, 0x00000074 }, 9 | { 0x80802048, 0x220077bd, 0x008d0340, 0x00000078 }, 10 | { 0x00802041, 0x240077bc, 0x008d02c0, 0x00000080 }, 11 | { 0x00802048, 0x240077bc, 0x008d0300, 0x00000084 }, 12 | { 0x80802048, 0x224077bd, 0x008d0340, 0x00000088 }, 13 | { 0x00802001, 0x228003fd, 0x00000000, 0x3f800000 }, 14 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006-2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Keith Packard 25 | * Eric Anholt 26 | * 27 | */ 28 | 29 | include(`exa_wm.g4i') 30 | include(`exa_yuv_gen6.g4i') 31 | include(`exa_yuv_rgb.gxa') 32 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g6b: -------------------------------------------------------------------------------- 1 | { 0x00800040, 0x22c077bd, 0x008d01c0, 0x000000ec }, 2 | { 0x00800040, 0x230077bd, 0x008d0200, 0x000000fc }, 3 | { 0x00800040, 0x234077bd, 0x008d0240, 0x0000010c }, 4 | { 0x00800041, 0x240077bc, 0x008d02c0, 0x000000e0 }, 5 | { 0x00800048, 0x240077bc, 0x008d0300, 0x000000e4 }, 6 | { 0x80800048, 0x21c077bd, 0x008d0340, 0x000000e8 }, 7 | { 0x00800041, 0x240077bc, 0x008d02c0, 0x000000f0 }, 8 | { 0x00800048, 0x240077bc, 0x008d0300, 0x000000f4 }, 9 | { 0x80800048, 0x220077bd, 0x008d0340, 0x000000f8 }, 10 | { 0x00800041, 0x240077bc, 0x008d02c0, 0x00000100 }, 11 | { 0x00800048, 0x240077bc, 0x008d0300, 0x00000104 }, 12 | { 0x80800048, 0x224077bd, 0x008d0340, 0x00000108 }, 13 | { 0x00800001, 0x228003fd, 0x00000000, 0x3f800000 }, 14 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2006-2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Keith Packard 25 | * Eric Anholt 26 | * 27 | */ 28 | 29 | include(`exa_wm.g4i') 30 | include(`exa_yuv_gen6.g4i') 31 | include(`exa_yuv_rgb.gxa') 32 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g7b: -------------------------------------------------------------------------------- 1 | { 0x00800040, 0x22c077bd, 0x008d01c0, 0x000000ec }, 2 | { 0x00800040, 0x230077bd, 0x008d0200, 0x000000fc }, 3 | { 0x00800040, 0x234077bd, 0x008d0240, 0x0000010c }, 4 | { 0x00800041, 0x240077bc, 0x008d02c0, 0x000000e0 }, 5 | { 0x00800048, 0x240077bc, 0x008d0300, 0x000000e4 }, 6 | { 0x80800048, 0x21c077bd, 0x008d0340, 0x000000e8 }, 7 | { 0x00800041, 0x240077bc, 0x008d02c0, 0x000000f0 }, 8 | { 0x00800048, 0x240077bc, 0x008d0300, 0x000000f4 }, 9 | { 0x80800048, 0x220077bd, 0x008d0340, 0x000000f8 }, 10 | { 0x00800041, 0x240077bc, 0x008d02c0, 0x00000100 }, 11 | { 0x00800048, 0x240077bc, 0x008d0300, 0x00000104 }, 12 | { 0x80800048, 0x224077bd, 0x008d0340, 0x00000108 }, 13 | { 0x00800001, 0x228003fd, 0x00000000, 0x3f800000 }, 14 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g8a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Keith Packard 25 | * Eric Anholt 26 | * Zhao Yakui 27 | * 28 | */ 29 | 30 | include(`exa_wm.g4i') 31 | include(`exa_yuv_gen6.g4i') 32 | include(`exa_yuv_rgb.gxa') 33 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g8b: -------------------------------------------------------------------------------- 1 | { 0x00800040, 0x22c03ae8, 0x3a8d01c0, 0x000000ec }, 2 | { 0x00800040, 0x23003ae8, 0x3a8d0200, 0x000000fc }, 3 | { 0x00800040, 0x23403ae8, 0x3a8d0240, 0x0000010c }, 4 | { 0x00800041, 0x24003ae0, 0x3a8d02c0, 0x000000e0 }, 5 | { 0x00800048, 0x24003ae0, 0x3a8d0300, 0x000000e4 }, 6 | { 0x80800048, 0x21c03ae8, 0x3a8d0340, 0x000000e8 }, 7 | { 0x00800041, 0x24003ae0, 0x3a8d02c0, 0x000000f0 }, 8 | { 0x00800048, 0x24003ae0, 0x3a8d0300, 0x000000f4 }, 9 | { 0x80800048, 0x22003ae8, 0x3a8d0340, 0x000000f8 }, 10 | { 0x00800041, 0x24003ae0, 0x3a8d02c0, 0x00000100 }, 11 | { 0x00800048, 0x24003ae0, 0x3a8d0300, 0x00000104 }, 12 | { 0x80800048, 0x22403ae8, 0x3a8d0340, 0x00000108 }, 13 | { 0x00800001, 0x22803ee8, 0x38000000, 0x3f800000 }, 14 | -------------------------------------------------------------------------------- /src/shaders/render/exa_wm_yuv_rgb.g9b: -------------------------------------------------------------------------------- 1 | { 0x00800040, 0x22c03ae8, 0x3a8d01c0, 0x000000ec }, 2 | { 0x00800040, 0x23003ae8, 0x3a8d0200, 0x000000fc }, 3 | { 0x00800040, 0x23403ae8, 0x3a8d0240, 0x0000010c }, 4 | { 0x00800041, 0x24003ae0, 0x3a8d02c0, 0x000000e0 }, 5 | { 0x00800048, 0x24003ae0, 0x3a8d0300, 0x000000e4 }, 6 | { 0x80800048, 0x21c03ae8, 0x3a8d0340, 0x000000e8 }, 7 | { 0x00800041, 0x24003ae0, 0x3a8d02c0, 0x000000f0 }, 8 | { 0x00800048, 0x24003ae0, 0x3a8d0300, 0x000000f4 }, 9 | { 0x80800048, 0x22003ae8, 0x3a8d0340, 0x000000f8 }, 10 | { 0x00800041, 0x24003ae0, 0x3a8d02c0, 0x00000100 }, 11 | { 0x00800048, 0x24003ae0, 0x3a8d0300, 0x00000104 }, 12 | { 0x80800048, 0x22403ae8, 0x3a8d0340, 0x00000108 }, 13 | { 0x00800001, 0x22803ee8, 0x38000000, 0x3f800000 }, 14 | -------------------------------------------------------------------------------- /src/shaders/render/exa_yuv_gen4.g4i: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Zhao Yakui 25 | */ 26 | 27 | /* YUV to RGB matrix coeff */ 28 | 29 | define(`coef_ry', `g3.0<0,1,0>F') 30 | define(`coef_ru', `g3.4<0,1,0>F') 31 | define(`coef_rv', `g3.8<0,1,0>F') 32 | define(`coef_yd', `g3.12<0,1,0>F') 33 | 34 | define(`coef_gy', `g3.16<0,1,0>F') 35 | define(`coef_gu', `g3.20<0,1,0>F') 36 | define(`coef_gv', `g3.24<0,1,0>F') 37 | define(`coef_ud', `g3.28<0,1,0>F') 38 | 39 | define(`coef_by', `g4.0<0,1,0>F') 40 | define(`coef_bu', `g4.4<0,1,0>F') 41 | define(`coef_bv', `g4.8<0,1,0>F') 42 | define(`coef_vd', `g4.12<0,1,0>F') 43 | -------------------------------------------------------------------------------- /src/shaders/render/exa_yuv_gen6.g4i: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Zhao Yakui 25 | */ 26 | /* YUV to RGB matrix coeff */ 27 | 28 | 29 | define(`coef_ry', `g7.0<0,1,0>F') 30 | define(`coef_ru', `g7.4<0,1,0>F') 31 | define(`coef_rv', `g7.8<0,1,0>F') 32 | define(`coef_yd', `g7.12<0,1,0>F') 33 | 34 | define(`coef_gy', `g7.16<0,1,0>F') 35 | define(`coef_gu', `g7.20<0,1,0>F') 36 | define(`coef_gv', `g7.24<0,1,0>F') 37 | define(`coef_ud', `g7.28<0,1,0>F') 38 | 39 | define(`coef_by', `g8.0<0,1,0>F') 40 | define(`coef_bu', `g8.4<0,1,0>F') 41 | define(`coef_bv', `g8.8<0,1,0>F') 42 | define(`coef_vd', `g8.12<0,1,0>F') 43 | -------------------------------------------------------------------------------- /src/shaders/render/exa_yuv_rgb.gxa: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Zhao Yakui 25 | */ 26 | 27 | define(`YCbCr_base', `src_sample_base') 28 | 29 | define(`Cr', `src_sample_b') 30 | define(`Cr_01', `src_sample_b_01') 31 | define(`Cr_23', `src_sample_b_23') 32 | 33 | define(`Y', `src_sample_r') 34 | define(`Y_01', `src_sample_r_01') 35 | define(`Y_23', `src_sample_r_23') 36 | 37 | define(`Cb', `src_sample_g') 38 | define(`Cb_01', `src_sample_g_01') 39 | define(`Cb_23', `src_sample_g_23') 40 | 41 | define(`Crn', `mask_sample_b') 42 | define(`Crn_01', `mask_sample_b_01') 43 | define(`Crn_23', `mask_sample_b_23') 44 | 45 | define(`Yn', `mask_sample_r') 46 | define(`Yn_01', `mask_sample_r_01') 47 | define(`Yn_23', `mask_sample_r_23') 48 | 49 | define(`Cbn', `mask_sample_g') 50 | define(`Cbn_01', `mask_sample_g_01') 51 | define(`Cbn_23', `mask_sample_g_23') 52 | 53 | add (16) Yn<1>F Y<8,8,1>F coef_yd { compr align1 }; 54 | 55 | add (16) Cbn<1>F Cb<8,8,1>F coef_ud { compr align1 }; 56 | 57 | add (16) Crn<1>F Cr<8,8,1>F coef_vd { compr align1 }; 58 | 59 | mul (16) acc0<1>F Yn<8,8,1>F coef_ry { compr align1 }; 60 | mac (16) acc0<1>F Cbn<8,8,1>F coef_ru { compr align1 }; 61 | mac.sat (16) src_sample_r<1>F Crn<8,8,1>F coef_rv { compr align1 }; 62 | 63 | mul (16) acc0<1>F Yn<8,8,1>F coef_gy { compr align1 }; 64 | mac (16) acc0<1>F Cbn<8,8,1>F coef_gu { compr align1 }; 65 | mac.sat(16) src_sample_g<1>F Crn<8,8,1>F coef_gv { compr align1 }; 66 | 67 | mul (16) acc0<1>F Yn<8,8,1>F coef_by { compr align1 }; 68 | mac (16) acc0<1>F Cbn<8,8,1>F coef_bu { compr align1 }; 69 | mac.sat(16) src_sample_b<1>F Crn<8,8,1>F coef_bv { compr align1 }; 70 | 71 | /* 72 | * A = 1.0 73 | */ 74 | mov (16) src_sample_a<1>F 1.0F { compr align1 }; 75 | -------------------------------------------------------------------------------- /src/shaders/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | MFC_CORE = \ 2 | end_thread.asm \ 3 | mfc_batchbuffer_head.asm \ 4 | mfc_batchbuffer_tail.asm 5 | MFC_CORE_AVC = \ 6 | mfc_batchbuffer_avc_intra.asm \ 7 | mfc_batchbuffer_avc_inter.asm 8 | 9 | MFC_CORE_HSW = \ 10 | mfc_batchbuffer_hsw.asm 11 | 12 | INTEL_G6B = mfc_batchbuffer_avc_intra.g6b mfc_batchbuffer_avc_inter.g6b 13 | INTEL_G6A = mfc_batchbuffer_avc_intra.g6a mfc_batchbuffer_avc_inter.g6a 14 | INTEL_GEN6_INC = mfc_batchbuffer.inc 15 | INTEL_GEN6_ASM = $(INTEL_G6A:%.g6a=%.gen6.asm) 16 | 17 | INTEL_G7B = mfc_batchbuffer_avc_intra.g7b mfc_batchbuffer_avc_inter.g7b 18 | INTEL_G7A = mfc_batchbuffer_avc_intra.g7a mfc_batchbuffer_avc_inter.g7a 19 | INTEL_GEN7_INC = mfc_batchbuffer.inc 20 | INTEL_GEN7_ASM = $(INTEL_G7A:%.g7a=%.gen7.asm) 21 | 22 | INTEL_G75B = mfc_batchbuffer_hsw.g75b 23 | INTEL_G75A = mfc_batchbuffer_hsw.g75a 24 | INTEL_GEN75_INC = mfc_batchbuffer_hsw.inc 25 | INTEL_GEN75_ASM = $(INTEL_G75A:%.g75a=%.gen75.asm) 26 | 27 | TARGETS = 28 | if HAVE_GEN4ASM 29 | TARGETS += $(INTEL_G6B) 30 | TARGETS += $(INTEL_G7B) 31 | TARGETS += $(INTEL_G75B) 32 | endif 33 | 34 | all-local: $(TARGETS) 35 | 36 | SUFFIXES = .g6a .g6b .g7a .g7b .gen6.asm .gen7.asm .g75a .g75b .gen75.asm 37 | 38 | if HAVE_GEN4ASM 39 | $(INTEL_GEN6_ASM): $(MFC_CORE) $(MFC_CORE_AVC) $(INTEL_GEN6_INC) 40 | .g6a.gen6.asm: 41 | $(AM_V_GEN)cpp -P -DDEV_SNB $< > _mfc0.$@ && \ 42 | m4 _mfc0.$@ > $@ && \ 43 | rm _mfc0.$@ 44 | .gen6.asm.g6b: 45 | $(AM_V_GEN)$(GEN4ASM) -g 6 -o $@ $< 46 | 47 | $(INTEL_GEN7_ASM): $(MFC_CORE) $(MFC_CORE_AVC) $(INTEL_GEN7_INC) 48 | .g7a.gen7.asm: 49 | $(AM_V_GEN)cpp -P -DDEV_IVB $< > _mfc0.$@ && \ 50 | m4 _mfc0.$@ > $@ && \ 51 | rm _mfc0.$@ 52 | .gen7.asm.g7b: 53 | $(AM_V_GEN)$(GEN4ASM) -g 7 -o $@ $< 54 | 55 | $(INTEL_GEN75_ASM): $(MFC_CORE_HSW) $(INTEL_GEN75_INC) 56 | .g75a.gen75.asm: 57 | $(AM_V_GEN)cpp -P $< > _mfc0.$@ && \ 58 | m4 _mfc0.$@ > $@ && \ 59 | rm _mfc0.$@ 60 | .gen75.asm.g75b: 61 | $(AM_V_GEN)$(GEN4ASM) -g 7.5 -o $@ $< 62 | endif 63 | 64 | CLEANFILES = $(INTEL_GEN6_ASM) $(INTEL_GEN7_ASM) $(INTEL_GEN75_ASM) 65 | 66 | EXTRA_DIST = \ 67 | $(INTEL_G6A) \ 68 | $(INTEL_G6B) \ 69 | $(INTEL_G7A) \ 70 | $(INTEL_G7B) \ 71 | $(INTEL_G75A) \ 72 | $(INTEL_G75B) \ 73 | $(INTEL_GEN6_INC) \ 74 | $(INTEL_GEN7_INC) \ 75 | $(INTEL_GEN75_INC) \ 76 | $(MFC_CORE) \ 77 | $(MFC_CORE_AVC) \ 78 | $(MFC_CORE_HSW) \ 79 | $(NULL) 80 | 81 | # Extra clean files so that maintainer-clean removes *everything* 82 | MAINTAINERCLEANFILES = Makefile.in 83 | -------------------------------------------------------------------------------- /src/shaders/utils/end_thread.asm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | __EXIT: 28 | mov (8) msg_reg0<1>:ud r0<8,8,1>:ud {align1} ; 29 | send (16) msg_ind acc0<1>ud null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT} ; 30 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_avc_inter.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | #include "mfc_batchbuffer.inc" 28 | #include "mfc_batchbuffer_head.asm" 29 | #include "mfc_batchbuffer_avc_inter.asm" 30 | #include "mfc_batchbuffer_tail.asm" 31 | #include "end_thread.asm" 32 | 33 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_avc_inter.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | #include "mfc_batchbuffer.inc" 28 | #include "mfc_batchbuffer_head.asm" 29 | #include "mfc_batchbuffer_avc_inter.asm" 30 | #include "mfc_batchbuffer_tail.asm" 31 | #include "end_thread.asm" 32 | 33 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_avc_intra.g6a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | #include "mfc_batchbuffer.inc" 28 | #include "mfc_batchbuffer_head.asm" 29 | #include "mfc_batchbuffer_avc_intra.asm" 30 | #include "mfc_batchbuffer_tail.asm" 31 | #include "end_thread.asm" 32 | 33 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_avc_intra.g6b: -------------------------------------------------------------------------------- 1 | { 0x00800001, 0x21000061, 0x00000000, 0x00000000 }, 2 | { 0x00800001, 0x21400061, 0x00000000, 0x00000000 }, 3 | { 0x00000001, 0x21340231, 0x00000014, 0x00000000 }, 4 | { 0x00000001, 0x21280021, 0x000000a0, 0x00000000 }, 5 | { 0x00000001, 0x21540231, 0x00000014, 0x00000000 }, 6 | { 0x00000001, 0x21480021, 0x000000a4, 0x00000000 }, 7 | { 0x01000005, 0x20002d28, 0x000000ac, 0x00040004 }, 8 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000012 }, 9 | { 0x00600001, 0x20000022, 0x008d0120, 0x00000000 }, 10 | { 0x05800031, 0x22001cc9, 0x00000000, 0x021a0001 }, 11 | { 0x00600001, 0x20000022, 0x008d0140, 0x00000000 }, 12 | { 0x00600001, 0x20200022, 0x008d0200, 0x00000000 }, 13 | { 0x05800031, 0x23001cdd, 0x00000000, 0x041b0002 }, 14 | { 0x00000040, 0x21280c21, 0x00000128, 0x00000001 }, 15 | { 0x00000040, 0x21480c21, 0x00000148, 0x00000001 }, 16 | { 0x01000040, 0x20aa3dad, 0x000000aa, 0xffffffff }, 17 | { 0x00110020, 0x34001c00, 0x00001400, 0xffffffee }, 18 | { 0x00000041, 0x21084521, 0x000000b4, 0x000000b1 }, 19 | { 0x00000040, 0x21084421, 0x00000108, 0x000000b0 }, 20 | { 0x00800001, 0x23400061, 0x00000000, 0x00000000 }, 21 | { 0x00000001, 0x23400061, 0x00000000, 0x71490009 }, 22 | { 0x00000001, 0x23540061, 0x00000000, 0x000f000f }, 23 | { 0x01000005, 0x20002d28, 0x020000ac, 0x00020002 }, 24 | { 0x00600001, 0x20000022, 0x008d0100, 0x00000000 }, 25 | { 0x05800031, 0x22001cc9, 0x00000000, 0x021a0000 }, 26 | { 0x00000040, 0x23500d21, 0x000000b0, 0xffff0000 }, 27 | { 0x00000040, 0x20b02e31, 0x000000b0, 0x00010001 }, 28 | { 0x01000010, 0x20004528, 0x000000b4, 0x000000b0 }, 29 | { 0x00010001, 0x20b00171, 0x00000000, 0x00000000 }, 30 | { 0x00010040, 0x20b12e31, 0x000000b1, 0x00010001 }, 31 | { 0x00000001, 0x23580061, 0x00000000, 0x00000000 }, 32 | { 0x00110001, 0x23580061, 0x02000000, 0x04000000 }, 33 | { 0x01000010, 0x20002d28, 0x000000ae, 0x00010001 }, 34 | { 0x00110001, 0x23580061, 0x00000000, 0x00000000 }, 35 | { 0x00000040, 0x23584421, 0x00000358, 0x000000b6 }, 36 | { 0x00000005, 0x234c1c21, 0x00000200, 0x0000ffff }, 37 | { 0x00000040, 0x234c0c21, 0x0000034c, 0x000e0000 }, 38 | { 0x00000001, 0x235c0021, 0x00000204, 0x00000000 }, 39 | { 0x00000001, 0x23600021, 0x00000208, 0x00000000 }, 40 | { 0x00000005, 0x23640c21, 0x0000020c, 0x000000fc }, 41 | { 0x00600001, 0x20000022, 0x008d0140, 0x00000000 }, 42 | { 0x00600001, 0x20200022, 0x008d0340, 0x00000000 }, 43 | { 0x00600001, 0x20400022, 0x008d0360, 0x00000000 }, 44 | { 0x00000040, 0x21080c21, 0x00000108, 0x00000001 }, 45 | { 0x05800031, 0x23001cdd, 0x00000000, 0x061b0302 }, 46 | { 0x00000040, 0x21480c21, 0x00000148, 0x00000004 }, 47 | { 0x01000040, 0x20ae3dad, 0x000000ae, 0xffffffff }, 48 | { 0x00110020, 0x34001c00, 0x00001400, 0xffffffce }, 49 | { 0x00010020, 0x34001c00, 0x02001400, 0x0000001e }, 50 | { 0x00600001, 0x20000022, 0x008d0120, 0x00000000 }, 51 | { 0x05800031, 0x22001cc9, 0x00000000, 0x021a0001 }, 52 | { 0x00600001, 0x20000022, 0x008d0140, 0x00000000 }, 53 | { 0x00600001, 0x20200022, 0x008d0200, 0x00000000 }, 54 | { 0x05800031, 0x23001cdd, 0x00000000, 0x041b0002 }, 55 | { 0x00000040, 0x21280c21, 0x00000128, 0x00000001 }, 56 | { 0x00000040, 0x21480c21, 0x00000148, 0x00000001 }, 57 | { 0x01000040, 0x20a83dad, 0x000000a8, 0xffffffff }, 58 | { 0x00110020, 0x34001c00, 0x00001400, 0xffffffee }, 59 | { 0x01000005, 0x20002d28, 0x000000ac, 0x00010001 }, 60 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 }, 61 | { 0x00600001, 0x20000022, 0x008d0140, 0x00000000 }, 62 | { 0x00400001, 0x20200062, 0x00000000, 0x00000000 }, 63 | { 0x00000001, 0x20240062, 0x00000000, 0x05000000 }, 64 | { 0x05800031, 0x23001cdd, 0x00000000, 0x041b0002 }, 65 | { 0x00600001, 0x20000022, 0x008d0000, 0x00000000 }, 66 | { 0x07800031, 0x24001cc0, 0x00000000, 0x82000010 }, 67 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_avc_intra.g7a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | #include "mfc_batchbuffer.inc" 28 | #include "mfc_batchbuffer_head.asm" 29 | #include "mfc_batchbuffer_avc_intra.asm" 30 | #include "mfc_batchbuffer_tail.asm" 31 | #include "end_thread.asm" 32 | 33 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_avc_intra.g7b: -------------------------------------------------------------------------------- 1 | { 0x00800001, 0x21000061, 0x00000000, 0x00000000 }, 2 | { 0x00800001, 0x21400061, 0x00000000, 0x00000000 }, 3 | { 0x00000001, 0x21340231, 0x00000014, 0x00000000 }, 4 | { 0x00000001, 0x21280021, 0x000000a0, 0x00000000 }, 5 | { 0x00000001, 0x21540231, 0x00000014, 0x00000000 }, 6 | { 0x00000001, 0x21480021, 0x000000a4, 0x00000000 }, 7 | { 0x01000005, 0x20002d28, 0x000000ac, 0x00040004 }, 8 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000012 }, 9 | { 0x00600001, 0x28000021, 0x008d0120, 0x00000000 }, 10 | { 0x0a800031, 0x22001ca9, 0x00000800, 0x02180001 }, 11 | { 0x00600001, 0x28000021, 0x008d0140, 0x00000000 }, 12 | { 0x00600001, 0x28200021, 0x008d0200, 0x00000000 }, 13 | { 0x0a800031, 0x20001cac, 0x00000800, 0x040a0002 }, 14 | { 0x00000040, 0x21280c21, 0x00000128, 0x00000001 }, 15 | { 0x00000040, 0x21480c21, 0x00000148, 0x00000001 }, 16 | { 0x01000040, 0x20aa3dad, 0x000000aa, 0xffffffff }, 17 | { 0x00110020, 0x34001c00, 0x00001400, 0xffffffee }, 18 | { 0x00000041, 0x21084521, 0x000000b4, 0x000000b1 }, 19 | { 0x00000040, 0x21084421, 0x00000108, 0x000000b0 }, 20 | { 0x00800001, 0x23400061, 0x00000000, 0x00000000 }, 21 | { 0x00000001, 0x23400061, 0x00000000, 0x71490009 }, 22 | { 0x00000001, 0x23540061, 0x00000000, 0x000f000f }, 23 | { 0x01000005, 0x20002d28, 0x020000ac, 0x00020002 }, 24 | { 0x00600001, 0x28000021, 0x008d0100, 0x00000000 }, 25 | { 0x0a800031, 0x22001ca9, 0x00000800, 0x02180000 }, 26 | { 0x00000040, 0x23500d21, 0x000000b0, 0xffff0000 }, 27 | { 0x00000040, 0x20b02e31, 0x000000b0, 0x00010001 }, 28 | { 0x01000010, 0x20004528, 0x000000b4, 0x000000b0 }, 29 | { 0x00010001, 0x20b00171, 0x00000000, 0x00000000 }, 30 | { 0x00010040, 0x20b12e31, 0x000000b1, 0x00010001 }, 31 | { 0x00000001, 0x23580061, 0x00000000, 0x00000000 }, 32 | { 0x00110001, 0x23580061, 0x02000000, 0x04000000 }, 33 | { 0x01000010, 0x20002d28, 0x000000ae, 0x00010001 }, 34 | { 0x00110001, 0x23580061, 0x00000000, 0x00000000 }, 35 | { 0x00000040, 0x23584421, 0x00000358, 0x000000b6 }, 36 | { 0x00000005, 0x234c1c21, 0x00000200, 0x0000ffff }, 37 | { 0x00000040, 0x234c0c21, 0x0000034c, 0x000e0000 }, 38 | { 0x00000001, 0x235c0021, 0x00000204, 0x00000000 }, 39 | { 0x00000001, 0x23600021, 0x00000208, 0x00000000 }, 40 | { 0x00000005, 0x23640c21, 0x0000020c, 0x000000fc }, 41 | { 0x00600001, 0x28000021, 0x008d0140, 0x00000000 }, 42 | { 0x00600001, 0x28200021, 0x008d0340, 0x00000000 }, 43 | { 0x00600001, 0x28400021, 0x008d0360, 0x00000000 }, 44 | { 0x00000040, 0x21080c21, 0x00000108, 0x00000001 }, 45 | { 0x0a800031, 0x20001cac, 0x00000800, 0x060a0302 }, 46 | { 0x00000040, 0x21480c21, 0x00000148, 0x00000004 }, 47 | { 0x01000040, 0x20ae3dad, 0x000000ae, 0xffffffff }, 48 | { 0x00110020, 0x34001c00, 0x00001400, 0xffffffce }, 49 | { 0x00010020, 0x34001c00, 0x02001400, 0x0000001e }, 50 | { 0x00600001, 0x28000021, 0x008d0120, 0x00000000 }, 51 | { 0x0a800031, 0x22001ca9, 0x00000800, 0x02180001 }, 52 | { 0x00600001, 0x28000021, 0x008d0140, 0x00000000 }, 53 | { 0x00600001, 0x28200021, 0x008d0200, 0x00000000 }, 54 | { 0x0a800031, 0x20001cac, 0x00000800, 0x040a0002 }, 55 | { 0x00000040, 0x21280c21, 0x00000128, 0x00000001 }, 56 | { 0x00000040, 0x21480c21, 0x00000148, 0x00000001 }, 57 | { 0x01000040, 0x20a83dad, 0x000000a8, 0xffffffff }, 58 | { 0x00110020, 0x34001c00, 0x00001400, 0xffffffee }, 59 | { 0x01000005, 0x20002d28, 0x000000ac, 0x00010001 }, 60 | { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 }, 61 | { 0x00600001, 0x28000021, 0x008d0140, 0x00000000 }, 62 | { 0x00400001, 0x28200061, 0x00000000, 0x00000000 }, 63 | { 0x00000001, 0x28240061, 0x00000000, 0x05000000 }, 64 | { 0x0a800031, 0x20001cac, 0x00000800, 0x040a0002 }, 65 | { 0x00600001, 0x28000021, 0x008d0000, 0x00000000 }, 66 | { 0x07800031, 0x24001ca0, 0x00000800, 0x82000010 }, 67 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_head.asm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | /* 28 | * __START 29 | */ 30 | __START: 31 | mov (16) tmp_reg0<1>:ud 0x0:ud {align1} ; 32 | mov (16) tmp_reg2<1>:ud 0x0:ud {align1} ; 33 | 34 | mov (1) tmp_slice_header.20<1>:ub thread_id_ub {align1}; /* dispatch id */ 35 | mov (1) tmp_slice_header.8<1>:ud head_offset<0,1,0>:ud {align1}; 36 | mov (1) tmp_mfc_batchbuffer.20<1>:ub thread_id_ub {align1}; /* dispatch id */ 37 | mov (1) tmp_mfc_batchbuffer.8<1>:ud batchbuffer_offset<0,1,0>:ud {align1}; 38 | 39 | __HEAD: 40 | and.z.f0.0 (1) null<1>:uw flags<0,1,0>:uw FLAG_MASK_FIRST_OBJECT {align1}; 41 | (f0.0)jmpi (1) __PAK_OBJECT ; 42 | 43 | __HEAD_LOOP: 44 | mov (8) msg_reg0.0<1>:ud tmp_slice_header<8,8,1>:ud {align1} ; 45 | 46 | send (16) 47 | msg_ind 48 | ob_read_wb 49 | null 50 | data_port( 51 | OB_CACHE_TYPE, 52 | OB_READ, 53 | OB_CONTROL_0, 54 | BIND_IDX_MFC_SLICE_HEADER, 55 | OB_WRITE_COMMIT_CATEGORY, 56 | OB_HEADER_PRESENT 57 | ) 58 | mlen 1 59 | rlen ob_read_wb_len_slice_header 60 | {align1}; 61 | 62 | mov (8) msg_reg0.0<1>:ud tmp_mfc_batchbuffer<8,8,1>:ud {align1} ; 63 | mov (8) msg_reg1.0<1>:ud ob_read_wb0<8,8,1>:ud {align1} ; 64 | 65 | send (16) 66 | msg_ind 67 | ob_write_wb 68 | null 69 | data_port( 70 | OB_CACHE_TYPE, 71 | OB_WRITE, 72 | OB_CONTROL_0, 73 | BIND_IDX_MFC_BATCHBUFFER, 74 | OB_WRITE_COMMIT_CATEGORY, 75 | OB_HEADER_PRESENT 76 | ) 77 | mlen 2 78 | rlen ob_write_wb_length 79 | {align1}; 80 | 81 | /* the new offset */ 82 | add (1) tmp_slice_header.8<1>:ud tmp_slice_header.8<0,1,0>:ud 1:ud {align1} ; 83 | add (1) tmp_mfc_batchbuffer.8<1>:ud tmp_mfc_batchbuffer.8<0,1,0>:ud 1:ud {align1} ; 84 | 85 | add.z.f0.0 (1) head_size<1>:w head_size<0,1,0>:w -1:w {align1}; 86 | (-f0.0)jmpi (1) __HEAD_LOOP ; 87 | 88 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_hsw.g75a: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010-2013 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Zhao Yakui 25 | */ 26 | 27 | #include "mfc_batchbuffer_hsw.inc" 28 | #include "mfc_batchbuffer_hsw.asm" 29 | 30 | -------------------------------------------------------------------------------- /src/shaders/utils/mfc_batchbuffer_tail.asm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice (including the next 12 | * paragraph) shall be included in all copies or substantial portions of the 13 | * Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * 23 | * Authors: 24 | * Xiang Haihao 25 | */ 26 | 27 | __TAIL: 28 | (f0.1)jmpi (1) __EXIT ; 29 | 30 | __TAIL_LOOP: 31 | mov (8) msg_reg0.0<1>:ud tmp_slice_header<8,8,1>:ud {align1} ; 32 | 33 | send (16) 34 | msg_ind 35 | ob_read_wb 36 | null 37 | data_port( 38 | OB_CACHE_TYPE, 39 | OB_READ, 40 | OB_CONTROL_0, 41 | BIND_IDX_MFC_SLICE_HEADER, 42 | OB_WRITE_COMMIT_CATEGORY, 43 | OB_HEADER_PRESENT 44 | ) 45 | mlen 1 46 | rlen ob_read_wb_len_slice_header 47 | {align1}; 48 | 49 | mov (8) msg_reg0.0<1>:ud tmp_mfc_batchbuffer<8,8,1>:ud {align1} ; 50 | mov (8) msg_reg1.0<1>:ud ob_read_wb0<8,8,1>:ud {align1} ; 51 | 52 | send (16) 53 | msg_ind 54 | ob_write_wb 55 | null 56 | data_port( 57 | OB_CACHE_TYPE, 58 | OB_WRITE, 59 | OB_CONTROL_0, 60 | BIND_IDX_MFC_BATCHBUFFER, 61 | OB_WRITE_COMMIT_CATEGORY, 62 | OB_HEADER_PRESENT 63 | ) 64 | mlen 2 65 | rlen ob_write_wb_length 66 | {align1}; 67 | 68 | /* the new offset */ 69 | add (1) tmp_slice_header.8<1>:ud tmp_slice_header.8<0,1,0>:ud 1:ud {align1} ; 70 | add (1) tmp_mfc_batchbuffer.8<1>:ud tmp_mfc_batchbuffer.8<0,1,0>:ud 1:ud {align1} ; 71 | 72 | add.z.f0.0 (1) tail_size<1>:w tail_size<0,1,0>:w -1:w {align1}; 73 | (-f0.0)jmpi (1) __TAIL_LOOP ; 74 | 75 | 76 | __DONE: 77 | 78 | and.z.f0.0 (1) null<1>:uw flags<0,1,0>:uw FLAG_MASK_LAST_SLICE {align1}; 79 | (f0.0)jmpi (1) __EXIT ; 80 | 81 | /* bind index 5, write 1 oword, msg type: 8(OWord Block Write) */ 82 | mov (8) msg_reg0.0<1>:ud tmp_mfc_batchbuffer<8,8,1>:ud {align1} ; 83 | mov (4) msg_reg1.0<1>:ud 0x0:ud {align1} ; 84 | mov (1) msg_reg1.4<1>:ud MI_BATCH_BUFFER_END {align1} ; 85 | 86 | send (16) 87 | msg_ind 88 | ob_write_wb 89 | null 90 | data_port( 91 | OB_CACHE_TYPE, 92 | OB_WRITE, 93 | OB_CONTROL_0, 94 | BIND_IDX_MFC_BATCHBUFFER, 95 | OB_WRITE_COMMIT_CATEGORY, 96 | OB_HEADER_PRESENT 97 | ) 98 | mlen 2 99 | rlen ob_write_wb_length 100 | {align1}; 101 | -------------------------------------------------------------------------------- /src/sysdeps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifndef SYSDEPS_H 26 | #define SYSDEPS_H 27 | 28 | #ifdef ANDROID 29 | 30 | # include "config_android.h" 31 | 32 | #else 33 | 34 | #ifdef HAVE_CONFIG_H 35 | # include "config.h" 36 | #endif 37 | 38 | #endif /* ANDROID */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | #endif /* SYSDEPS_H */ 48 | -------------------------------------------------------------------------------- /src/va_backend_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifndef VA_BACKEND_COMPAT_H 26 | #define VA_BACKEND_COMPAT_H 27 | 28 | #include 29 | 30 | #if VA_CHECK_VERSION(0,33,0) 31 | # include 32 | 33 | # define VA_CHECK_DRM_AUTH_TYPE(ctx, type) \ 34 | (((struct drm_state *)(ctx)->drm_state)->auth_type == (type)) 35 | 36 | #else 37 | # include 38 | 39 | # define VA_CHECK_DRM_AUTH_TYPE(ctx, type) \ 40 | (((struct dri_state *)(ctx)->dri_state)->driConnectedFlag == (type)) 41 | 42 | # define drm_state dri_state 43 | # define VA_DRM_AUTH_DRI1 VA_DRI1 44 | # define VA_DRM_AUTH_DRI2 VA_DRI2 45 | # define VA_DRM_AUTH_CUSTOM VA_DUMMY 46 | #endif 47 | 48 | #if VA_CHECK_VERSION(1,0,0) 49 | 50 | # define VAEncPackedHeaderMiscMask 0x80000000 51 | # define VAEncPackedHeaderH264_SEI (VAEncPackedHeaderMiscMask | 1) 52 | # define VAEncPackedHeaderHEVC_SEI (VAEncPackedHeaderMiscMask | 1) 53 | 54 | #endif 55 | 56 | #endif /* VA_BACKEND_COMPAT_H */ 57 | -------------------------------------------------------------------------------- /src/va_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Intel Corporation. All Rights Reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifndef __VA_PRIVATE_H__ 26 | #define __VA_PRIVATE_H__ 27 | 28 | #define VAEncMiscParameterTypePrivate -2 29 | #define VAEncMbDataBufferType -4 30 | #define VAEncMiscParameterTypeVP8HybridFrameUpdate -3 31 | #define VAEncMiscParameterTypeVP8SegmentMapParams -4 32 | 33 | typedef struct _VAEncMbDataLayout 34 | { 35 | unsigned char MbCodeSize; 36 | unsigned int MbCodeOffset; 37 | unsigned int MbCodeStride; 38 | unsigned char MvNumber; 39 | unsigned int MvOffset; 40 | unsigned int MvStride; 41 | 42 | } VAEncMbDataLayout; 43 | 44 | typedef struct _VAEncMiscParameterVP8HybridFrameUpdate 45 | { 46 | unsigned int prev_frame_size; 47 | bool two_prev_frame_size; 48 | unsigned short ref_frame_cost[4]; 49 | unsigned short intra_mode_cost[4]; 50 | unsigned short inter_mode_cost[4]; 51 | unsigned short intra_non_dc_penalty_16x16; 52 | unsigned short intra_non_dc_penalty_4x4; 53 | unsigned char ref_q_index[3]; 54 | } VAEncMiscParameterVP8HybridFrameUpdate; 55 | 56 | typedef struct _VAEncMiscParameterVP8FrameRate 57 | { 58 | unsigned int frame_rate; 59 | } VAEncMiscParameterVP8FrameRate; 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /src/vp9hdec/LIBVPX_AUTHORS: -------------------------------------------------------------------------------- 1 | # This file is automatically generated from the git commit history 2 | # by tools/gen_authors.sh. 3 | 4 | Aaron Watry 5 | Abo Talib Mahfoodh 6 | Adrian Grange 7 | Ahmad Sharif 8 | Alexander Voronov 9 | Alex Converse 10 | Alexis Ballier 11 | Alok Ahuja 12 | Alpha Lam 13 | A.Mahfoodh 14 | Ami Fischman 15 | Andoni Morales Alastruey 16 | Andres Mejia 17 | Aron Rosenberg 18 | Attila Nagy 19 | changjun.yang 20 | chm 21 | Christian Duvivier 22 | Daniel Kang 23 | Deb Mukherjee 24 | Dmitry Kovalev 25 | Dragan Mrdjan 26 | Erik Niemeyer 27 | Fabio Pedretti 28 | Frank Galligan 29 | Fredrik Söderquist 30 | Fritz Koenig 31 | Gaute Strokkenes 32 | Giuseppe Scrivano 33 | Guillaume Martres 34 | Guillermo Ballester Valor 35 | Hangyu Kuang 36 | Henrik Lundin 37 | Hui Su 38 | Ivan Maltz 39 | James Berry 40 | James Zern 41 | Jan Kratochvil 42 | Janne Salonen 43 | Jeff Faust 44 | Jeff Muizelaar 45 | Jeff Petkau 46 | Jim Bankoski 47 | Jingning Han 48 | Johann Koenig 49 | John Koleszar 50 | Joshua Bleecher Snyder 51 | Joshua Litt 52 | Justin Clift 53 | Justin Lebar 54 | KO Myung-Hun 55 | Lou Quillio 56 | Luca Barbato 57 | Makoto Kato 58 | Mans Rullgard 59 | Marco Paniconi 60 | Mark Mentovai 61 | Martin Ettl 62 | Martin Storsjo 63 | Matthew Heaney 64 | Michael Kohler 65 | Mike Frysinger 66 | Mike Hommey 67 | Mikhal Shemer 68 | Morton Jonuschat 69 | Parag Salasakar 70 | Pascal Massimino 71 | Patrik Westin 72 | Paul Wilkins 73 | Pavol Rusnak 74 | Paweł Hajdan 75 | Philip Jägenstedt 76 | Priit Laes 77 | Rafael Ávila de Espíndola 78 | Rafaël Carré 79 | Ralph Giles 80 | Rob Bradford 81 | Ronald S. Bultje 82 | Sami Pietilä 83 | Scott Graham 84 | Scott LaVarnway 85 | Shimon Doodkin 86 | Stefan Holmer 87 | Suman Sunkara 88 | Taekhyun Kim 89 | Takanori MATSUURA 90 | Tamar Levy 91 | Tero Rintaluoma 92 | Thijs Vermeir 93 | Timothy B. Terriberry 94 | Tom Finegan 95 | Vignesh Venkatasubramanian 96 | Yaowu Xu 97 | Yunqing Wang 98 | Google Inc. 99 | The Mozilla Foundation 100 | The Xiph.Org Foundation 101 | -------------------------------------------------------------------------------- /src/vp9hdec/LIBVPX_PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | ------------------------------------ 3 | 4 | "These implementations" means the copyrightable works that implement the WebM 5 | codecs distributed by Google as part of the WebM Project. 6 | 7 | Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, 8 | royalty-free, irrevocable (except as stated in this section) patent license to 9 | make, have made, use, offer to sell, sell, import, transfer, and otherwise 10 | run, modify and propagate the contents of these implementations of WebM, where 11 | such license applies only to those patent claims, both currently owned by 12 | Google and acquired in the future, licensable by Google that are necessarily 13 | infringed by these implementations of WebM. This grant does not include claims 14 | that would be infringed only as a consequence of further modification of these 15 | implementations. If you or your agent or exclusive licensee institute or order 16 | or agree to the institution of patent litigation or any other patent 17 | enforcement activity against any entity (including a cross-claim or 18 | counterclaim in a lawsuit) alleging that any of these implementations of WebM 19 | or any code incorporated within any of these implementations of WebM 20 | constitutes direct or contributory patent infringement, or inducement of 21 | patent infringement, then any patent rights granted to you under this License 22 | for these implementations of WebM shall terminate as of the date such 23 | litigation is filed. 24 | -------------------------------------------------------------------------------- /src/vp9hdec/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2007 Intel Corporation. All Rights Reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the 5 | # "Software"), to deal in the Software without restriction, including 6 | # without limitation the rights to use, copy, modify, merge, publish, 7 | # distribute, sub license, and/or sell copies of the Software, and to 8 | # permit persons to whom the Software is furnished to do so, subject to 9 | # the following conditions: 10 | # 11 | # The above copyright notice and this permission notice (including the 12 | # next paragraph) shall be included in all copies or substantial portions 13 | # of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 18 | # IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 19 | # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | SUBDIRS = 24 | 25 | AM_CPPFLAGS = \ 26 | -DPTHREADS \ 27 | $(DRM_CFLAGS) \ 28 | $(DRM_INTEL_CFLAGS) \ 29 | $(LIBVA_DEPS_CFLAGS) \ 30 | $(CMRT_CFLAGS) \ 31 | -I$(top_srcdir)/src \ 32 | -I$(top_srcdir)/src/cmrt \ 33 | -D__linux__ \ 34 | -DLINUX \ 35 | $(NULL) 36 | 37 | 38 | driver_cflags = \ 39 | -Wall \ 40 | -Wno-unused-variable \ 41 | -fvisibility=hidden \ 42 | $(NULL) 43 | 44 | 45 | driver_ldflags = \ 46 | -module -avoid-version \ 47 | -no-undefined \ 48 | -Wl,--no-undefined \ 49 | $(NULL) 50 | 51 | driver_libs = \ 52 | -lpthread -lm -ldl \ 53 | $(DRM_LIBS) \ 54 | $(DRM_INTEL_LIBS) \ 55 | $(LIBVA_DEPS_LIBS) \ 56 | $(CMRT_LIBS) \ 57 | $(NULL) 58 | 59 | driver_files = \ 60 | decode_hybrid_vp9.cpp \ 61 | intel_hybrid_hostvld_vp9.cpp \ 62 | intel_hybrid_hostvld_vp9_loopfilter.cpp \ 63 | intel_hybrid_hostvld_vp9_parser.cpp \ 64 | intel_hybrid_hostvld_vp9_engine.cpp \ 65 | intel_hybrid_hostvld_vp9_context.cpp \ 66 | intel_hybrid_vp9_kernel_g75.cpp \ 67 | intel_hybrid_vp9_kernel_g8.cpp \ 68 | intel_hybrid_vp9_kernel_g9.cpp \ 69 | intel_hybrid_vp9_kernel_g8lp.cpp \ 70 | intel_hybrid_debug_dump.cpp \ 71 | $(NULL) 72 | 73 | driver_headers = \ 74 | decode_hybrid_vp9.h \ 75 | intel_hybrid_common_vp9.h \ 76 | intel_hybrid_hostvld_vp9.h \ 77 | intel_hybrid_hostvld_vp9_loopfilter.h \ 78 | intel_hybrid_hostvld_vp9_parser.h \ 79 | intel_hybrid_hostvld_vp9_parser_tables.h \ 80 | intel_hybrid_hostvld_vp9_engine.h \ 81 | intel_hybrid_hostvld_vp9_context.h \ 82 | intel_hybrid_hostvld_vp9_context_tables.h \ 83 | intel_hybrid_hostvld_vp9_internal.h \ 84 | intel_hybrid_debug_dump.h \ 85 | $(NULL) 86 | 87 | noinst_LTLIBRARIES = vp9hdec.la 88 | vp9hdec_la_CFLAGS = $(driver_cflags) 89 | vp9hdec_la_CXXFLAGS = -fpermissive $(driver_cflags) 90 | vp9hdec_la_LDFLAGS = $(driver_ldflags) 91 | vp9hdec_la_LIBADD = $(driver_libs) 92 | vp9hdec_la_SOURCES = $(driver_files) 93 | noinst_HEADERS = $(driver_headers) 94 | 95 | # Extra clean files so that maintainer-clean removes *everything* 96 | MAINTAINERCLEANFILES = Makefile.in config.h.in 97 | -------------------------------------------------------------------------------- /src/vp9hdec/cmrt_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | /* include the corresponding CM-API header file */ 30 | 31 | #ifndef _CMRT_API_H_ 32 | #define _CMRT_API_H_ 33 | 34 | #include 35 | #include "cm_rt.h" 36 | 37 | #define CM_MAX_THREAD_WIDTH_FOR_MW 511 38 | 39 | #endif /* _CMRT_API_H_ */ 40 | 41 | -------------------------------------------------------------------------------- /src/vp9hdec/intel_hybrid_debug_dump.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | #ifndef _INTEL_HYBRID_DEBUG_DUMP_H_ 30 | #define _INTEL_HYBRID_DEBUG_DUMP_H_ 31 | 32 | #include "intel_hybrid_common_vp9.h" 33 | 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | extern int intel_hybrid_writefilefromptr( 40 | const char *pFilename, 41 | void *lpBuffer, 42 | uint32_t writeSize); 43 | 44 | extern int intel_hybrid_appendfilefromptr( 45 | const char *pFilename, 46 | void *pData, 47 | uint32_t dwSize); 48 | 49 | 50 | extern char *intel_alloc_zero_aligned_memory(uint32_t size, uint32_t alignment); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/vp9hdec/intel_hybrid_hostvld_vp9_loopfilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | #ifndef __INTEL_HOSTVLD_VP9_LOOPFILTER_H__ 30 | #define __INTEL_HOSTVLD_VP9_LOOPFILTER_H__ 31 | 32 | VAStatus Intel_HostvldVp9_LoopfilterTileColumn( 33 | PINTEL_HOSTVLD_VP9_TILE_STATE pTileState, 34 | DWORD dwTileX); 35 | 36 | VAStatus Intel_HostvldVp9_LoopfilterCalcThreshold( 37 | PINTEL_HOSTVLD_VP9_FRAME_STATE pFrameState); 38 | 39 | VAStatus Intel_HostvldVp9_SetOutOfBoundValues( 40 | PINTEL_HOSTVLD_VP9_FRAME_STATE pFrameState); 41 | 42 | #endif // __INTEL_HOSTVLD_VP9_LOOPFILTER_H__ 43 | -------------------------------------------------------------------------------- /src/vp9hdec/intel_hybrid_hostvld_vp9_parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Intel Corporation 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sub license, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the 13 | * next paragraph) shall be included in all copies or substantial portions 14 | * of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 20 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * Authors: 25 | * Zhao Yakui 26 | * 27 | */ 28 | 29 | 30 | #ifndef __INTEL_HOSTVLD_VP9_PARSER_H__ 31 | #define __INTEL_HOSTVLD_VP9_PARSER_H__ 32 | 33 | #include "intel_hybrid_hostvld_vp9_internal.h" 34 | #include "intel_hybrid_common_vp9.h" 35 | 36 | VAStatus Intel_HostvldVp9_ParseCompressedHeader( 37 | PINTEL_HOSTVLD_VP9_FRAME_STATE pFrameState); 38 | 39 | VAStatus Intel_HostvldVp9_ParseTiles( 40 | PINTEL_HOSTVLD_VP9_FRAME_STATE pFrameState); 41 | 42 | VAStatus Intel_HostvldVp9_PreParseTiles( 43 | PINTEL_HOSTVLD_VP9_FRAME_STATE pFrameState); 44 | 45 | VAStatus Intel_HostvldVp9_ParseTileColumn( 46 | PINTEL_HOSTVLD_VP9_TILE_STATE pTileState, 47 | DWORD dwTileX); 48 | 49 | VAStatus Intel_HostvldVp9_PostParseTiles( 50 | PINTEL_HOSTVLD_VP9_FRAME_STATE pFrameState); 51 | 52 | #endif // __INTEL_HOSTVLD_VP9_PARSER_H__ 53 | -------------------------------------------------------------------------------- /src/wayland/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2012 Intel Corporation. All Rights Reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the 5 | # "Software"), to deal in the Software without restriction, including 6 | # without limitation the rights to use, copy, modify, merge, publish, 7 | # distribute, sub license, and/or sell copies of the Software, and to 8 | # permit persons to whom the Software is furnished to do so, subject to 9 | # the following conditions: 10 | # 11 | # The above copyright notice and this permission notice (including the 12 | # next paragraph) shall be included in all copies or substantial portions 13 | # of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 18 | # IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 19 | # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | EXTRA_DIST = \ 24 | wayland-drm.xml \ 25 | $(NULL) 26 | 27 | # Extra clean files so that maintainer-clean removes *everything* 28 | MAINTAINERCLEANFILES = Makefile.in 29 | --------------------------------------------------------------------------------