YCbCr output support
Compare changes
- Niklas Haas authored
The scaler code only checks whether or not the FBOFMT is storable, but in the case of e.g. draw_overlays, we have to check the actual FBO (provided by the user) instead. Solve this by just checking both. (Note: In theory, if the FBO is storable but FBOFMT is not, this would be a false negative. But whatever.)
+ 488
− 331
@@ -21,17 +21,6 @@
@@ -67,9 +56,11 @@ struct pl_renderer {
@@ -168,10 +159,13 @@ void pl_renderer_destroy(struct pl_renderer **p_rr)
@@ -237,6 +231,15 @@ struct img {
@@ -249,17 +252,22 @@ struct pass_state {
@@ -438,7 +446,7 @@ static struct sampler_info sample_src_info(struct pl_renderer *rr,
@@ -478,7 +486,7 @@ static void dispatch_sampler(struct pass_state *pass, struct pl_shader *sh,
@@ -520,7 +528,23 @@ fallback:
@@ -537,8 +561,8 @@ static void draw_overlays(struct pass_state *pass, const struct pl_tex *fbo,
@@ -569,12 +593,12 @@ static void draw_overlays(struct pass_state *pass, const struct pl_tex *fbo,
@@ -607,6 +631,7 @@ static void draw_overlays(struct pass_state *pass, const struct pl_tex *fbo,
@@ -778,7 +803,7 @@ enum {
@@ -895,13 +920,10 @@ cleanup:
@@ -912,12 +934,6 @@ static const char *plane_type_names[] = {
@@ -960,47 +976,11 @@ static void log_plane_info(struct pl_renderer *rr, const struct plane_state *st)
@@ -1074,25 +1054,18 @@ static bool plane_user_hooks(struct pass_state *pass, struct plane_state *st,
@@ -1103,39 +1076,12 @@ static bool pass_read_image(struct pl_renderer *rr, struct pass_state *pass,
@@ -1151,10 +1097,10 @@ static bool pass_read_image(struct pl_renderer *rr, struct pass_state *pass,
@@ -1232,7 +1178,7 @@ static bool pass_read_image(struct pl_renderer *rr, struct pass_state *pass,
@@ -1325,7 +1271,7 @@ static bool pass_scale_main(struct pl_renderer *rr, struct pass_state *pass,
@@ -1361,6 +1307,8 @@ static bool pass_scale_main(struct pl_renderer *rr, struct pass_state *pass,
@@ -1397,27 +1345,28 @@ static bool pass_scale_main(struct pl_renderer *rr, struct pass_state *pass,
@@ -1440,18 +1389,17 @@ static bool pass_scale_main(struct pl_renderer *rr, struct pass_state *pass,
@@ -1465,7 +1413,7 @@ static bool pass_output_target(struct pl_renderer *rr, struct pass_state *pass,
@@ -1484,7 +1432,7 @@ static bool pass_output_target(struct pl_renderer *rr, struct pass_state *pass,
@@ -1508,7 +1456,7 @@ fallback:
@@ -1516,59 +1464,315 @@ fallback:
@@ -1582,8 +1786,8 @@ static void fix_rects(struct pass_state *pass, const struct pl_tex *ref_tex)
@@ -1597,8 +1801,8 @@ static void fix_rects(struct pass_state *pass, const struct pl_tex *ref_tex)
@@ -1606,78 +1810,44 @@ static void fix_rects(struct pass_state *pass, const struct pl_tex *ref_tex)
@@ -1695,38 +1865,45 @@ static void fix_bits(struct pl_bit_encoding *bits, const struct pl_tex *tex)
@@ -1745,28 +1922,6 @@ bool pl_render_image(struct pl_renderer *rr, const struct pl_image *pimage,
@@ -1777,44 +1932,18 @@ error:
@@ -1823,42 +1952,70 @@ void pl_image_set_chroma_location(struct pl_image *image,