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/util.h | |
| 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/util.h')
| -rw-r--r-- | src/lib/util.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/util.h b/src/lib/util.h index 013eabe12..10c5678ff 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -18,16 +18,20 @@ */ + /** @file src/util.h * @brief Some utility functions and classes. */ + #ifndef DCPOMATIC_UTIL_H #define DCPOMATIC_UTIL_H -#include "types.h" -#include "dcpomatic_time.h" + #include "audio_mapping.h" +#include "dcpomatic_time.h" +#include "pixel_quanta.h" +#include "types.h" #include <dcp/atmos_asset.h> #include <dcp/decrypted_kdm.h> #include <dcp/util.h> @@ -41,6 +45,7 @@ #undef check + namespace dcp { class PictureAsset; class SoundAsset; @@ -119,7 +124,7 @@ extern std::string day_of_week_to_string (boost::gregorian::greg_weekday d); extern void emit_subtitle_image (dcpomatic::ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, std::shared_ptr<TextDecoder> decoder); extern bool show_jobs_on_console (bool progress); extern void copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::function<void (float)>); -extern dcp::Size scale_for_display (dcp::Size s, dcp::Size display_container, dcp::Size film_container); +extern dcp::Size scale_for_display (dcp::Size s, dcp::Size display_container, dcp::Size film_container, PixelQuanta quanta); extern dcp::DecryptedKDM decrypt_kdm_with_helpful_error (dcp::EncryptedKDM kdm); extern boost::filesystem::path default_font_file (); extern std::string to_upper (std::string s); |
