Unified · Split
| @@ -594,7 +594,7 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame *src · 593 unmodified lines | ||
| 594 | 594 | struct pl_frame *frame) |
| 595 | 595 | { |
| 596 | 596 | struct mp_image *mpi = src->frame_data; |
| 597 | − const struct mp_image_params *par = &mpi->params; | |
| 597 | + struct mp_image_params par = mpi->params; | |
| 598 | 598 | struct frame_priv *fp = mpi->priv; |
| 599 | 599 | struct vo *vo = fp->vo; |
| 600 | 600 | struct priv *p = vo->priv; |
| @@ -610,23 +610,25 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame *src · 9 unmodified lines | ||
| 610 | 610 | return false; |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | − par = &p->hwdec_mapper->dst_params; | |
| 613 | + par = p->hwdec_mapper->dst_params; | |
| 614 | 614 | } |
| 615 | 615 | |
| 616 | + mp_image_params_guess_csp(&par); | |
| 617 | + | |
| 616 | 618 | *frame = (struct pl_frame) { |
| 617 | − .color = par->color, | |
| 618 | − .repr = par->repr, | |
| 619 | + .color = par.color, | |
| 620 | + .repr = par.repr, | |
| 619 | 621 | .profile = { |
| 620 | 622 | .data = mpi->icc_profile ? mpi->icc_profile->data : NULL, |
| 621 | 623 | .len = mpi->icc_profile ? mpi->icc_profile->size : 0, |
| 622 | 624 | }, |
| 623 | − .rotation = par->rotate / 90, | |
| 625 | + .rotation = par.rotate / 90, | |
| 624 | 626 | .user_data = mpi, |
| 625 | 627 | }; |
| 626 | 628 | |
| 627 | 629 | if (fp->hwdec) { |
| 628 | 630 | |
| 629 | − struct mp_imgfmt_desc desc = mp_imgfmt_get_desc(par->imgfmt); | |
| 631 | + struct mp_imgfmt_desc desc = mp_imgfmt_get_desc(par.imgfmt); | |
| 630 | 632 | frame->acquire = hwdec_acquire; |
| 631 | 633 | frame->release = hwdec_release; |
| 632 | 634 | frame->num_planes = desc.num_planes; |
| @@ -686,7 +688,7 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex, const struct pl_source_frame *src · 53 unmodified lines | ||
| 686 | 688 | } |
| 687 | 689 | |
| 688 | 690 | // Update chroma location, must be done after initializing planes |
| 689 | − pl_frame_set_chroma_location(frame, par->chroma_location); | |
| 691 | + pl_frame_set_chroma_location(frame, par.chroma_location); | |
| 690 | 692 | |
| 691 | 693 | if (mpi->film_grain) |
| 692 | 694 | pl_film_grain_from_av(&frame->film_grain, (AVFilmGrainParams *) mpi->film_grain->data); |