代码拉取完成,页面将自动刷新
// Copyright (c) 2009-2015 Intel Corporation
// All rights reserved.
//
// WARRANTY DISCLAIMER
//
// THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
// MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Intel Corporation is the author of the Materials, and requests that all
// problem reports or change requests be submitted to it directly
// OpenCL kernel to perform an element-wise addition
kernel void drawBox_Y( __write_only image2d_t output, int top, int left, float fDimmerSwitch)
{
int x = get_global_id(0)+left;
int y = get_global_id(1)+top;
int xMin = 0, xMax = 1, yMin = 0, yMax = 1;
{
write_imagef(output, (int2)(x, y), (float4)(fDimmerSwitch, 0.f, 0.f, 1.f));
}
}
kernel void drawBox_UV( __write_only image2d_t output, int top, int left,float fDimmerSwitch)
{
int x = get_global_id(0)+left/2;
int y = get_global_id(1)+top/2;
fDimmerSwitch = 128.0f;
int xMin = 0, xMax = 1, yMin = 0, yMax = 1;
{
write_imagef(output, (int2)(x, y), (float4)(0.5f, 0.5f, 0.f, 1.f));
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。