1 #ifndef _CHROMA_SUBSAMPLER_H
2 #define _CHROMA_SUBSAMPLER_H 1
12 class ChromaSubsampler {
14 ChromaSubsampler(movit::ResourcePool *resource_pool);
17 // Subsamples chroma (packed Cb and Cr) 2x2 to yield chroma suitable for
18 // NV12 (semiplanar 4:2:0). Chroma positioning is left/center (H.264 convention).
19 // width and height are the dimensions (in pixels) of the input texture.
20 void subsample_chroma(GLuint cbcr_tex, unsigned width, unsigned height, GLuint dst_tex);
23 movit::ResourcePool *resource_pool;
25 GLuint cbcr_program_num; // Owned by <resource_pool>.
26 GLuint cbcr_texture_sampler_uniform;
27 GLuint cbcr_vbo; // Holds position and texcoord data.
28 GLuint cbcr_position_attribute_index, cbcr_texcoord_attribute_index;
31 #endif // !defined(_CHROMA_SUBSAMPLER_H)