mpv-player / mpv-examples

📚
235 stars 77 forks source link

qt OpenGLWidget play hdr(10bits) video #64

Open evehal opened 3 months ago

evehal commented 3 months ago

Hi how to play hdr videos?I mean real hdr videos,not downscale hdr to sdr just create a 16bits texture attach to fbo? //-----------------.............. glBindTexture(GL_TEXTURE_2D, colorBuffer); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, SCR_WIDTH, SCR_HEIGHT, 0, GL_RGBA, GL_FLOAT, NULL); //................................... and use this fbo as param to mpv?

mpv_opengl_fbo mpfbo{static_cast(fbo_16bit_color), width(), height(), 0}; int flip_y{1}; mpv_render_param params[] = { {MPV_RENDER_PARAM_OPENGL_FBO, &mpfbo}, {MPV_RENDER_PARAM_FLIP_Y, &flip_y}, {MPV_RENDER_PARAM_INVALID, nullptr} }; mpv_render_context_render(mpv_gl, params);