Remove AegiVideoFrame::GetFloat and some related code as it was only there for fextracker.

Originally committed to SVN as r3727.
This commit is contained in:
Thomas Goyne 2009-10-21 04:07:00 +00:00
parent df5ada1006
commit 7581d41935
5 changed files with 30 additions and 81 deletions

View file

@ -236,39 +236,6 @@ wxImage AegiVideoFrame::GetImage() const {
} }
} }
/// @brief Get float luminosity data
/// @param buffer
///
void AegiVideoFrame::GetFloat(float *buffer) const {
int Bpp = GetBpp();
const unsigned char *src = data[0];
float *dst = buffer;
float temp;
// Convert
if (format == FORMAT_RGB32 || format == FORMAT_RGB24) {
int delta = 4-Bpp;
for (unsigned int y=0;y<h;y++) {
dst = buffer + y*w;
if (flipped) src = data[0] + (h-y-1)*pitch[0]; // I think that it requires flipped data - amz
else src = data[0] + y*pitch[0];
for (unsigned int x=0;x<w;x++) {
//temp = (*src++)*0.3 + (*src++)*0.4 + (*src++)*0.3;
temp = (*src++)*0.3;
temp += (*src++)*0.4;
temp += (*src++)*0.3;
src += delta;
*dst++ = temp;
}
}
}
}
/// @brief Get bytes per pixel for the current frame format /// @brief Get bytes per pixel for the current frame format
/// @param plane /// @param plane
/// @return /// @return

View file

@ -43,30 +43,29 @@
/// DOCME /// DOCME
enum VideoFrameFormat { enum VideoFrameFormat {
/// DOCME /// DOCME
FORMAT_NONE = 0x0000, FORMAT_NONE = 0x0000,
/// DOCME /// RGB, interleaved
FORMAT_RGB24 = 0x0001, // RGB, interleaved FORMAT_RGB24 = 0x0001,
/// DOCME /// RGBA, interleaved
FORMAT_RGB32 = 0x0002, // RGBA, interleaved FORMAT_RGB32 = 0x0002,
/// DOCME /// YCbCr 4:2:2, planar
FORMAT_YUY2 = 0x0004, // YCbCr 4:2:2, planar FORMAT_YUY2 = 0x0004,
/// DOCME /// YCbCr 4:2:0, planar
FORMAT_YV12 = 0x0008, // YCbCr 4:2:0, planar FORMAT_YV12 = 0x0008,
/// DOCME /// YCbCr 4:4:4, planar
FORMAT_YUV444 = 0x0010, // YCbCr 4:4:4, planar FORMAT_YUV444 = 0x0010,
/// DOCME /// YCbCr 4:4:4 plus alpha, planar
FORMAT_YUV444A = 0x0020, // YCbCr 4:4:4 plus alpha, planar FORMAT_YUV444A = 0x0020,
/// DOCME /// Y only (greyscale)
FORMAT_YUVMONO = 0x0040, // Y only (greyscale) FORMAT_YUVMONO = 0x0040,
}; };
@ -85,30 +84,30 @@ private:
public: public:
/// DOCME /// Pointers to the data planes. Interleaved formats only use data[0]
unsigned char *data[4]; // Pointers to the data planes. Interleaved formats only use data[0] unsigned char *data[4];
/// DOCME /// Data format
VideoFrameFormat format; // Data format VideoFrameFormat format;
/// DOCME /// Width in pixels
unsigned int w; // Width in pixels unsigned int w;
/// DOCME /// Height in pixels
unsigned int h; // Height in pixels unsigned int h;
/// DOCME // Pitch, that is, the number of bytes used by each row.
unsigned int pitch[4]; // Pitch, that is, the number of bytes used by each row. unsigned int pitch[4];
/// DOCME /// First row is actually the bottom one
bool flipped; // First row is actually the bottom one bool flipped;
/// DOCME /// Swap Red and Blue channels or U and V planes (controls RGB versus BGR ordering etc)
bool invertChannels; // Swap Red and Blue channels or U and V planes (controls RGB versus BGR ordering etc) bool invertChannels;
/// DOCME /// Allocated with C++'s "new" operator, instead of "malloc"
bool cppAlloc; // Allocated with C++'s "new" operator, instead of "malloc" bool cppAlloc;
AegiVideoFrame(); AegiVideoFrame();
AegiVideoFrame(int width,int height,VideoFrameFormat format=FORMAT_RGB32); AegiVideoFrame(int width,int height,VideoFrameFormat format=FORMAT_RGB32);
@ -119,7 +118,6 @@ public:
void ConvertFrom(const AegiVideoFrame &source); void ConvertFrom(const AegiVideoFrame &source);
wxImage GetImage() const; wxImage GetImage() const;
void GetFloat(float *buffer) const;
int GetBpp(int plane=0) const; int GetBpp(int plane=0) const;
}; };

View file

@ -107,8 +107,6 @@ public:
~AvisynthVideoProvider(); ~AvisynthVideoProvider();
const AegiVideoFrame GetFrame(int n); const AegiVideoFrame GetFrame(int n);
void GetFloatFrame(float* Buffer, int n);
/// @brief // properties /// @brief // properties
/// @return /// @return

View file

@ -88,19 +88,6 @@ const AegiVideoFrame VideoProviderCache::GetFrame(int n) {
return *srcFrame; return *srcFrame;
} }
/// @brief Get as float
/// @param buffer
/// @param n
///
void VideoProviderCache::GetFloatFrame(float* buffer, int n) {
const AegiVideoFrame frame = GetFrame(n);
frame.GetFloat(buffer);
}
/// @brief Set maximum cache size /// @brief Set maximum cache size
/// @param n /// @param n
/// ///

View file

@ -94,7 +94,6 @@ protected:
public: public:
// Base methods // Base methods
void GetFloatFrame(float* Buffer, int n); // Get frame as float
const AegiVideoFrame GetFrame(int n); const AegiVideoFrame GetFrame(int n);
VideoProviderCache(VideoProvider *master); VideoProviderCache(VideoProvider *master);
virtual ~VideoProviderCache(); virtual ~VideoProviderCache();