summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-14 13:15:36 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-14 13:15:36 +0100
commit429e42c019889e90c9e376170b08614654231337 (patch)
treebc23c77f08b6d4af1b25396276f1bbd820fba168 /src/lib
parent48c8f23660184486efbb34df9d677108b0eab204 (diff)
Remove believed-unnecessary PostProcessImage.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/image.cc45
-rw-r--r--src/lib/image.h23
2 files changed, 4 insertions, 64 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index 8fd43093d..98c5228a9 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -167,10 +167,10 @@ Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scal
* @param pp Flags for the required set of post processes.
* @return Post-processed image.
*/
-shared_ptr<PostProcessImage>
+shared_ptr<SimpleImage>
Image::post_process (string pp) const
{
- shared_ptr<PostProcessImage> out (new PostProcessImage (PIX_FMT_YUV420P, size ()));
+ shared_ptr<SimpleImage> out (new SimpleImage (PIX_FMT_YUV420P, size ()));
pp_mode* mode = pp_get_mode_by_name_and_quality (pp.c_str (), PP_QUALITY_MAX);
pp_context* context = pp_get_context (size().width, size().height, PP_FORMAT_420 | PP_CPU_CAPS_MMX2);
@@ -344,44 +344,3 @@ RGBFrameImage::size () const
{
return _size;
}
-
-PostProcessImage::PostProcessImage (PixelFormat p, Size s)
- : Image (p)
- , _size (s)
-{
- _data = new uint8_t*[4];
- _line_size = new int[4];
-
- for (int i = 0; i < 4; ++i) {
- _data[i] = (uint8_t *) av_malloc (s.width * s.height);
- _line_size[i] = s.width;
- }
-}
-
-PostProcessImage::~PostProcessImage ()
-{
- for (int i = 0; i < 4; ++i) {
- av_free (_data[i]);
- }
-
- delete[] _data;
- delete[] _line_size;
-}
-
-uint8_t **
-PostProcessImage::data () const
-{
- return _data;
-}
-
-int *
-PostProcessImage::line_size () const
-{
- return _line_size;
-}
-
-Size
-PostProcessImage::size () const
-{
- return _size;
-}
diff --git a/src/lib/image.h b/src/lib/image.h
index d10bcae9e..e06a82b7f 100644
--- a/src/lib/image.h
+++ b/src/lib/image.h
@@ -34,7 +34,7 @@ extern "C" {
class Scaler;
class RGBFrameImage;
-class PostProcessImage;
+class SimpleImage;
/** @class Image
* @brief Parent class for wrappers of some image, in some format, that
@@ -67,7 +67,7 @@ public:
int lines (int) const;
boost::shared_ptr<RGBFrameImage> scale_and_convert_to_rgb (Size, int, Scaler const *) const;
boost::shared_ptr<Image> scale (Size, Scaler const *) const;
- boost::shared_ptr<PostProcessImage> post_process (std::string) const;
+ boost::shared_ptr<SimpleImage> post_process (std::string) const;
void make_black ();
@@ -137,23 +137,4 @@ private:
uint8_t* _data;
};
-/** @class PostProcessImage
- * @brief An image that is the result of an FFmpeg post-processing run.
- */
-class PostProcessImage : public Image
-{
-public:
- PostProcessImage (PixelFormat, Size);
- ~PostProcessImage ();
-
- uint8_t ** data () const;
- int * line_size () const;
- Size size () const;
-
-private:
- Size _size;
- uint8_t** _data;
- int* _line_size;
-};
-
#endif