colorspace: treat PL_CHROMA_UNKNOWN as _TOP_LEFT
A lot of subsampled content out there is untagged, but should be treated as _TOP_LEFT content (the de-facto standard chroma subsampling mode). However, we effectively treat _UNKNOWN as PL_CHROMA_CENTER. To fix this, make pl_chroma_location_offset explicitly default the chroma location. Since a lot of users currently just call that function on the chroma planes always (regardless of subsampling), introduce a new helper function `pl_image_set_chroma_location` to only set the plane shift for actually subsampled planes. Annoying API break, but it is what it is.
Showing
- meson.build 1 addition, 1 deletionmeson.build
- src/colorspace.c 3 additions, 0 deletionssrc/colorspace.c
- src/include/libplacebo/colorspace.h 2 additions, 0 deletionssrc/include/libplacebo/colorspace.h
- src/include/libplacebo/renderer.h 6 additions, 0 deletionssrc/include/libplacebo/renderer.h
- src/renderer.c 42 additions, 0 deletionssrc/renderer.c
Loading
Please register or sign in to comment