-libdcp::Size
-VideoContent::video_size_after_3d_split () const
-{
- libdcp::Size const s = video_size ();
- switch (video_frame_type ()) {
- case VIDEO_FRAME_TYPE_2D:
- case VIDEO_FRAME_TYPE_3D_ALTERNATE:
- case VIDEO_FRAME_TYPE_3D_LEFT:
- case VIDEO_FRAME_TYPE_3D_RIGHT:
- return s;
- case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT:
- return libdcp::Size (s.width / 2, s.height);
- case VIDEO_FRAME_TYPE_3D_TOP_BOTTOM:
- return libdcp::Size (s.width, s.height / 2);
+ if (size().width && size().height) {
+ d += String::compose (
+ _("Content video is %1x%2"),
+ size_after_3d_split().width,
+ size_after_3d_split().height
+ );
+
+
+ double ratio = size_after_3d_split().ratio ();
+
+ if (sample_aspect_ratio ()) {
+ snprintf (buffer, sizeof(buffer), _(", pixel aspect ratio %.2f:1"), sample_aspect_ratio().get());
+ d += buffer;
+ ratio *= sample_aspect_ratio().get ();
+ }
+
+ snprintf (buffer, sizeof(buffer), _("\nDisplay aspect ratio %.2f:1"), ratio);
+ d += buffer;
+ }
+
+ if ((crop().left || crop().right || crop().top || crop().bottom) && size() != dcp::Size (0, 0)) {
+ dcp::Size cropped = size_after_crop ();
+ d += String::compose (
+ _("Cropped to %1x%2"),
+ cropped.width, cropped.height
+ );
+
+ snprintf (buffer, sizeof(buffer), " (%.2f:1)\n", cropped.ratio());
+ d += buffer;
+ }
+
+ shared_ptr<const Film> film = _parent->film ();
+ dcp::Size const container_size = film->frame_size ();
+ dcp::Size const scaled = scale().size (shared_from_this(), container_size, container_size);
+
+ if (scaled != size_after_crop ()) {
+ d += String::compose (
+ _("Scaled to %1x%2"),
+ scaled.width, scaled.height
+ );
+
+ snprintf (buffer, sizeof(buffer), _(" (%.2f:1)\n"), scaled.ratio());
+ d += buffer;
+ }
+
+ if (scaled != container_size) {
+ d += String::compose (
+ _("Padded with black to fit container %1 (%2x%3)"),
+ film->container()->nickname (),
+ container_size.width, container_size.height
+ );
+
+ snprintf (buffer, sizeof(buffer), _(" (%.2f:1)\n"), container_size.ratio());
+ d += buffer;
+ }
+
+ if (_parent->video_frame_rate()) {
+ double const vfr = _parent->video_frame_rate().get ();
+
+ snprintf (buffer, sizeof(buffer), _("Content frame rate %.4f\n"), vfr);
+ d += buffer;
+
+ FrameRateChange frc (vfr, film->video_frame_rate ());
+ d += frc.description () + "\n";