Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt OpenGLWidget play hdr(10bits) video #64

Open
evehal opened this issue Jun 15, 2024 · 0 comments
Open

qt OpenGLWidget play hdr(10bits) video #64

evehal opened this issue Jun 15, 2024 · 0 comments

Comments

@evehal
Copy link

evehal commented Jun 15, 2024

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant