1 /* 2 * Copyright 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef ANDROID_HARDWARE_CAMERA2_CTS_COMMON_RS 18 #define ANDROID_HARDWARE_CAMERA2_CTS_COMMON_RS 19 20 #pragma version(1) 21 #pragma rs java_package_name(android.hardware.camera2.cts) 22 #pragma rs_fp_relaxed 23 24 typedef uchar3 yuvx_444; // interleaved YUV. (y,u,v) per pixel. use .x/.y/.z to read 25 typedef uchar3 yuvf_420; // flexible YUV (4:2:0). use rsGetElementAtYuv to read. 26 27 #define convert_yuvx_444 convert_uchar3 28 #define convert_yuvf_420 __error_cant_output_flexible_yuv__ 29 30 #define rsGetElementAt_yuvx_444 rsGetElementAt_uchar3 31 #define rsGetElementAt_yuvf_420 __error_cant_output_flexible_yuv__ 32 33 #define RS_KERNEL __attribute__((kernel)) 34 35 #ifndef LOG_DEBUG 36 #define LOG_DEBUG 0 37 #endif 38 39 #if LOG_DEBUG 40 #define LOGD(string, expr) rsDebug((string), (expr)) 41 #else 42 #define LOGD(string, expr) if (0) rsDebug((string), (expr)) 43 #endif 44 45 #endif // header guard 46