Scanner C++ API
image.h
1 /* Copyright 2016 Carnegie Mellon University
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include <cstdint>
19 
20 #ifdef HAVE_CUDA
21 #include <cuda_runtime.h>
22 #endif
23 
24 namespace scanner {
25 
26 using u8 = uint8_t;
27 
28 class InputFormat;
29 
30 #ifdef HAVE_CUDA
31 cudaError_t convertNV12toRGBA(const u8* in, size_t in_pitch, u8* out,
32  size_t out_pitch, int width, int height,
33  cudaStream_t stream);
34 
35 cudaError_t convertRGBInterleavedToPlanar(const u8* in, size_t in_pitch,
36  u8* out, size_t out_pitch, int width,
37  int height, cudaStream_t stream);
38 #endif
39 }
Definition: database.cpp:36