Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2020-05-26 12:50:47 +0300
committerJean-Baptiste Kempf <jb@videolan.org>2020-05-26 16:18:17 +0300
commit12a64ec7a0f6be0315e5e4036d0c4608038846c6 (patch)
tree8a4a406a844d55fd9f4760bf983997e71b67931f /examples
parenta1e7a329b2f87154f97630403a2708030447b6ae (diff)
dav1dplay: use new pl_chroma_location API
This one correctly sets the subsampling mode based on whether or not the plane is actually subsampled, and also infers PL_CHROMA_UNKNOWN as PL_CHROMA_TOP_LEFT in such cases.
Diffstat (limited to 'examples')
-rw-r--r--examples/dp_renderer_placebo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/dp_renderer_placebo.c b/examples/dp_renderer_placebo.c
index c7a2a11..beb1d42 100644
--- a/examples/dp_renderer_placebo.c
+++ b/examples/dp_renderer_placebo.c
@@ -572,8 +572,12 @@ static int placebo_upload_image(void *cookie, Dav1dPicture *dav1d_pic,
}
// Apply the correct chroma plane shift. This has to be done after pl_upload_plane
+#if PL_API_VER >= 67
+ pl_image_set_chroma_location(image, chroma_loc);
+#else
pl_chroma_location_offset(chroma_loc, &image->planes[1].shift_x, &image->planes[1].shift_y);
pl_chroma_location_offset(chroma_loc, &image->planes[2].shift_x, &image->planes[2].shift_y);
+#endif
if (!ok) {
fprintf(stderr, "Failed uploading planes!\n");