diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-29 23:23:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-29 23:23:10 +0100 |
| commit | a115088ca904a26d100e479a7fde21c9235bf7c9 (patch) | |
| tree | fb21dea1726656f883eb9c1458f18ad16cebd9bd | |
| parent | 51a1cee215700b43fa20e12084b7987ef3b64b42 (diff) | |
| parent | bdcaf60ec37ec694f1e221a33b090f670bf974d6 (diff) | |
Merge remote-tracking branch 'origin/main' into v2.17.x
| -rw-r--r-- | run/environment | 5 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 2 | ||||
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 2 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 9 | ||||
| -rw-r--r-- | src/lib/video_content.h | 2 | ||||
| -rw-r--r-- | wscript | 9 |
6 files changed, 21 insertions, 8 deletions
diff --git a/run/environment b/run/environment index aabb463f3..aa4f77187 100644 --- a/run/environment +++ b/run/environment @@ -1,6 +1,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" build=$DIR/../build -export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH +if [[ $(readlink -f $DIR/..) =~ (.*build/[^/]*) ]]; then + export LD_LIBRARY_PATH=${BASH_REMATCH[1]}/lib:$LD_LIBRARY_PATH +fi export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib export DCPOMATIC_GRAPHICS=$DIR/../graphics diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 8baa40c1b..c80bdec69 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -295,8 +295,10 @@ FFmpegContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job) _filters.push_back(*Filter::from_id("hflip")); } else if (fabs (rot - 90) < 1.0) { _filters.push_back(*Filter::from_id("90clock")); + video->rotate_size(); } else if (fabs (rot - 270) < 1.0) { _filters.push_back(*Filter::from_id("90anticlock")); + video->rotate_size(); } } if (examiner->has_alpha()) { diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 583ea1297..f7d3f9df3 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -173,8 +173,6 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo /* This code taken from get_rotation() in ffmpeg:cmdutils.c */ auto stream = _format_context->streams[*_video_stream]; auto rotate_tag = av_dict_get (stream->metadata, "rotate", 0, 0); - _rotation = 0; - if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0")) { char *tail; _rotation = av_strtod (rotate_tag->value, &tail); diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index e84462ed2..10dd5ff1e 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -724,3 +724,12 @@ VideoContent::actual_crop () const ); } + +void +VideoContent::rotate_size() +{ + if (_size) { + std::swap(_size->width, _size->height); + } +} + diff --git a/src/lib/video_content.h b/src/lib/video_content.h index a7b630b14..eb106cc75 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -220,6 +220,8 @@ public: void modify_position (std::shared_ptr<const Film> film, dcpomatic::DCPTime& pos) const; void modify_trim_start (dcpomatic::ContentTime& pos) const; + void rotate_size(); + static std::shared_ptr<VideoContent> from_xml (Content* parent, cxml::ConstNodePtr node, int version, VideoRange video_range_hint); private: @@ -61,7 +61,6 @@ def options(opt): opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests') opt.add_option('--target-windows-64', action='store_true', default=False, help='set up to do a cross-compile for Windows 64-bit') opt.add_option('--target-windows-32', action='store_true', default=False, help='set up to do a cross-compile for Windows 32-bit') - opt.add_option('--target-macos-arm64', action='store_true', default=False, help='set up to do a cross-compile for macOS arm64') opt.add_option('--static-dcpomatic', action='store_true', default=False, help='link to components of DCP-o-matic statically') opt.add_option('--static-boost', action='store_true', default=False, help='link statically to Boost') opt.add_option('--static-wxwidgets', action='store_true', default=False, help='link statically to wxWidgets') @@ -117,6 +116,8 @@ def configure(conf): else: conf.env.INSTALL_PREFIX = conf.options.destdir + conf.check_cxx(cxxflags=['-msse', '-mfpmath=sse'], msg='Checking for SSE support', mandatory=False, define_name='SSE') + # Common CXXFLAGS conf.env.append_value('CXXFLAGS', ['-D__STDC_CONSTANT_MACROS', '-D__STDC_LIMIT_MACROS', @@ -145,8 +146,8 @@ def configure(conf): if conf.options.warnings_are_errors: conf.env.append_value('CXXFLAGS', '-Werror') - if not conf.options.target_macos_arm64: - conf.env.append_value('CXXFLAGS', '-msse') + if conf.env.SSE: + conf.env.append_value('CXXFLAGS', ['-msse', '-mfpmath=sse']) if conf.options.enable_asan: conf.env.append_value('CXXFLAGS', '-fsanitize=address') @@ -193,7 +194,6 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DWIN32_LEAN_AND_MEAN') conf.env.append_value('CXXFLAGS', '-DBOOST_USE_WINDOWS_H') conf.env.append_value('CXXFLAGS', '-DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN') - conf.env.append_value('CXXFLAGS', '-mfpmath=sse') conf.env.append_value('CXXFLAGS', '-Wcast-align') wxrc = os.popen('wx-config --rescomp').read().split()[1:] conf.env.append_value('WINRCFLAGS', wxrc) @@ -230,7 +230,6 @@ def configure(conf): # Linux if conf.env.TARGET_LINUX: - conf.env.append_value('CXXFLAGS', '-mfpmath=sse') conf.env.append_value('CXXFLAGS', '-DLINUX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX']) conf.env.append_value('CXXFLAGS', '-DLINUX_SHARE_PREFIX="%s/share"' % conf.env['INSTALL_PREFIX']) conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX') |
