+ if (texture_num[channel] == 0 && (pbos[channel] != 0 || pixel_data[channel] != NULL)) {
+ GLenum format, internal_format;
+ if (channel == 0 && ycbcr_input_splitting == YCBCR_INPUT_INTERLEAVED) {
+ if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
+ format = GL_RGBA;
+ internal_format = GL_RGB10_A2;
+ } else if (type == GL_UNSIGNED_SHORT) {
+ format = GL_RGB;
+ internal_format = GL_RGB16;
+ } else {
+ assert(type == GL_UNSIGNED_BYTE);
+ format = GL_RGB;
+ internal_format = GL_RGB8;
+ }
+ } else if (channel == 1 && ycbcr_input_splitting == YCBCR_INPUT_SPLIT_Y_AND_CBCR) {
+ format = GL_RG;
+ if (type == GL_UNSIGNED_SHORT) {
+ internal_format = GL_RG16;
+ } else {
+ assert(type == GL_UNSIGNED_BYTE);
+ internal_format = GL_RG8;
+ }
+ } else {
+ format = GL_RED;
+ if (type == GL_UNSIGNED_SHORT) {
+ internal_format = GL_R16;
+ } else {
+ assert(type == GL_UNSIGNED_BYTE);
+ internal_format = GL_R8;
+ }
+ }
+