-Processing video with GPUs requires the use of an API such as OpenGL or CUDA API. Recent advances are libraries such as GPUCV, with fast operators that take advantage of the GPU processing power but hide from the user its programming complexities. However the implementation of new operators is not as simple as it can be, and in GPUCV it is limited by the built-in templates. Here we describe a code generator that, from two kinds of directives merged in a shader source code, generates a wrapper code with all the OpenGL or CUDA API calls needed before calling the shader, simplifying the creation and maintenance of a library of video processing operators. The proposed library performance is better than GPUCV for almost all the tested operators.