X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=ycbcr_input.cpp;h=904180b853c622813e64b15d75045907c889cf43;hp=47f58cca75efded051a633726d1381951cf0a4f7;hb=f0c77209245aa206996c7ef5395888e2859ff4bf;hpb=f34b1c36acd27944f00885edfc55363432bfec8e diff --git a/ycbcr_input.cpp b/ycbcr_input.cpp index 47f58cc..904180b 100644 --- a/ycbcr_input.cpp +++ b/ycbcr_input.cpp @@ -147,6 +147,8 @@ void YCbCrInput::set_gl_state(GLuint glsl_program_num, const string& prefix, uns } 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(); } } @@ -190,7 +192,7 @@ string YCbCrInput::output_fragment_shader() 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)); }