Remove believed-unnecessary PostProcessImage.
authorCarl Hetherington <cth@carlh.net>
Sun, 14 Oct 2012 12:15:36 +0000 (13:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Oct 2012 12:15:36 +0000 (13:15 +0100)
src/lib/image.cc
src/lib/image.h

index 8fd43093d36a9b707a76eb97898a0e35ef9a1d07..98c5228a992fc5ac1112912a7c7540fa60e0fd9e 100644 (file)
@@ -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;
-}
index d10bcae9efcaf83412ec6795c1d0c90706f50013..e06a82b7f5fb647959a54791e023d5567a4e8b1a 100644 (file)
@@ -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