Hacks like that has no place here, mp_image should be tagged correctly, across the player, gpu-next is not special.
Unified · Split
| @@ -625,23 +625,6 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame *src · 624 unmodified lines | |||
| 625 | .user_data = mpi, | 625 | .user_data = mpi, |
| 626 | }; | 626 | }; |
| 627 | 627 | ||
| 628 | // mp_image, like AVFrame, likes communicating RGB/XYZ/YCbCr status | ||
| 629 | // implicitly via the image format, rather than the actual tagging. | ||
| 630 | switch (mp_imgfmt_get_forced_csp(par->imgfmt)) { | ||
| 631 | case PL_COLOR_SYSTEM_RGB: | ||
| 632 | frame->repr.sys = PL_COLOR_SYSTEM_RGB; | ||
| 633 | frame->repr.levels = PL_COLOR_LEVELS_FULL; | ||
| 634 | break; | ||
| 635 | case PL_COLOR_SYSTEM_XYZ: | ||
| 636 | frame->repr.sys = PL_COLOR_SYSTEM_XYZ; | ||
| 637 | break; | ||
| 638 | case PL_COLOR_SYSTEM_UNKNOWN: | ||
| 639 | if (!frame->repr.sys) | ||
| 640 | frame->repr.sys = pl_color_system_guess_ycbcr(par->w, par->h); | ||
| 641 | break; | ||
| 642 | default: break; | ||
| 643 | } | ||
| 644 | |||
| 645 | if (fp->hwdec) { | 628 | if (fp->hwdec) { |
| 646 | 629 | ||
| 647 | struct mp_imgfmt_desc desc = mp_imgfmt_get_desc(par->imgfmt); | 630 | struct mp_imgfmt_desc desc = mp_imgfmt_get_desc(par->imgfmt); |