From e9e8db92b578ff44428fff1126ebf3be4d3da6c4 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sun, 4 Feb 2018 04:07:17 +0000 Subject: [PATCH] Remove PlaYUVerPixel.* files Merge PlaYUVerPixel class into PlaYUVerFrame.h as frame and pixels are always related. This simplifies the lib files that are installed --- app/VideoSubWindow.cpp | 2 + lib/CMakeLists.txt | 2 - lib/PlaYUVerFrame.cpp | 174 +++++++++++++++++++++++++++++++ lib/PlaYUVerFrame.h | 74 ++++++++++++- lib/PlaYUVerFramePixelFormats.h | 1 - lib/PlaYUVerLib.h | 4 +- lib/PlaYUVerOptions.cpp | 1 + lib/PlaYUVerPixel.cpp | 160 ---------------------------- lib/PlaYUVerPixel.h | 117 --------------------- lib/PlaYUVerStream.cpp | 3 +- lib/PlaYUVerStream.h | 3 +- tools/PlaYUVerTools.cpp | 3 +- tools/PlaYUVerTools.h | 19 ++++ tools/PlaYUVerToolsCmdParser.cpp | 7 +- 14 files changed, 275 insertions(+), 295 deletions(-) delete mode 100644 lib/PlaYUVerPixel.cpp delete mode 100644 lib/PlaYUVerPixel.h diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index 0553271..2440860 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -30,6 +30,8 @@ #include "QtConcurrent/qtconcurrentrun.h" #include "SubWindowAbstract.h" +#include + /** * \brief Functions to control data stream from stream information */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e67bbc5..b2fc104 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -10,7 +10,6 @@ set(PlaYUVer_Lib_SRCS LibMemory.h PlaYUVerLib.h # Frame - PlaYUVerPixel.cpp PlaYUVerFrame.cpp PlaYUVerFramePixelFormats.cpp # Stream @@ -34,7 +33,6 @@ ENDIF() set(PlaYUVer_Lib_HEADERS PlaYUVerDefs.h - PlaYUVerPixel.h PlaYUVerFrame.h PlaYUVerStream.h PlaYUVerOptions.h diff --git a/lib/PlaYUVerFrame.cpp b/lib/PlaYUVerFrame.cpp index aa36688..c0f704d 100644 --- a/lib/PlaYUVerFrame.cpp +++ b/lib/PlaYUVerFrame.cpp @@ -33,6 +33,8 @@ #include #endif +#define MAX_NUMBER_COMPONENTS 4 + /*! \brief Supported formats * * List of supported pixels formats @@ -77,6 +79,178 @@ Int PlaYUVerFrame::findPixelFormat( const String& name ) return -1; } +static inline Void YuvToRgb( const Int& iY, const Int& iU, const Int& iV, Int& iR, Int& iG, Int& iB ) +{ + iR = iY + ( ( 1436 * ( iV - 128 ) ) >> 10 ); + iG = iY - ( ( 352 * ( iU - 128 ) + 731 * ( iV - 128 ) ) >> 10 ); + iB = iY + ( ( 1812 * ( iU - 128 ) ) >> 10 ); + iR = iR < 0 ? 0 : iR > 255 ? 255 : iR; + iG = iG < 0 ? 0 : iG > 255 ? 255 : iG; + iB = iB < 0 ? 0 : iB > 255 ? 255 : iB; +} + +static inline Void rgbToYuv( const Int& iR, const Int& iG, const Int& iB, Int& iY, Int& iU, Int& iV ) +{ + iY = ( 299 * iR + 587 * iG + 114 * iB + 500 ) / 1000; + iU = ( 1000 * ( iB - iY ) + 226816 ) / 1772; + iV = ( 1000 * ( iR - iY ) + 179456 ) / 1402; +} + +struct PlaYUVerPixelPrivate +{ + Int iColorSpace; + Pel PixelComponents[MAX_NUMBER_COMPONENTS]; +}; + +Int PlaYUVerPixel::getMaxNumberOfComponents() +{ + return MAX_NUMBER_COMPONENTS; +} + +PlaYUVerPixel::PlaYUVerPixel() + : d( new PlaYUVerPixelPrivate ) +{ + d->iColorSpace = COLOR_INVALID; + d->PixelComponents[0] = 0; + d->PixelComponents[1] = 0; + d->PixelComponents[2] = 0; + d->PixelComponents[3] = 0; +} + +PlaYUVerPixel::PlaYUVerPixel( const Int& ColorSpace ) +{ + d->iColorSpace = ColorSpace == COLOR_GRAY ? COLOR_YUV : ColorSpace; + d->PixelComponents[0] = 0; + d->PixelComponents[1] = 0; + d->PixelComponents[2] = 0; + d->PixelComponents[3] = 0; +} + +PlaYUVerPixel::PlaYUVerPixel( const Int& ColorSpace, const Pel& c0, const Pel& c1, const Pel& c2 ) +{ + d->iColorSpace = ColorSpace == COLOR_GRAY ? COLOR_YUV : ColorSpace; + d->PixelComponents[0] = c0; + d->PixelComponents[1] = c1; + d->PixelComponents[2] = c2; + d->PixelComponents[3] = 0; +} + +PlaYUVerPixel::PlaYUVerPixel( const Int& ColorSpace, const Pel& c0, const Pel& c1, const Pel& c2, const Pel& c3 ) +{ + d->iColorSpace = ColorSpace == COLOR_GRAY ? COLOR_YUV : ColorSpace; + d->PixelComponents[0] = c0; + d->PixelComponents[1] = c1; + d->PixelComponents[2] = c2; + d->PixelComponents[3] = c3; +} + +PlaYUVerPixel::~PlaYUVerPixel() {} + +Int PlaYUVerPixel::ColorSpaceType() +{ + return d->iColorSpace; +} + +Pel* PlaYUVerPixel::Components() +{ + return d->PixelComponents; +} + +Pel PlaYUVerPixel::Y() const +{ + return d->PixelComponents[0]; +} +Pel PlaYUVerPixel::Cb() const +{ + return d->PixelComponents[1]; +} +Pel PlaYUVerPixel::Cr() const +{ + return d->PixelComponents[2]; +} + +Pel& PlaYUVerPixel::Y() +{ + return d->PixelComponents[0]; +} +Pel& PlaYUVerPixel::Cb() +{ + return d->PixelComponents[1]; +} +Pel& PlaYUVerPixel::Cr() +{ + return d->PixelComponents[2]; +} +Pel& PlaYUVerPixel::R() +{ + return d->PixelComponents[0]; +} +Pel& PlaYUVerPixel::G() +{ + return d->PixelComponents[1]; +} +Pel& PlaYUVerPixel::B() +{ + return d->PixelComponents[2]; +} + +Pel PlaYUVerPixel::operator[]( const Int& channel ) const +{ + return d->PixelComponents[channel]; +} +Pel& PlaYUVerPixel::operator[]( const Int& channel ) +{ + return d->PixelComponents[channel]; +} + +PlaYUVerPixel PlaYUVerPixel::operator+( const PlaYUVerPixel& in ) +{ + PlaYUVerPixel result; + for( Int i = 0; i < MAX_NUMBER_COMPONENTS; i++ ) + { + result[i] = d->PixelComponents[i] + in[i]; + } + PlaYUVerPixel out( d->iColorSpace, Y() + in.Y(), Cb() + in.Cb(), Cr() + in.Cr() ); + return out; +} + +PlaYUVerPixel PlaYUVerPixel::operator-( const PlaYUVerPixel& in ) +{ + PlaYUVerPixel out( d->iColorSpace, Y() - in.Y(), Cb() - in.Cb(), Cr() - in.Cr() ); + return out; +} + +PlaYUVerPixel PlaYUVerPixel::operator*( const Double& op ) +{ + PlaYUVerPixel out( d->iColorSpace, Y() * op, Cb() * op, Cr() * op ); + return out; +} + +PlaYUVerPixel PlaYUVerPixel::ConvertPixel( ColorSpace eOutputSpace ) +{ + Int outA, outB, outC; + PlaYUVerPixel outPixel( COLOR_INVALID, 0, 0, 0 ); + + if( ColorSpace() == eOutputSpace || eOutputSpace == COLOR_ARGB || eOutputSpace == COLOR_GRAY ) + return *this; + + if( eOutputSpace == COLOR_RGB ) + { + YuvToRgb( Y(), Cb(), Cr(), outA, outB, outC ); + outPixel.R() = outA; + outPixel.G() = outB; + outPixel.B() = outC; + } + if( eOutputSpace == COLOR_YUV ) + { + rgbToYuv( R(), G(), B(), outA, outB, outC ); + outPixel.Y() = outA; + outPixel.Cb() = outB; + outPixel.Cr() = outC; + } + return outPixel; +} + static Int getImgMemory( Pel**** array3D, Int dim1, Int dim2, Int log2ChromaHeight, Int log2ChromaWidth ) { Int dim0 = 3; diff --git a/lib/PlaYUVerFrame.h b/lib/PlaYUVerFrame.h index 79aae46..842122b 100644 --- a/lib/PlaYUVerFrame.h +++ b/lib/PlaYUVerFrame.h @@ -19,6 +19,7 @@ /** * \file PlaYUVerFrame.h + * \ingroup PlaYUVerLibFrame * \brief Video Frame handling */ @@ -26,7 +27,6 @@ #define __PLAYUVERFRAME_H__ #include "PlaYUVerDefs.h" -#include "PlaYUVerPixel.h" namespace cv { @@ -38,9 +38,75 @@ struct PlaYUVerFramePrivate; #define CHROMASHIFT( SIZE, SHIFT ) UInt( -( ( -( Int( SIZE ) ) ) >> ( SHIFT ) ) ) +/** + * \class PlaYUVerPixel + * \ingroup PlaYUVerLibFrame + * \brief Pixel handling class + */ +class PlaYUVerPixel +{ +public: + /** ColorSpace list + * List of supported color spaces + */ + enum ColorSpace + { + COLOR_INVALID = -1, //!< Invalid + COLOR_YUV = 0, //!< YUV + COLOR_RGB = 1, //!< RGB + COLOR_GRAY = 2, //!< Grayscale + COLOR_ARGB = 3, //!< RGB + Alpha + COLOR_MAX = 255, //!< Accouunt for future formats + }; + + static Int getMaxNumberOfComponents(); + + PlaYUVerPixel(); + PlaYUVerPixel( const Int& ColorSpace ); + PlaYUVerPixel( const Int& ColorSpace, const Pel& c0, const Pel& c1, const Pel& c2 ); + PlaYUVerPixel( const Int& ColorSpace, const Pel& c0, const Pel& c1, const Pel& c2, const Pel& c3 ); + ~PlaYUVerPixel(); + + Int ColorSpaceType(); + + Pel* Components(); + + Pel Y() const; + Pel Cb() const; + Pel Cr() const; + Pel R() const; + Pel G() const; + Pel B() const; + + Pel& Y(); + Pel& Cb(); + Pel& Cr(); + Pel& R(); + Pel& G(); + Pel& B(); + + Pel operator[]( const Int& channel ) const; + Pel& operator[]( const Int& channel ); + + PlaYUVerPixel operator+( const PlaYUVerPixel& ); + PlaYUVerPixel operator-( const PlaYUVerPixel& ); + PlaYUVerPixel operator*( const Double& ); + + /** + * Convert a Pixel to a new color space + * @param inputPixel input pixel (PlaYUVerPixel) + * @param eOutputSpace output color space + * @return converted pixel + */ + PlaYUVerPixel ConvertPixel( ColorSpace eOutputSpace ); + +private: + struct PlaYUVerPixelPrivate* d; +}; + /** * \class PlaYUVerFrame - * \ingroup PlaYUVerLib PlaYUVerLib_Frame + * \ingroup PlaYUVerLibFrame * \brief Frame handling class */ class PlaYUVerFrame @@ -253,8 +319,8 @@ public: Bool fromMat( cv::Mat& cvMat ); /** - * \ingroup PlaYUVerLib_Frame - * @defgroup PlaYUVerLib_Frame_QualityMetrics Quality Metrics Interface + * \ingroup PlaYUVerLibFrame + * @defgroup PlaYUVerLibFrameQualityMetrics Quality Metrics Interface * @{ * Quality metrics interface * diff --git a/lib/PlaYUVerFramePixelFormats.h b/lib/PlaYUVerFramePixelFormats.h index 2ec74a0..f3c62c8 100644 --- a/lib/PlaYUVerFramePixelFormats.h +++ b/lib/PlaYUVerFramePixelFormats.h @@ -27,7 +27,6 @@ #include "PlaYUVerDefs.h" #include "PlaYUVerFrame.h" -#include "PlaYUVerPixel.h" #include diff --git a/lib/PlaYUVerLib.h b/lib/PlaYUVerLib.h index a9f0fa2..8a0fba6 100644 --- a/lib/PlaYUVerLib.h +++ b/lib/PlaYUVerLib.h @@ -39,12 +39,12 @@ * This guaratees that the top-level applications does not need to worry * about dealig with different stream formats as well as different pixel formats * - * @defgroup PlaYUVerLib_Frame PlaYUVer Frame + * @defgroup PlaYUVerLibFrame PlaYUVer Frame * @{ * Describe PlaYUVerFrame * @} * - * @defgroup PlaYUVerLib_Stream PlaYUVer Stream + * @defgroup PlaYUVerLibStream PlaYUVer Stream * @{ * Describe PlaYUVerStream * @} diff --git a/lib/PlaYUVerOptions.cpp b/lib/PlaYUVerOptions.cpp index 069784d..22f1d3d 100644 --- a/lib/PlaYUVerOptions.cpp +++ b/lib/PlaYUVerOptions.cpp @@ -42,6 +42,7 @@ #include "lib/PlaYUVerModuleIf.h" #include +#include #include using namespace std; diff --git a/lib/PlaYUVerPixel.cpp b/lib/PlaYUVerPixel.cpp deleted file mode 100644 index a544565..0000000 --- a/lib/PlaYUVerPixel.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* This file is a part of PlaYUVer project - * Copyright (C) 2014-2018 by Joao Carreira (jfmcarreira@gmail.com) - * Luis Lucas (luisfrlucas@gmail.com) - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -/** - * \file PlaYUVerPixel.cpp - * \brief Pixel handling - */ - -#include "PlaYUVerPixel.h" - -#include "PlaYUVerFrame.h" - -#include -#include - -PlaYUVerPixel::PlaYUVerPixel() - : m_iColorSpace( COLOR_INVALID ) -{ - m_iColorSpace = COLOR_INVALID; - PixelComponents[0] = 0; - PixelComponents[1] = 0; - PixelComponents[2] = 0; - PixelComponents[3] = 0; -} - -PlaYUVerPixel::PlaYUVerPixel( const Int& ColorSpace ) -{ - m_iColorSpace = ColorSpace == COLOR_GRAY ? COLOR_YUV : ColorSpace; - PixelComponents[0] = 0; - PixelComponents[1] = 0; - PixelComponents[2] = 0; - PixelComponents[3] = 0; -} - -PlaYUVerPixel::PlaYUVerPixel( const Int& ColorSpace, const Pel& c0, const Pel& c1, const Pel& c2 ) -{ - m_iColorSpace = ColorSpace == COLOR_GRAY ? COLOR_YUV : ColorSpace; - PixelComponents[0] = c0; - PixelComponents[1] = c1; - PixelComponents[2] = c2; - PixelComponents[3] = 0; -} - -PlaYUVerPixel::~PlaYUVerPixel() {} - -Int PlaYUVerPixel::ColorSpaceType() -{ - return m_iColorSpace; -} - -Pel* PlaYUVerPixel::Components() -{ - return PixelComponents; -} - -Pel PlaYUVerPixel::Y() const -{ - return PixelComponents[0]; -} -Pel PlaYUVerPixel::Cb() const -{ - return PixelComponents[1]; -} -Pel PlaYUVerPixel::Cr() const -{ - return PixelComponents[2]; -} - -Pel& PlaYUVerPixel::Y() -{ - return PixelComponents[0]; -} -Pel& PlaYUVerPixel::Cb() -{ - return PixelComponents[1]; -} -Pel& PlaYUVerPixel::Cr() -{ - return PixelComponents[2]; -} -Pel& PlaYUVerPixel::R() -{ - return PixelComponents[0]; -} -Pel& PlaYUVerPixel::G() -{ - return PixelComponents[1]; -} -Pel& PlaYUVerPixel::B() -{ - return PixelComponents[2]; -} - -Pel PlaYUVerPixel::operator[]( const Int& channel ) const -{ - return PixelComponents[channel]; -} -Pel& PlaYUVerPixel::operator[]( const Int& channel ) -{ - return PixelComponents[channel]; -} - -PlaYUVerPixel PlaYUVerPixel::operator+( const PlaYUVerPixel& in ) -{ - PlaYUVerPixel out( m_iColorSpace, Y() + in.Y(), Cb() + in.Cb(), Cr() + in.Cr() ); - return out; -} - -PlaYUVerPixel PlaYUVerPixel::operator-( const PlaYUVerPixel& in ) -{ - PlaYUVerPixel out( m_iColorSpace, Y() - in.Y(), Cb() - in.Cb(), Cr() - in.Cr() ); - return out; -} - -PlaYUVerPixel PlaYUVerPixel::operator*( const Double& op ) -{ - PlaYUVerPixel out( m_iColorSpace, Y() * op, Cb() * op, Cr() * op ); - return out; -} - -PlaYUVerPixel PlaYUVerPixel::ConvertPixel( ColorSpace eOutputSpace ) -{ - Int outA, outB, outC; - PlaYUVerPixel outPixel( COLOR_INVALID, 0, 0, 0 ); - - if( ColorSpace() == eOutputSpace || eOutputSpace == COLOR_ARGB || eOutputSpace == COLOR_GRAY ) - return *this; - - if( eOutputSpace == COLOR_RGB ) - { - YuvToRgb( Y(), Cb(), Cr(), outA, outB, outC ); - outPixel.R() = outA; - outPixel.G() = outB; - outPixel.B() = outC; - } - if( eOutputSpace == COLOR_YUV ) - { - rgbToYuv( R(), G(), B(), outA, outB, outC ); - outPixel.Y() = outA; - outPixel.Cb() = outB; - outPixel.Cr() = outC; - } - return outPixel; -} diff --git a/lib/PlaYUVerPixel.h b/lib/PlaYUVerPixel.h deleted file mode 100644 index a598b11..0000000 --- a/lib/PlaYUVerPixel.h +++ /dev/null @@ -1,117 +0,0 @@ -/* This file is a part of PlaYUVer project - * Copyright (C) 2014-2018 by Joao Carreira (jfmcarreira@gmail.com) - * Luis Lucas (luisfrlucas@gmail.com) - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -/** - * \file PlaYUVerPixel.h - * \brief Pixel handling - */ - -#ifndef __PLAYUVERPIXEL_H__ -#define __PLAYUVERPIXEL_H__ - -#include -#include -#include -#include -#include "PlaYUVerDefs.h" - -static inline Void YuvToRgb( const Int& iY, const Int& iU, const Int& iV, Int& iR, Int& iG, Int& iB ) -{ - iR = iY + ( ( 1436 * ( iV - 128 ) ) >> 10 ); - iG = iY - ( ( 352 * ( iU - 128 ) + 731 * ( iV - 128 ) ) >> 10 ); - iB = iY + ( ( 1812 * ( iU - 128 ) ) >> 10 ); - iR = iR < 0 ? 0 : iR > 255 ? 255 : iR; - iG = iG < 0 ? 0 : iG > 255 ? 255 : iG; - iB = iB < 0 ? 0 : iB > 255 ? 255 : iB; -} - -static inline Void rgbToYuv( const Int& iR, const Int& iG, const Int& iB, Int& iY, Int& iU, Int& iV ) -{ - iY = ( 299 * iR + 587 * iG + 114 * iB + 500 ) / 1000; - iU = ( 1000 * ( iB - iY ) + 226816 ) / 1772; - iV = ( 1000 * ( iR - iY ) + 179456 ) / 1402; -} - -/** - * \class PlaYUVerPixel - * \ingroup PlaYUVerLib PlaYUVerLib_Frame - * \brief Pixel handling class - */ -class PlaYUVerPixel -{ -public: - static const UInt MAX_NUMBER_COMPONENTS = 5; - - /** ColorSpace list - * List of supported color spaces - */ - enum ColorSpace - { - COLOR_INVALID = -1, //!< Invalid - COLOR_YUV = 0, //!< YUV - COLOR_RGB = 1, //!< RGB - COLOR_GRAY = 2, //!< Grayscale - COLOR_ARGB = 3, //!< RGB + Alpha - COLOR_MAX = 255, //!< Accouunt for future formats - }; - - PlaYUVerPixel(); - PlaYUVerPixel( const Int& ColorSpace ); - PlaYUVerPixel( const Int& ColorSpace, const Pel& c0, const Pel& c1, const Pel& c2 ); - ~PlaYUVerPixel(); - - Int ColorSpaceType(); - - Pel* Components(); - - Pel Y() const; - Pel Cb() const; - Pel Cr() const; - Pel R() const; - Pel G() const; - Pel B() const; - - Pel& Y(); - Pel& Cb(); - Pel& Cr(); - Pel& R(); - Pel& G(); - Pel& B(); - - Pel operator[]( const Int& channel ) const; - Pel& operator[]( const Int& channel ); - - PlaYUVerPixel operator+( const PlaYUVerPixel& ); - PlaYUVerPixel operator-( const PlaYUVerPixel& ); - PlaYUVerPixel operator*( const Double& ); - - /** - * Convert a Pixel to a new color space - * @param inputPixel input pixel (PlaYUVerPixel) - * @param eOutputSpace output color space - * @return converted pixel - */ - PlaYUVerPixel ConvertPixel( ColorSpace eOutputSpace ); - -private: - Int m_iColorSpace; - Pel PixelComponents[MAX_NUMBER_COMPONENTS]; -}; - -#endif // __PLAYUVERPIXEL_H__ diff --git a/lib/PlaYUVerStream.cpp b/lib/PlaYUVerStream.cpp index 1d9747c..dbaa07d 100644 --- a/lib/PlaYUVerStream.cpp +++ b/lib/PlaYUVerStream.cpp @@ -86,9 +86,8 @@ private: inline Int prevIndex() { return m_uiIndex - 1 < 0 ? m_apcFrameBuffer.size() - 1 : m_uiIndex - 1; } }; -class PlaYUVerStreamPrivate +struct PlaYUVerStreamPrivate { -public: Bool isInit; Bool isInput; diff --git a/lib/PlaYUVerStream.h b/lib/PlaYUVerStream.h index 662a181..05e125f 100644 --- a/lib/PlaYUVerStream.h +++ b/lib/PlaYUVerStream.h @@ -28,7 +28,6 @@ #include "PlaYUVerDefs.h" class PlaYUVerFrame; -class PlaYUVerStreamPrivate; class PlaYUVerStreamHandlerIf; typedef PlaYUVerStreamHandlerIf* ( *CreateStreamHandlerFn )( void ); @@ -122,7 +121,7 @@ private: Bool readFrame( PlaYUVerFrame* frame ); private: - PlaYUVerStreamPrivate* d; + struct PlaYUVerStreamPrivate* d; }; #endif // __PLAYUVERSTREAM_H__ diff --git a/tools/PlaYUVerTools.cpp b/tools/PlaYUVerTools.cpp index 3417290..47f2477 100644 --- a/tools/PlaYUVerTools.cpp +++ b/tools/PlaYUVerTools.cpp @@ -30,7 +30,6 @@ #include "lib/PlaYUVerFrame.h" #include "lib/PlaYUVerModuleIf.h" -#include "lib/PlaYUVerPixel.h" #include "lib/PlaYUVerStream.h" #include "modules/PlaYUVerModuleFactory.h" @@ -425,7 +424,7 @@ Int PlaYUVerTools::QualityOperation() const char* pchQualityMetricName = PlaYUVerFrame::supportedQualityMetricsList()[m_uiQualityMetric].c_str(); PlaYUVerFrame* apcCurrFrame[MAX_NUMBER_INPUTS]; Bool abEOF[MAX_NUMBER_INPUTS]; - Double adAverageQuality[MAX_NUMBER_INPUTS - 1][PlaYUVerPixel::MAX_NUMBER_COMPONENTS]; + Double adAverageQuality[MAX_NUMBER_INPUTS - 1][PlaYUVerPixel::getMaxNumberOfComponents()]; Double dQuality; String metric_fmt = " "; diff --git a/tools/PlaYUVerTools.h b/tools/PlaYUVerTools.h index 4a460b2..70d9d3d 100644 --- a/tools/PlaYUVerTools.h +++ b/tools/PlaYUVerTools.h @@ -20,11 +20,30 @@ /** * \file PlaYUVerTools.h * \brief Main definition of the PlaYUVerTools app + * + * @defgroup PlaYUVerTools PlaYUVer Tools + * @{ + * + * PlaYUVerTools is a command line interface + * for the modules and quality metrics + * included in PlaYUVer + * + * @} */ #ifndef __PLAYUVERTOOLS_H__ #define __PLAYUVERTOOLS_H__ +/** + * @defgroup PlaYUVerTools PlaYUVer Tools + * @{ + * PlaYUVerTools is a command line interface + * for the modules and quality metrics + * included in PlaYUVer + * @} + * + */ + #include "lib/PlaYUVerDefs.h" #include "lib/PlaYUVerFrame.h" diff --git a/tools/PlaYUVerToolsCmdParser.cpp b/tools/PlaYUVerToolsCmdParser.cpp index 17d482d..60e874a 100644 --- a/tools/PlaYUVerToolsCmdParser.cpp +++ b/tools/PlaYUVerToolsCmdParser.cpp @@ -24,14 +24,15 @@ #include "PlaYUVerToolsCmdParser.h" -#include -#include - #include "lib/PlaYUVerFrame.h" #include "lib/PlaYUVerModuleIf.h" #include "lib/PlaYUVerStream.h" #include "modules/PlaYUVerModuleFactory.h" +#include +#include +#include + PlaYUVerToolsCmdParser::PlaYUVerToolsCmdParser() { m_uiLogLevel = 0;