summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-29 23:02:34 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-29 23:02:34 +0100
commitfa1c0e32be95d6507ed2100fffcb3230269a880e (patch)
tree2fbb85940996be0f3d4d8fe5546ba569d27f017a
parentf1633689739cc77f81e14365c862b5832d19da76 (diff)
parent07ee845fddca9c7f4e714cf0df8f3e755af7ed81 (diff)
Merge branch 'osx'
-rw-r--r--NOTES4
-rw-r--r--TODO137
-rw-r--r--cscript16
-rw-r--r--ffmpeg-versions1
-rw-r--r--platform/linux/control-12.04-32 (renamed from builds/control-12.04-32)0
-rw-r--r--platform/linux/control-12.04-64 (renamed from builds/control-12.04-64)0
-rw-r--r--platform/linux/control-12.10-32 (renamed from builds/control-12.10-32)0
-rw-r--r--platform/linux/control-12.10-64 (renamed from builds/control-12.10-64)0
-rwxr-xr-xplatform/osx/waf13
-rwxr-xr-xplatform/windows/.gtkrc-2.0 (renamed from windows/.gtkrc-2.0)0
-rw-r--r--platform/windows/dvdomatic.bmp (renamed from windows/dvdomatic.bmp)bin343254 -> 343254 bytes
-rw-r--r--platform/windows/dvdomatic.ico (renamed from windows/dvdomatic.ico)bin9662 -> 9662 bytes
-rw-r--r--platform/windows/dvdomatic.rc (renamed from windows/dvdomatic.rc)0
-rw-r--r--platform/windows/dvdomatic_taskbar.ico (renamed from windows/dvdomatic_taskbar.ico)bin1150 -> 1150 bytes
-rw-r--r--platform/windows/installer.nsi.32.in (renamed from windows/installer.nsi.32.in)0
-rw-r--r--platform/windows/installer.nsi.64.in (renamed from windows/installer.nsi.64.in)0
-rw-r--r--platform/windows/wscript (renamed from windows/wscript)0
-rwxr-xr-xrun/dvdomatic-osx15
-rw-r--r--src/lib/dcp_video_frame.cc2
-rw-r--r--src/lib/subtitle.cc10
-rw-r--r--src/lib/subtitle.h6
-rw-r--r--src/lib/util.cc4
-rw-r--r--src/lib/util.h7
-rw-r--r--src/tools/dvdomatic.cc9
-rw-r--r--src/wx/film_viewer.cc2
-rw-r--r--wscript2
26 files changed, 65 insertions, 163 deletions
diff --git a/NOTES b/NOTES
deleted file mode 100644
index 245017e0d..000000000
--- a/NOTES
+++ /dev/null
@@ -1,4 +0,0 @@
-
-... perhaps generate the CPL hash on the fly
-Make check of hashes optional; recovery in general
-Fix multi-reel or remove it \ No newline at end of file
diff --git a/TODO b/TODO
deleted file mode 100644
index 17f02e429..000000000
--- a/TODO
+++ /dev/null
@@ -1,137 +0,0 @@
-Make a DCP with subs using subtitle edit.
-
-Look at http://liblqr.wikidot.com/en:manual
-
-EC2
-
-Small instance $0.085 ph
-Sintel Trailer 1080p @ 200000 Mbps
-1247 frames @ 24fps ie 51.96s
-Took 1h20 to encode
-
-High-CPU medium $0.186 ph
-Sintel Trailer 1080p @ 200000 Mbps
-1247 frames @ 24fps ie 51.96s
-Took 23m to encode
-
-High-CPU extra-large $0.744 ph
-Sintel Trailer 1080p @ 200000 Mbps
-1247 frames @ 24fps ie 51.96s
-
-
-Transfer in free
-Transfer out $0.120 per GB
-
-
-Port DVD rip
-
-Write still j2ks straight to a MXF.
-md5_data to use openssl
-Write all j2ks straight to a MXF? Possible?
-
-Standardise j2c/j2k
-Format name in ~/.dvdomatic screws up with spaces; use ID or something
-Thumbnails are poorly named
-x-thread signaller
-Restartable jobs somehow
-More logging
-Nice error when trying to thumbnail with no content.
-Destroy _buffer_src_context / _buffer_sink_context
-Don't start later jobs when one breaks.
-Compute time remaining based on more recent information.
-Use lexical_cast more
-Do deps better
-
-options summary
-
-1: L
-2: R
-3: C
-4: Lfe
-5: Ls
-6: Rs
-
-City Screen
-
-Screen 1: "1.37" masking preset, projector only has DCI 133 preset.
-
-With 1480x1080 alignment in DCI 133: bottom you see purple, yellow; top purple; left and right no lines
-With 1480x1080 alignment in DCI Flat: outside masks, but you see bottom purple, yellow; left/right all; top purple
-
-
-Screen 2: no real masking preset, projector has DCI 133 and DCI 137
-
-1480x1080, DCI 133
-L yellow purple
-R none
-B purple
-T none
-1480x1080, DCI 137
-L all
-R all but blue
-T purple
-B purple
-
-
-Screen 3: projector has DCI 1.38
-
-1480x1080
-L, R, T none
-B purple + yellow
-
-
-films-0.6: Dolby Countdown looks as though it's 3D. THX Terminator 2 fucked
-(these on default settings)
-fq/gradfun --- no obvious effect
-hqdn3d --- pretty good denoising
-ow --- no obvious effect
-tn --- interesting; much noise reduction, bad artefacts on movement, colour tint even in black
-unsharp --- worse
-
-Benchmark SWS options: lanczos ?
-hqdn3d=0:0:6 ? (turn off chroma/luma blurring)
-
-Lanczos; no visible effect on Ghostbusters.
-
-
-THX_Monster with master Intel Core 2 Duo E4600 (2.4GHz), slave Intel Core i3 M350 (2.27GHz)
-1920 x 1080 original -> DCI Flat
-240 frames
-
-[Gbit: gigabit ethernet rather than 100Mbit]
-[im-mod: after modification to memcpy RGB data then to RGB -> XYZ in the encode thread
-[hack1]: after modification to pass YUV and to swscale in the encode thread (includes im-mod)
-[hack2]: modified hack1
- Time Seconds FPS Speedup relative to 1 local
-1 local: 20m57 1257 0.19 x 1
-2 local: 11m24 684 0.35 x 1.84
-2 local [im-mod]: 13m13
-2 local + 1 slave: 6m34 394 0.61 x 3.19
-2 local + 2 slave: 5m13 313 0.77 x 4.02
-2 local + 4 slave: 5m05 303 0.79 x 4.15
-2 local + 4 slave [Gbit]: 2m50 170 1.41 x 7.39
-2 local + 4 slave [Gbit,im-mod]:2m33
-2 local + 4 slave [Gbit,hack1]: 3m20
-2 local + 4 slave [Gbit,hack2]: 2m22
-1 local + 8 slave [Gbit]: 2m28 148 1.62 x 8.49
-2 local + 8 slave [Gbit]: 2m41 161 1.49 x 7.81
-2 local + 8 slave [Gbit,im-mod]:2m35
-
-
-
-Just encode 52s
-Encode + Image create 1m27
-Encode + Image create (memcpy, not convert) 53s.
-
-THX_Monster with master Intel Core i3 M350 (2.27GHz), slave Intel Core 2 Duo E4600 (2.4GHz)
-1920 x 1080 original -> DCI Flat
-240 frames
-
-
-4 local: 2m45
-4 local [im-mod]: 2m53
-4 local + 2 slave [Gbit]: 2m22
-4 local + 4 slave [Gbit]: 2m21
-4 local + 4 slave [Gbit,in-mod]:2m21
-
-
diff --git a/cscript b/cscript
index 427cd8e56..a3898aa6e 100644
--- a/cscript
+++ b/cscript
@@ -26,20 +26,20 @@ def build(env, target):
def package(env, target, version):
if target.platform == 'windows':
- shutil.copyfile('build/windows/installer.%s.nsi' % target.bits, 'build/windows/installer2.%s.nsi' % target.bits)
- env.command('sed -i "s~%%resources%%~%s/windows~g" build/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
- env.command('sed -i "s~%%deps%%~%s~g" build/windows/installer2.%s.nsi' % (env.windows_prefix, target.bits))
- env.command('sed -i "s~%%binaries%%~%s/build~g" build/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
- env.command('sed -i "s~%%bits%%~32~g" build/windows/installer2.%s.nsi' % target.bits)
- env.command('makensis build/windows/installer2.%s.nsi' % target.bits)
- return os.path.abspath(glob.glob('build/windows/*%s*.exe' % target.bits)[0])
+ shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits)
+ env.command('sed -i "s~%%resources%%~%s/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
+ env.command('sed -i "s~%%deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (env.windows_prefix, target.bits))
+ env.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits))
+ env.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits)
+ env.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits)
+ return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0])
elif target.platform == 'linux':
if target.bits == 32:
cpu = 'i386'
else:
cpu = 'amd64'
- shutil.copyfile('builds/control-%s-%d' % (target.version, target.bits), 'debian/control')
+ shutil.copyfile('platform/linux/control-%s-%d' % (target.version, target.bits), 'debian/control')
env.command('./waf dist')
f = open('debian/files', 'w')
print >>f,'dvdomatic_%s-1_%s.deb video extra' % (version, cpu)
diff --git a/ffmpeg-versions b/ffmpeg-versions
deleted file mode 100644
index caf166c99..000000000
--- a/ffmpeg-versions
+++ /dev/null
@@ -1 +0,0 @@
-6912e7a008acd1464a63b0a00779a3de81b9a8ab 0.64
diff --git a/builds/control-12.04-32 b/platform/linux/control-12.04-32
index 0f52d03ae..0f52d03ae 100644
--- a/builds/control-12.04-32
+++ b/platform/linux/control-12.04-32
diff --git a/builds/control-12.04-64 b/platform/linux/control-12.04-64
index fa4b4476e..fa4b4476e 100644
--- a/builds/control-12.04-64
+++ b/platform/linux/control-12.04-64
diff --git a/builds/control-12.10-32 b/platform/linux/control-12.10-32
index 0e5fc1f46..0e5fc1f46 100644
--- a/builds/control-12.10-32
+++ b/platform/linux/control-12.10-32
diff --git a/builds/control-12.10-64 b/platform/linux/control-12.10-64
index 24e16b4b5..24e16b4b5 100644
--- a/builds/control-12.10-64
+++ b/platform/linux/control-12.10-64
diff --git a/platform/osx/waf b/platform/osx/waf
new file mode 100755
index 000000000..7423eb973
--- /dev/null
+++ b/platform/osx/waf
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+ENV=/Users/carl/Environments/osx/10.8
+DEPS=/Users/carl/cdist
+
+export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig:$ENV/lib/pkgconfig
+export LINKFLAGS="-L$ENV/lib"
+export CXXFLAGS="-I$ENV/include"
+export PATH=$PATH:$ENV/bin
+./waf $*
+
diff --git a/windows/.gtkrc-2.0 b/platform/windows/.gtkrc-2.0
index 0ea1d69c9..0ea1d69c9 100755
--- a/windows/.gtkrc-2.0
+++ b/platform/windows/.gtkrc-2.0
diff --git a/windows/dvdomatic.bmp b/platform/windows/dvdomatic.bmp
index 0a196f7a0..0a196f7a0 100644
--- a/windows/dvdomatic.bmp
+++ b/platform/windows/dvdomatic.bmp
Binary files differ
diff --git a/windows/dvdomatic.ico b/platform/windows/dvdomatic.ico
index 225008cfe..225008cfe 100644
--- a/windows/dvdomatic.ico
+++ b/platform/windows/dvdomatic.ico
Binary files differ
diff --git a/windows/dvdomatic.rc b/platform/windows/dvdomatic.rc
index 17790cf0d..17790cf0d 100644
--- a/windows/dvdomatic.rc
+++ b/platform/windows/dvdomatic.rc
diff --git a/windows/dvdomatic_taskbar.ico b/platform/windows/dvdomatic_taskbar.ico
index f4489fa14..f4489fa14 100644
--- a/windows/dvdomatic_taskbar.ico
+++ b/platform/windows/dvdomatic_taskbar.ico
Binary files differ
diff --git a/windows/installer.nsi.32.in b/platform/windows/installer.nsi.32.in
index b73e4f345..b73e4f345 100644
--- a/windows/installer.nsi.32.in
+++ b/platform/windows/installer.nsi.32.in
diff --git a/windows/installer.nsi.64.in b/platform/windows/installer.nsi.64.in
index f499c46c2..f499c46c2 100644
--- a/windows/installer.nsi.64.in
+++ b/platform/windows/installer.nsi.64.in
diff --git a/windows/wscript b/platform/windows/wscript
index 585cebef1..585cebef1 100644
--- a/windows/wscript
+++ b/platform/windows/wscript
diff --git a/run/dvdomatic-osx b/run/dvdomatic-osx
new file mode 100755
index 000000000..ac42c3186
--- /dev/null
+++ b/run/dvdomatic-osx
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:build/src/lib:build/src:/Users/carl/Environments/osx/10.8/lib
+if [ "$1" == "--debug" ]; then
+ shift
+ gdb --args build/src/tools/dvdomatic "$*"
+elif [ "$1" == "--valgrind" ]; then
+ shift
+ valgrind --tool="memcheck" build/src/tools/dvdomatic $*
+elif [ "$1" == "--i18n" ]; then
+ shift
+ LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 build/src/tools/dvdomatic "$*"
+else
+ build/src/tools/dvdomatic "$*"
+fi
diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc
index d674393a9..77b81a658 100644
--- a/src/lib/dcp_video_frame.cc
+++ b/src/lib/dcp_video_frame.cc
@@ -164,7 +164,7 @@ DCPVideoFrame::encode_locally ()
shared_ptr<Image> prepared = _input->scale_and_convert_to_rgb (_out_size, _padding, _scaler, true);
if (_subtitle) {
- Rect tx = subtitle_transformed_area (
+ dvdomatic::Rect tx = subtitle_transformed_area (
float (_out_size.width) / _input->size().width,
float (_out_size.height) / _input->size().height,
_subtitle->area(), _subtitle_offset, _subtitle_scale
diff --git a/src/lib/subtitle.cc b/src/lib/subtitle.cc
index 5c1ad9706..5c2a0d0b5 100644
--- a/src/lib/subtitle.cc
+++ b/src/lib/subtitle.cc
@@ -108,13 +108,13 @@ Subtitle::Subtitle (Position p, shared_ptr<Image> i)
* in the coordinate space of the source.
* @param subtitle_scale scaling factor to apply to the subtitle image.
*/
-Rect
+dvdomatic::Rect
subtitle_transformed_area (
float target_x_scale, float target_y_scale,
- Rect sub_area, int subtitle_offset, float subtitle_scale
+ dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
)
{
- Rect tx;
+ dvdomatic::Rect tx;
sub_area.y += subtitle_offset;
@@ -143,8 +143,8 @@ subtitle_transformed_area (
}
/** @return area that this subtitle takes up, in the original uncropped source's coordinate space */
-Rect
+dvdomatic::Rect
Subtitle::area () const
{
- return Rect (_position.x, _position.y, _image->size().width, _image->size().height);
+ return dvdomatic::Rect (_position.x, _position.y, _image->size().width, _image->size().height);
}
diff --git a/src/lib/subtitle.h b/src/lib/subtitle.h
index 38ba4e70e..e3a853695 100644
--- a/src/lib/subtitle.h
+++ b/src/lib/subtitle.h
@@ -46,17 +46,17 @@ public:
return _image;
}
- Rect area () const;
+ dvdomatic::Rect area () const;
private:
Position _position;
boost::shared_ptr<Image> _image;
};
-Rect
+dvdomatic::Rect
subtitle_transformed_area (
float target_x_scale, float target_y_scale,
- Rect sub_area, int subtitle_offset, float subtitle_scale
+ dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
);
/** A Subtitle class with details of the time over which it should be shown */
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 2f8be6edd..b8b60c6f6 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -637,8 +637,8 @@ Socket::read_uint32 ()
/** @param other A Rect.
* @return The intersection of this with `other'.
*/
-Rect
-Rect::intersection (Rect const & other) const
+dvdomatic::Rect
+dvdomatic::Rect::intersection (Rect const & other) const
{
int const tx = max (x, other.x);
int const ty = max (y, other.y);
diff --git a/src/lib/util.h b/src/lib/util.h
index d0c350a56..3e1d7f4b4 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -44,6 +44,8 @@ extern "C" {
#define TIMING(...)
#endif
+#undef check
+
/** The maximum number of audio channels that we can cope with */
#define MAX_AUDIO_CHANNELS 6
@@ -150,6 +152,9 @@ struct Position
int y;
};
+namespace dvdomatic
+{
+
/** @struct Rect
* @brief A rectangle.
*/
@@ -185,6 +190,8 @@ struct Rect
Rect intersection (Rect const & other) const;
};
+}
+
extern std::string crop_string (Position, libdcp::Size);
extern int dcp_audio_sample_rate (int);
extern std::string colour_lut_index_to_name (int index);
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc
index ff1560f0e..e6d4471db 100644
--- a/src/tools/dvdomatic.cc
+++ b/src/tools/dvdomatic.cc
@@ -23,6 +23,9 @@
#ifdef __WXMSW__
#include <shellapi.h>
#endif
+#ifdef __WXOSX__
+#include <ApplicationServices/ApplicationServices.h>
+#endif
#include <wx/aboutdlg.h>
#include <wx/stdpaths.h>
#include <wx/cmdline.h>
@@ -472,6 +475,12 @@ class App : public wxApp
#ifdef DVDOMATIC_POSIX
unsetenv ("UBUNTU_MENUPROXY");
+#endif
+
+#ifdef __WXOSX__
+ ProcessSerialNumber serial;
+ GetCurrentProcess (&serial);
+ TransformProcessType (&serial, kProcessTransformToForegroundApplication);
#endif
wxInitAllImageHandlers ();
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 82490e329..79642af9c 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -329,7 +329,7 @@ FilmViewer::raw_to_display ()
Size const cropped_size = _film->cropped_size (_film->size ());
- Rect tx = subtitle_transformed_area (
+ dvdomatic::Rect tx = subtitle_transformed_area (
float (_film_size.width) / cropped_size.width,
float (_film_size.height) / cropped_size.height,
_raw_sub->area(), _film->subtitle_offset(), _film->subtitle_scale()
diff --git a/wscript b/wscript
index b5676ba5b..86ed07b1b 100644
--- a/wscript
+++ b/wscript
@@ -192,7 +192,7 @@ def build(bld):
bld.recurse('src')
bld.recurse('test')
if bld.env.TARGET_WINDOWS:
- bld.recurse('windows')
+ bld.recurse('platform/windows')
d = { 'PREFIX' : '${PREFIX' }