FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
cmdutils_opencl.c File Reference
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavutil/log.h"
#include "libavutil/opencl.h"
#include "libavutil/avstring.h"
#include "cmdutils.h"

Go to the source code of this file.

Data Structures

struct  OpenCLDeviceBenchmark
 

Macros

#define OCLCHECK(method,...)
 
#define CREATEBUF(out, flags, size)
 
#define OPENCL_NB_ITER   5
 

Functions

static void fill_rand_int (int *data, int n)
 
static int64_t run_opencl_bench (AVOpenCLExternalEnv *ext_opencl_env)
 
static int compare_ocl_device_desc (const void *a, const void *b)
 
int opt_opencl_bench (void *optctx, const char *opt, const char *arg)
 
int opt_opencl (void *optctx, const char *opt, const char *arg)
 

Variables

const char * ocl_bench_source
 

Macro Definition Documentation

#define OCLCHECK (   method,
  ... 
)
Value:
do { \
status = method(__VA_ARGS__); \
if (status != CL_SUCCESS) { \
av_log(NULL, AV_LOG_ERROR, # method " error '%s'\n", \
av_opencl_errstr(status)); \
goto end; \
} \
} while (0)
#define NULL
Definition: coverity.c:32
const char * av_opencl_errstr(cl_int status)
Get OpenCL error string.
Definition: opencl.c:159
static av_cold int end(AVCodecContext *avctx)
Definition: avrndec.c:90
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
if(ret< 0)
Definition: vf_mcdeint.c:279
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:57

Definition at line 95 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

#define CREATEBUF (   out,
  flags,
  size 
)
Value:
do { \
out = clCreateBuffer(ext_opencl_env->context, flags, size, NULL, &status); \
if (status != CL_SUCCESS) { \
av_log(NULL, AV_LOG_ERROR, "Could not create OpenCL buffer\n"); \
goto end; \
} \
} while (0)
#define NULL
Definition: coverity.c:32
static av_cold int end(AVCodecContext *avctx)
Definition: avrndec.c:90
static int flags
Definition: log.c:57
ptrdiff_t size
Definition: opengl_enc.c:101
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
if(ret< 0)
Definition: vf_mcdeint.c:279
FILE * out
Definition: movenc.c:54
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:57

Definition at line 106 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

#define OPENCL_NB_ITER   5

Definition at line 124 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

Function Documentation

static void fill_rand_int ( int data,
int  n 
)
static

Definition at line 116 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

static int64_t run_opencl_bench ( AVOpenCLExternalEnv ext_opencl_env)
static

Definition at line 125 of file cmdutils_opencl.c.

Referenced by opt_opencl_bench().

static int compare_ocl_device_desc ( const void a,
const void b 
)
static

Definition at line 207 of file cmdutils_opencl.c.

Referenced by opt_opencl_bench().

int opt_opencl_bench ( void optctx,
const char *  opt,
const char *  arg 
)

Definition at line 214 of file cmdutils_opencl.c.

int opt_opencl ( void optctx,
const char *  opt,
const char *  arg 
)

Definition at line 267 of file cmdutils_opencl.c.

Variable Documentation

const char* ocl_bench_source

Definition at line 35 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().