Blame view

src/nvdec/cuda_kernels.h 2.5 KB
e41a52bb   Hu Chunming   1.优化数据读取线程;2. 添加A...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  #pragma once
  #include "cuda_runtime.h"
  #include "device_launch_parameters.h"
  
  #include <stdio.h>
  #include <stdlib.h>
  
  #include <string.h>
  #include <math.h>
  
  #include <cuda.h>
  
  typedef enum
  {
92989af0   ming   更新解码器
15
16
17
  	ITU_601 = 1,
  	ITU_709 = 2
  } FF_ColorSpace;
e41a52bb   Hu Chunming   1.优化数据读取线程;2. 添加A...
18
19
20
  
  namespace cuda_common
  {
92989af0   ming   更新解码器
21
  	cudaError_t setColorSpace(FF_ColorSpace CSC, float hue);
e41a52bb   Hu Chunming   1.优化数据读取线程;2. 添加A...
22
23
24
  
  	cudaError_t NV12ToRGBnot(CUdeviceptr d_srcNV12, size_t nSourcePitch, unsigned char* d_dstRGB, int width, int height);
  	cudaError_t CUDAToBGR(CUdeviceptr dataY, CUdeviceptr dataUV, size_t pitchY, size_t pitchUV, unsigned char* d_dstRGB, int width, int height);
92989af0   ming   更新解码器
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  
  	
  	cudaError_t ResizeImage(float* d_srcRGB, int src_width, int src_height, float* d_dstRGB, int dst_width, int dst_height);
  
  	cudaError_t RGB2YUV(float* d_srcRGB, int src_width, int src_height,
  		unsigned char* Y, size_t yPitch, int yWidth, int yHeight,
  		unsigned char* U, size_t uPitch, int uWidth, int uHeight,
  		unsigned char* V, size_t vPitch, int vWidth, int vHeight);
  
  	cudaError_t RGB2YUV(unsigned char* d_srcRGB, int src_width, int src_height,
  		unsigned char* Y, size_t yPitch, int yWidth, int yHeight,
  		unsigned char* U, size_t uPitch, int uWidth, int uHeight,
  		unsigned char* V, size_t vPitch, int vWidth, int vHeight);
  
  	cudaError_t PartMemCopy(unsigned char* d_srcRGB, int src_width, int src_height, unsigned char* d_dstRGB, int left, int top, int right, int bottom);
  	//	cudaError_t PartMemResize(float* d_srcRGB, int src_width, int src_height, float* d_dstRGB, int left, int top, int right, int bottom);
  
  	cudaError_t PartMemResizeBatch(unsigned char* d_srcRGB, int srcimg_width, int srcimg_height, unsigned char** d_dstRGB, int count,
  		int* left, int* top, int* right, int* bottom, int *dst_w, int *dst_h,
  		float submeanb, float submeang, float submeanr,
  		float varianceb, float varianceg, float variancer);
  
  	cudaError_t DrawImage(float* d_srcRGB, int src_width, int src_height, int left, int top, int right, int bottom);
  	cudaError_t DrawImage(unsigned char* d_srcRGB, int src_width, int src_height, int left, int top, int right, int bottom);
  
  	cudaError_t DrawLine(float* d_srcRGB, int src_width, int src_height, int begin_x, int begin_y, int end_x, int end_y);
e41a52bb   Hu Chunming   1.优化数据读取线程;2. 添加A...
51
52
  }
  
92989af0   ming   更新解码器
53
54
55
56
57
58
59
60
61
62
  
  int jpegNPP(const char *szOutputFile, float* d_srcRGB, int img_width, int img_height);
  int jpegNPP(const char *szOutputFile, unsigned char* d_srcRGB, int img_width, int img_height);
  
  int jpegNPP(const char *szOutputFile, float* d_srcRGB);
  int jpegNPP(const char *szOutputFile, unsigned char* d_srcRGB);
  
  int initTable();
  int initTable(int flag, int width, int height);
  int releaseJpegNPP();