Blame view

FFNvDecoder/cuda_kernels.h 2.5 KB
fccbe006   Hu Chunming   初步完成从解码到算法处理,任务管理...
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
  {
6e2b079e   Hu Chunming   编译通过
15
16
17
  	ITU_601 = 1,
  	ITU_709 = 2
  } FF_ColorSpace;
fccbe006   Hu Chunming   初步完成从解码到算法处理,任务管理...
18
19
20
  
  namespace cuda_common
  {
6e2b079e   Hu Chunming   编译通过
21
  	cudaError_t setColorSpace(FF_ColorSpace CSC, float hue);
fccbe006   Hu Chunming   初步完成从解码到算法处理,任务管理...
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);
78676b64   Hu Chunming   删除无用代码
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);
fccbe006   Hu Chunming   初步完成从解码到算法处理,任务管理...
51
52
  }
  
78676b64   Hu Chunming   删除无用代码
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();