(WIP) colorspace: add support for Dolby Vision
This covers Profiles 5 and 8.X. After playing around with the implementation quite a lot, I eventually settled on the current state, which requires no LUTs or state and is implemented entirely in pure GLSL. This is slightly slower than a pure 1D LUT approach, but has the benefit of not needing to add an extra `pl_shader_obj` to the API at all, and thus being transparently backwards compatible. The decoding metadata is assumed to be passed in via a new struct `pl_dovi_metadata`, which contains both the colorspace matrices (especially important for profiles 8.X) and reshaping coefficients. TODO: - test MMR code - clean up debug crap - optimize/benchmark MMR - add GLSL version checks for floatBitsToUint (or work around?) Closes #113
Showing
- demos/plplay.c 53 additions, 0 deletionsdemos/plplay.c
- meson.build 1 addition, 0 deletionsmeson.build
- src/colorspace.c 9 additions, 1 deletionsrc/colorspace.c
- src/include/libplacebo/colorspace.h 23 additions, 0 deletionssrc/include/libplacebo/colorspace.h
- src/include/libplacebo/shaders/colorspace.h 4 additions, 0 deletionssrc/include/libplacebo/shaders/colorspace.h
- src/include/libplacebo/utils/dav1d_internal.h 1 addition, 0 deletionssrc/include/libplacebo/utils/dav1d_internal.h
- src/include/libplacebo/utils/libav_internal.h 1 addition, 0 deletionssrc/include/libplacebo/utils/libav_internal.h
- src/renderer.c 1 addition, 0 deletionssrc/renderer.c
- src/shaders.h 1 addition, 0 deletionssrc/shaders.h
- src/shaders/colorspace.c 234 additions, 0 deletionssrc/shaders/colorspace.c
- src/shaders/film_grain.h 1 addition, 1 deletionsrc/shaders/film_grain.h
- src/tests/bench.c 44 additions, 2 deletionssrc/tests/bench.c
- src/tests/gpu_tests.h 3 additions, 0 deletionssrc/tests/gpu_tests.h
Loading
Please register or sign in to comment