filters

kis_tiff_ycbcr_reader.h

00001 /*
00002  *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef _KIS_TIFF_YCBCR_READER_H_
00021 #define _KIS_TIFF_YCBCR_READER_H_
00022 
00023 #include "kis_tiff_reader.h"
00024 
00025 namespace KisTIFFYCbCr {
00026     enum Position {
00027         POSITION_CENTERED = 1,
00028         POSITION_COSITED = 2
00029     };
00030 }
00031 
00032 class KisTIFFYCbCrReaderTarget8Bit : public KisTIFFReaderBase {
00033     public:
00038         KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount,  cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position );
00039         ~KisTIFFYCbCrReaderTarget8Bit();
00040         virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream);
00041         virtual void finalize();
00042     private:
00043         Q_UINT8* m_bufferCb;
00044         Q_UINT8* m_bufferCr;
00045         Q_UINT32 m_bufferWidth, m_bufferHeight;
00046         uint16 m_hsub;
00047         uint16 m_vsub;
00048         KisTIFFYCbCr::Position m_position;
00049 
00050 };
00051 
00052 class KisTIFFYCbCrReaderTarget16Bit : public KisTIFFReaderBase {
00053     public:
00058         KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount,  cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position );
00059         ~KisTIFFYCbCrReaderTarget16Bit();
00060         virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream);
00061         virtual void finalize();
00062     private:
00063         Q_UINT16* m_bufferCb;
00064         Q_UINT16* m_bufferCr;
00065         Q_UINT32 m_bufferWidth, m_bufferHeight;
00066         uint16 m_hsub;
00067         uint16 m_vsub;
00068         KisTIFFYCbCr::Position m_position;
00069 
00070 };
00071 
00072 
00073 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys