2015-03-25 Carl Hetherington <cth@carlh.net>
+ * Remove scaler settings and just uses SWS_BICUBIC all round.
+
* Hand-apply ec3e6abf817b84d589f0782b01f5059dd3bf0953; only allow
even DCP audio channel counts between 2 and 16 inclusive.
#include "config.h"
#include "server.h"
-#include "scaler.h"
#include "filter.h"
#include "ratio.h"
#include "dcp_content_type.h"
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
Taken from code Copyright (C) 2010-2011 Terrence Meiczinger
This program is free software; you can redistribute it and/or modify
#include "exceptions.h"
#include "server.h"
#include "dcpomatic_socket.h"
-#include "scaler.h"
#include "image.h"
#include "log.h"
#include "cross.h"
#include "log.h"
#include "exceptions.h"
#include "examine_content_job.h"
-#include "scaler.h"
#include "config.h"
#include "ui_signaller.h"
#include "playlist.h"
, _dcp_content_type (Config::instance()->default_dcp_content_type ())
, _container (Config::instance()->default_container ())
, _resolution (RESOLUTION_2K)
- , _scaler (Scaler::from_id ("bicubic"))
, _signed (true)
, _encrypted (false)
, _j2k_bandwidth (Config::instance()->default_j2k_bandwidth ())
<< "_" << resolution_to_string (_resolution)
<< "_" << _playlist->video_identifier()
<< "_" << _video_frame_rate
- << "_" << scaler()->id()
<< "_" << j2k_bandwidth();
if (encrypted ()) {
}
root->add_child("Resolution")->add_child_text (resolution_to_string (_resolution));
- root->add_child("Scaler")->add_child_text (_scaler->id ());
root->add_child("J2KBandwidth")->add_child_text (raw_convert<string> (_j2k_bandwidth));
_isdcf_metadata.as_xml (root->add_child ("ISDCFMetadata"));
root->add_child("VideoFrameRate")->add_child_text (raw_convert<string> (_video_frame_rate));
}
_resolution = string_to_resolution (f.string_child ("Resolution"));
- _scaler = Scaler::from_id (f.string_child ("Scaler"));
_j2k_bandwidth = f.number_child<int> ("J2KBandwidth");
_video_frame_rate = f.number_child<int> ("VideoFrameRate");
_signed = f.optional_bool_child("Signed").get_value_or (true);
signal_changed (RESOLUTION);
}
-void
-Film::set_scaler (Scaler const * s)
-{
- _scaler = s;
- signal_changed (SCALER);
-}
-
void
Film::set_j2k_bandwidth (int b)
{
class Player;
class Playlist;
class AudioContent;
-class Scaler;
class Screen;
struct isdcf_name_test;
DCP_CONTENT_TYPE,
CONTAINER,
RESOLUTION,
- SCALER,
SIGNED,
ENCRYPTED,
J2K_BANDWIDTH,
return _resolution;
}
- Scaler const * scaler () const {
- return _scaler;
- }
-
/* signed is a reserved word */
bool is_signed () const {
return _signed;
void set_dcp_content_type (DCPContentType const *);
void set_container (Ratio const *);
void set_resolution (Resolution);
- void set_scaler (Scaler const *);
void set_signed (bool);
void set_encrypted (bool);
void set_j2k_bandwidth (int);
Ratio const * _container;
/** DCP resolution (2K or 4K) */
Resolution _resolution;
- /** Scaler algorithm to use */
- Scaler const * _scaler;
bool _signed;
bool _encrypted;
/** bandwidth for J2K files in bits per second */
#include "image.h"
#include "exceptions.h"
-#include "scaler.h"
#include "timer.h"
#include "rect.h"
#include "util.h"
/** Crop this image, scale it to `inter_size' and then place it in a black frame of `out_size' */
shared_ptr<Image>
-Image::crop_scale_window (Crop crop, dcp::Size inter_size, dcp::Size out_size, Scaler const * scaler, AVPixelFormat out_format, bool out_aligned) const
+Image::crop_scale_window (Crop crop, dcp::Size inter_size, dcp::Size out_size, AVPixelFormat out_format, bool out_aligned) const
{
- DCPOMATIC_ASSERT (scaler);
/* Empirical testing suggests that sws_scale() will crash if
the input image is not aligned.
*/
struct SwsContext* scale_context = sws_getContext (
cropped_size.width, cropped_size.height, pixel_format(),
inter_size.width, inter_size.height, out_format,
- scaler->ffmpeg_id (), 0, 0, 0
+ SWS_BICUBIC, 0, 0, 0
);
if (!scale_context) {
}
shared_ptr<Image>
-Image::scale (dcp::Size out_size, Scaler const * scaler, AVPixelFormat out_format, bool out_aligned) const
+Image::scale (dcp::Size out_size, AVPixelFormat out_format, bool out_aligned) const
{
- DCPOMATIC_ASSERT (scaler);
/* Empirical testing suggests that sws_scale() will crash if
the input image is not aligned.
*/
struct SwsContext* scale_context = sws_getContext (
size().width, size().height, pixel_format(),
out_size.width, out_size.height, out_format,
- scaler->ffmpeg_id (), 0, 0, 0
+ SWS_BICUBIC, 0, 0, 0
);
sws_scale (
#include <boost/function.hpp>
#include <string>
-class Scaler;
class Socket;
class Image
int line_factor (int) const;
int lines (int) const;
- boost::shared_ptr<Image> scale (dcp::Size, Scaler const *, AVPixelFormat, bool aligned) const;
+ boost::shared_ptr<Image> scale (dcp::Size, AVPixelFormat, bool aligned) const;
boost::shared_ptr<Image> crop (Crop c, bool aligned) const;
- boost::shared_ptr<Image> crop_scale_window (Crop c, dcp::Size, dcp::Size, Scaler const *, AVPixelFormat, bool aligned) const;
+ boost::shared_ptr<Image> crop_scale_window (Crop c, dcp::Size, dcp::Size, AVPixelFormat, bool aligned) const;
void make_black ();
void make_transparent ();
#include "raw_image_proxy.h"
#include "ratio.h"
#include "log.h"
-#include "scaler.h"
#include "render_subtitles.h"
#include "config.h"
#include "content_video.h"
last time we were run.
*/
- if (p == Film::SCALER || p == Film::CONTAINER || p == Film::VIDEO_FRAME_RATE) {
+ if (p == Film::CONTAINER || p == Film::VIDEO_FRAME_RATE) {
Changed (false);
}
}
PositionImage (
i->image->scale (
scaled_size,
- Scaler::from_id ("bicubic"),
i->image->pixel_format (),
true
),
optional<float> (),
_video_container_size,
_video_container_size,
- Scaler::from_id ("bicubic"),
EYES_BOTH,
PART_WHOLE,
Config::instance()->colour_conversions().front().conversion
content->fade (i->frame),
image_size,
_video_container_size,
- _film->scaler(),
i->eyes,
i->part,
content->colour_conversion ()
#include "image.h"
#include "image_proxy.h"
#include "j2k_image_proxy.h"
-#include "scaler.h"
#include "film.h"
using std::string;
boost::optional<float> fade,
dcp::Size inter_size,
dcp::Size out_size,
- Scaler const * scaler,
Eyes eyes,
Part part,
optional<ColourConversion> colour_conversion
, _fade (fade)
, _inter_size (inter_size)
, _out_size (out_size)
- , _scaler (scaler)
, _eyes (eyes)
, _part (part)
, _colour_conversion (colour_conversion)
_inter_size = dcp::Size (node->number_child<int> ("InterWidth"), node->number_child<int> ("InterHeight"));
_out_size = dcp::Size (node->number_child<int> ("OutWidth"), node->number_child<int> ("OutHeight"));
- _scaler = Scaler::from_id (node->string_child ("Scaler"));
_eyes = (Eyes) node->number_child<int> ("Eyes");
_part = (Part) node->number_child<int> ("Part");
break;
}
- shared_ptr<Image> out = im->crop_scale_window (total_crop, _inter_size, _out_size, _scaler, pixel_format, true);
+ shared_ptr<Image> out = im->crop_scale_window (total_crop, _inter_size, _out_size, pixel_format, true);
if (burn_subtitle && _subtitle.image) {
out->alpha_blend (_subtitle.image, _subtitle.position);
node->add_child("InterHeight")->add_child_text (raw_convert<string> (_inter_size.height));
node->add_child("OutWidth")->add_child_text (raw_convert<string> (_out_size.width));
node->add_child("OutHeight")->add_child_text (raw_convert<string> (_out_size.height));
- node->add_child("Scaler")->add_child_text (_scaler->id ());
node->add_child("Eyes")->add_child_text (raw_convert<string> (_eyes));
node->add_child("Part")->add_child_text (raw_convert<string> (_part));
if (_colour_conversion) {
_fade.get_value_or(0) != other->_fade.get_value_or(0) ||
_inter_size != other->_inter_size ||
_out_size != other->_out_size ||
- _scaler != other->_scaler ||
_eyes != other->_eyes ||
_part != other->_part ||
_colour_conversion != other->_colour_conversion ||
class Image;
class ImageProxy;
-class Scaler;
class Socket;
class EncodedData;
boost::optional<float>,
dcp::Size,
dcp::Size,
- Scaler const *,
Eyes,
Part,
boost::optional<ColourConversion>
boost::optional<float> _fade;
dcp::Size _inter_size;
dcp::Size _out_size;
- Scaler const * _scaler;
Eyes _eyes;
Part _part;
boost::optional<ColourConversion> _colour_conversion;
+++ /dev/null
-/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-/** @file src/scaler.cc
- * @brief A class to describe one of FFmpeg's software scalers.
- */
-
-#include "dcpomatic_assert.h"
-#include "scaler.h"
-extern "C" {
-#include <libswscale/swscale.h>
-}
-#include <iostream>
-#include <cassert>
-
-#include "i18n.h"
-
-using namespace std;
-
-vector<Scaler const *> Scaler::_scalers;
-
-/** @param f FFmpeg id.
- * @param i Our id.
- * @param n User-visible name.
- */
-Scaler::Scaler (int f, string i, string n)
- : _ffmpeg_id (f)
- , _id (i)
- , _name (n)
-{
-
-}
-
-/** @return All available scalers */
-vector<Scaler const *>
-Scaler::all ()
-{
- return _scalers;
-}
-
-/** Set up the static _scalers vector; must be called before from_*
- * methods are used.
- */
-void
-Scaler::setup_scalers ()
-{
- _scalers.push_back (new Scaler (SWS_BICUBIC, N_("bicubic"), _("Bicubic")));
- _scalers.push_back (new Scaler (SWS_X, N_("x"), _("X")));
- _scalers.push_back (new Scaler (SWS_AREA, N_("area"), _("Area")));
- _scalers.push_back (new Scaler (SWS_GAUSS, N_("gauss"), _("Gaussian")));
- _scalers.push_back (new Scaler (SWS_LANCZOS, N_("lanczos"), _("Lanczos")));
- _scalers.push_back (new Scaler (SWS_SINC, N_("sinc"), _("Sinc")));
- _scalers.push_back (new Scaler (SWS_SPLINE, N_("spline"), _("Spline")));
- _scalers.push_back (new Scaler (SWS_BILINEAR, N_("bilinear"), _("Bilinear")));
- _scalers.push_back (new Scaler (SWS_FAST_BILINEAR, N_("fastbilinear"), _("Fast Bilinear")));
-}
-
-/** @param id One of our ids.
- * @return Corresponding scaler, or 0.
- */
-Scaler const *
-Scaler::from_id (string id)
-{
- vector<Scaler const *>::iterator i = _scalers.begin ();
- while (i != _scalers.end() && (*i)->id() != id) {
- ++i;
- }
-
- if (i == _scalers.end ()) {
- return 0;
- }
-
- return *i;
-}
-
-/** @param s A scaler from our static list.
- * @return Index of the scaler with the list, or -1.
- */
-int
-Scaler::as_index (Scaler const * s)
-{
- vector<Scaler*>::size_type i = 0;
- while (i < _scalers.size() && _scalers[i] != s) {
- ++i;
- }
-
- if (i == _scalers.size ()) {
- return -1;
- }
-
- return i;
-}
-
-/** @param i An index returned from as_index().
- * @return Corresponding scaler.
- */
-Scaler const *
-Scaler::from_index (int i)
-{
- DCPOMATIC_ASSERT (i <= int(_scalers.size ()));
- return _scalers[i];
-}
+++ /dev/null
-/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-/** @file src/scaler.h
- * @brief A class to describe one of FFmpeg's software scalers.
- */
-
-#ifndef DCPOMATIC_SCALER_H
-#define DCPOMATIC_SCALER_H
-
-#include <boost/utility.hpp>
-#include <string>
-#include <vector>
-
-/** @class Scaler
- * @brief Class to describe one of FFmpeg's software scalers
- */
-class Scaler : public boost::noncopyable
-{
-public:
- Scaler (int f, std::string i, std::string n);
-
- /** @return id used for calls to FFmpeg's sws_getContext */
- int ffmpeg_id () const {
- return _ffmpeg_id;
- }
-
- /** @return id for our use */
- std::string id () const {
- return _id;
- }
-
- /** @return user-visible name for this scaler */
- std::string name () const {
- return _name;
- }
-
- static std::vector<Scaler const *> all ();
- static void setup_scalers ();
- static Scaler const * from_id (std::string id);
- static Scaler const * from_index (int);
- static int as_index (Scaler const *);
-
-private:
-
- /** id used for calls to FFmpeg's pp_postprocess */
- int _ffmpeg_id;
- /** id for our use */
- std::string _id;
- /** user-visible name for this scaler */
- std::string _name;
-
- /** all available scalers */
- static std::vector<Scaler const *> _scalers;
-};
-
-#endif
#include "server.h"
#include "dcpomatic_socket.h"
-#include "scaler.h"
#include "image.h"
#include "dcp_video.h"
#include "config.h"
#include "util.h"
#include "exceptions.h"
-#include "scaler.h"
#include "dcp_content_type.h"
#include "filter.h"
#include "cinema_sound_processor.h"
Ratio::setup_ratios ();
VideoContentScale::setup_scales ();
DCPContentType::setup_dcp_content_types ();
- Scaler::setup_scalers ();
Filter::setup_filters ();
CinemaSoundProcessor::setup_cinema_sound_processors ();
AudioProcessor::setup_audio_processors ();
resampler.cc
safe_stringstream.cc
scp_dcp_job.cc
- scaler.cc
scoped_temporary.cc
send_kdm_email_job.cc
send_problem_report_job.cc
/* Enable i18n; this will create a Config object
to look for a force-configured language. This Config
object will be wrong, however, because dcpomatic_setup
- hasn't yet been called and there aren't any scalers, filters etc.
+ hasn't yet been called and there aren't any filters etc.
set up yet.
*/
dcpomatic_setup_i18n ();
- /* Set things up, including scalers / filters etc.
+ /* Set things up, including filters etc.
which will now be internationalised correctly.
*/
dcpomatic_setup ();
/*
- Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Enable i18n; this will create a Config object
to look for a force-configured language. This Config
object will be wrong, however, because dcpomatic_setup
- hasn't yet been called and there aren't any scalers, filters etc.
+ hasn't yet been called and there aren't any filters etc.
set up yet.
*/
dcpomatic_setup_i18n ();
- /* Set things up, including scalers / filters etc.
+ /* Set things up, including filters etc.
which will now be internationalised correctly.
*/
dcpomatic_setup ();
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "lib/transcode_job.h"
#include "lib/job_manager.h"
#include "lib/util.h"
-#include "lib/scaler.h"
#include "lib/version.h"
#include "lib/cross.h"
#include "lib/config.h"
#include "lib/exceptions.h"
#include "lib/util.h"
#include "lib/config.h"
-#include "lib/scaler.h"
#include "lib/image.h"
#include "lib/log.h"
#include "lib/version.h"
}
}
- Scaler::setup_scalers ();
shared_ptr<Log> log;
if (write_log) {
log.reset (new FileLog ("dcpomatic_server_cli.log"));
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "lib/film.h"
#include "lib/filter.h"
#include "lib/util.h"
-#include "lib/scaler.h"
#include "lib/server.h"
#include "lib/dcp_video.h"
#include "lib/decoder.h"
#include "lib/exceptions.h"
-#include "lib/scaler.h"
#include "lib/log.h"
#include "lib/video_decoder.h"
#include "lib/player.h"
#include <dcp/signer.h>
#include "lib/config.h"
#include "lib/ratio.h"
-#include "lib/scaler.h"
#include "lib/filter.h"
#include "lib/dcp_content_type.h"
#include "lib/colour_conversion.h"
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "wx_util.h"
#include "isdcf_metadata_dialog.h"
#include "lib/ratio.h"
-#include "lib/scaler.h"
#include "lib/config.h"
#include "lib/dcp_content_type.h"
#include "lib/util.h"
checked_set (_dcp_content_type, DCPContentType::as_index (_film->dcp_content_type ()));
setup_dcp_name ();
break;
- case Film::SCALER:
- checked_set (_scaler, Scaler::as_index (_film->scaler ()));
- break;
case Film::BURN_SUBTITLES:
checked_set (_burn_subtitles, _film->burn_subtitles ());
break;
film_changed (Film::DCP_CONTENT_TYPE);
film_changed (Film::CONTAINER);
film_changed (Film::RESOLUTION);
- film_changed (Film::SCALER);
film_changed (Film::SIGNED);
film_changed (Film::BURN_SUBTITLES);
film_changed (Film::ENCRYPTED);
_container->Enable (s);
_best_frame_rate->Enable (s && _film && _film->best_video_frame_rate () != _film->video_frame_rate ());
_resolution->Enable (s);
- _scaler->Enable (s);
_three_d->Enable (s);
_standard->Enable (s);
}
-/** Called when the scaler widget has been changed */
-void
-DCPPanel::scaler_changed ()
-{
- if (!_film) {
- return;
- }
-
- int const n = _scaler->GetSelection ();
- if (n >= 0) {
- _film->set_scaler (Scaler::from_index (n));
- }
-}
-
void
DCPPanel::use_isdcf_name_toggled ()
{
}
++r;
- add_label_to_grid_bag_sizer (grid, panel, _("Scaler"), true, wxGBPosition (r, 0));
- _scaler = new wxChoice (panel, wxID_ANY);
- grid->Add (_scaler, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
- ++r;
-
_container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DCPPanel::container_changed, this));
- _scaler->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DCPPanel::scaler_changed, this));
_frame_rate_choice->Bind(wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DCPPanel::frame_rate_choice_changed, this));
_frame_rate_spin->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DCPPanel::frame_rate_spin_changed, this));
_best_frame_rate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DCPPanel::best_frame_rate_clicked, this));
_resolution->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DCPPanel::resolution_changed, this));
_three_d->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&DCPPanel::three_d_changed, this));
- vector<Scaler const *> const sc = Scaler::all ();
- for (vector<Scaler const *>::const_iterator i = sc.begin(); i != sc.end(); ++i) {
- _scaler->Append (std_to_wx ((*i)->name()));
- }
-
vector<Ratio const *> const ratio = Ratio::all ();
for (vector<Ratio const *>::const_iterator i = ratio.begin(); i != ratio.end(); ++i) {
_container->Append (std_to_wx ((*i)->nickname ()));
void copy_isdcf_name_button_clicked ();
void container_changed ();
void dcp_content_type_changed ();
- void scaler_changed ();
void j2k_bandwidth_changed ();
void frame_rate_choice_changed ();
void frame_rate_spin_changed ();
wxChoice* _container;
wxButton* _edit_isdcf_button;
wxButton* _copy_isdcf_name_button;
- wxChoice* _scaler;
wxSpinCtrl* _j2k_bandwidth;
wxChoice* _dcp_content_type;
wxChoice* _frame_rate_choice;
#include "lib/util.h"
#include "lib/job_manager.h"
#include "lib/image.h"
-#include "lib/scaler.h"
#include "lib/exceptions.h"
#include "lib/examine_content_job.h"
#include "lib/filter.h"
if (!pvf.empty ()) {
try {
_frame = pvf.front()->image (PIX_FMT_RGB24, true, boost::bind (&Log::dcp_log, _film->log().get(), _1, _2));
- _frame = _frame->scale (_frame->size(), Scaler::from_id ("fastbilinear"), PIX_FMT_RGB24, false);
+ _frame = _frame->scale (_frame->size(), PIX_FMT_RGB24, false);
_position = pvf.front()->time ();
_inter_position = pvf.front()->inter_position ();
_inter_size = pvf.front()->inter_size ();
#include "lib/image.h"
#include "lib/cross.h"
#include "lib/dcp_video.h"
-#include "lib/scaler.h"
#include "lib/player_video.h"
#include "lib/raw_image_proxy.h"
#include "lib/encoded_data.h"
optional<float> (),
dcp::Size (1998, 1080),
dcp::Size (1998, 1080),
- Scaler::from_id ("bicubic"),
EYES_BOTH,
PART_WHOLE,
ColourConversion ()
optional<float> (),
dcp::Size (1998, 1080),
dcp::Size (1998, 1080),
- Scaler::from_id ("bicubic"),
EYES_BOTH,
PART_WHOLE,
ColourConversion ()
#include <boost/test/unit_test.hpp>
#include <Magick++.h>
#include "lib/image.h"
-#include "lib/scaler.h"
using std::string;
using std::list;
image = image->crop (crop, true);
/* Convert it back to RGB to make comparison to black easier */
- image = image->scale (image->size(), Scaler::from_id ("bicubic"), PIX_FMT_RGB24, true);
+ image = image->scale (image->size(), PIX_FMT_RGB24, true);
/* Check that its still black after the crop */
uint8_t* p = image->data()[0];
/* Convert using separate methods */
boost::shared_ptr<Image> sep = test->crop (crop, true);
- sep = sep->scale (inter_size, Scaler::from_id ("bicubic"), PIX_FMT_RGB24, true);
+ sep = sep->scale (inter_size, PIX_FMT_RGB24, true);
boost::shared_ptr<Image> sep_container (new Image (PIX_FMT_RGB24, out_size, true));
sep_container->make_black ();
sep_container->copy (sep, Position<int> ((out_size.width - inter_size.width) / 2, (out_size.height - inter_size.height) / 2));
/* Convert using the all-in-one method */
- shared_ptr<Image> all = test->crop_scale_window (crop, inter_size, out_size, Scaler::from_id ("bicubic"), PIX_FMT_RGB24, true);
+ shared_ptr<Image> all = test->crop_scale_window (crop, inter_size, out_size, PIX_FMT_RGB24, true);
/* Compare */
BOOST_CHECK_EQUAL (sep_container->size().width, all->size().width);
#include <libavutil/pixfmt.h>
}
#include "lib/image.h"
-#include "lib/scaler.h"
using std::list;
for (list<AVPixelFormat>::const_iterator i = pix_fmts.begin(); i != pix_fmts.end(); ++i) {
boost::shared_ptr<Image> foo (new Image (*i, in_size, true));
foo->make_black ();
- boost::shared_ptr<Image> bar = foo->scale (out_size, Scaler::from_id ("bicubic"), PIX_FMT_RGB24, true);
+ boost::shared_ptr<Image> bar = foo->scale (out_size, PIX_FMT_RGB24, true);
uint8_t* p = bar->data()[0];
for (int y = 0; y < bar->size().height; ++y) {