type(type),
width(width),
height(height),
- resource_pool(NULL)
+ resource_pool(nullptr)
{
pbos[0] = pbos[1] = pbos[2] = 0;
texture_num[0] = texture_num[1] = texture_num[2] = 0;
set_width(width);
set_height(height);
- pixel_data[0] = pixel_data[1] = pixel_data[2] = NULL;
+ pixel_data[0] = pixel_data[1] = pixel_data[2] = nullptr;
owns_texture[0] = owns_texture[1] = owns_texture[2] = false;
register_uniform_sampler2d("tex_y", &uniform_tex_y);
glActiveTexture(GL_TEXTURE0 + *sampler_num + channel);
check_error();
- if (texture_num[channel] == 0 && (pbos[channel] != 0 || pixel_data[channel] != NULL)) {
+ if (texture_num[channel] == 0 && (pbos[channel] != 0 || pixel_data[channel] != nullptr)) {
GLenum format, internal_format;
if (channel == 0 && ycbcr_input_splitting == YCBCR_INPUT_INTERLEAVED) {
if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
} else {
glBindTexture(GL_TEXTURE_2D, texture_num[channel]);
check_error();
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, needs_mipmaps ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR);
+ check_error();
}
}
void YCbCrInput::change_ycbcr_format(const YCbCrFormat &ycbcr_format)
{
- if (cb_cr_offsets_equal) {
+ if (ycbcr_input_splitting == YCBCR_INPUT_SPLIT_Y_AND_CBCR && cb_cr_offsets_equal) {
assert((fabs(ycbcr_format.cb_x_position - ycbcr_format.cr_x_position) < 1e-6) &&
(fabs(ycbcr_format.cb_y_position - ycbcr_format.cr_y_position) < 1e-6));
}