Lines Matching defs:deshake
44 DeshakeContext *deshake = ctx->priv;
53 param_lu.kernel = deshake->opencl_ctx.kernel_luma;
54 param_ch.kernel = deshake->opencl_ctx.kernel_chroma;
61 FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_inbuf),
62 FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_outbuf),
74 FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_inbuf),
75 FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_outbuf),
90 status = clEnqueueNDRangeKernel(deshake->opencl_ctx.command_queue,
91 deshake->opencl_ctx.kernel_luma, 2, NULL,
93 status |= clEnqueueNDRangeKernel(deshake->opencl_ctx.command_queue,
94 deshake->opencl_ctx.kernel_chroma, 2, NULL,
100 ret = av_opencl_buffer_read_image(out->data, deshake->opencl_ctx.out_plane_size,
101 deshake->opencl_ctx.plane_num, deshake->opencl_ctx.cl_outbuf,
102 deshake->opencl_ctx.cl_outbuf_size);
111 DeshakeContext *deshake = ctx->priv;
115 deshake->opencl_ctx.plane_num = PLANE_NUM;
116 deshake->opencl_ctx.command_queue = av_opencl_get_command_queue();
117 if (!deshake->opencl_ctx.command_queue) {
118 av_log(ctx, AV_LOG_ERROR, "Unable to get OpenCL command queue in filter 'deshake'\n");
121 deshake->opencl_ctx.program = av_opencl_compile("avfilter_transform", NULL);
122 if (!deshake->opencl_ctx.program) {
126 if (!deshake->opencl_ctx.kernel_luma) {
127 deshake->opencl_ctx.kernel_luma = clCreateKernel(deshake->opencl_ctx.program,
134 if (!deshake->opencl_ctx.kernel_chroma) {
135 deshake->opencl_ctx.kernel_chroma = clCreateKernel(deshake->opencl_ctx.program,
147 DeshakeContext *deshake = ctx->priv;
148 av_opencl_buffer_release(&deshake->opencl_ctx.cl_inbuf);
149 av_opencl_buffer_release(&deshake->opencl_ctx.cl_outbuf);
150 clReleaseKernel(deshake->opencl_ctx.kernel_luma);
151 clReleaseKernel(deshake->opencl_ctx.kernel_chroma);
152 clReleaseProgram(deshake->opencl_ctx.program);
153 deshake->opencl_ctx.command_queue = NULL;
161 DeshakeContext *deshake = ctx->priv;
165 if ((!deshake->opencl_ctx.cl_inbuf) || (!deshake->opencl_ctx.cl_outbuf)) {
166 deshake->opencl_ctx.in_plane_size[0] = (in->linesize[0] * in->height);
167 deshake->opencl_ctx.in_plane_size[1] = (in->linesize[1] * chroma_height);
168 deshake->opencl_ctx.in_plane_size[2] = (in->linesize[2] * chroma_height);
169 deshake->opencl_ctx.out_plane_size[0] = (out->linesize[0] * out->height);
170 deshake->opencl_ctx.out_plane_size[1] = (out->linesize[1] * chroma_height);
171 deshake->opencl_ctx.out_plane_size[2] = (out->linesize[2] * chroma_height);
172 deshake->opencl_ctx.cl_inbuf_size = deshake->opencl_ctx.in_plane_size[0] +
173 deshake->opencl_ctx.in_plane_size[1] +
174 deshake->opencl_ctx.in_plane_size[2];
175 deshake->opencl_ctx.cl_outbuf_size = deshake->opencl_ctx.out_plane_size[0] +
176 deshake->opencl_ctx.out_plane_size[1] +
177 deshake->opencl_ctx.out_plane_size[2];
178 if (!deshake->opencl_ctx.cl_inbuf) {
179 ret = av_opencl_buffer_create(&deshake->opencl_ctx.cl_inbuf,
180 deshake->opencl_ctx.cl_inbuf_size,
185 if (!deshake->opencl_ctx.cl_outbuf) {
186 ret = av_opencl_buffer_create(&deshake->opencl_ctx.cl_outbuf,
187 deshake->opencl_ctx.cl_outbuf_size,
193 ret = av_opencl_buffer_write_image(deshake->opencl_ctx.cl_inbuf,
194 deshake->opencl_ctx.cl_inbuf_size,
195 0, in->data,deshake->opencl_ctx.in_plane_size,
196 deshake->opencl_ctx.plane_num);