diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-10-03 21:22:14 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-10-03 23:41:02 +0200 |
| commit | 969906f2dd6c5c144781861f53e2a0f6baefb9a3 (patch) | |
| tree | d4091610b2c0582f52a8d484fd7a36a9c4878111 /src/lib/player.cc | |
| parent | 70b72b53eab0f247eb4dc605a2d669d4adb4e469 (diff) | |
Don't scale chroma subsampled images to sizes that don't align with the subsampling (#1872).v2.15.166
There's a slightly odd effect when scaling e.g. YVU420 images to
odd and then even widths - there's a small but visible luminance
shift. I don't know why this happens, but keeping the scaling
sizes locked to the subsampling seems to help.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 285126ced..b93bf3f4a 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -920,16 +920,23 @@ Player::video (weak_ptr<Piece> wp, ContentVideo video) } } + auto const content_video = piece->content->video; + _last_video[wp] = std::make_shared<PlayerVideo>( video.image, - piece->content->video->actual_crop(), - piece->content->video->fade (_film, video.frame), - scale_for_display(piece->content->video->scaled_size(_film->frame_size()), _video_container_size, _film->frame_size()), + content_video->actual_crop(), + content_video->fade (_film, video.frame), + scale_for_display( + content_video->scaled_size(_film->frame_size()), + _video_container_size, + _film->frame_size(), + content_video->pixel_quanta() + ), _video_container_size, video.eyes, video.part, - piece->content->video->colour_conversion(), - piece->content->video->range(), + content_video->colour_conversion(), + content_video->range(), piece->content, video.frame, false |
