Blame lib/xtranspattern.cpp

rpm-build d2b433
/*
rpm-build d2b433
 * libopenraw - xtranspattern.cpp
rpm-build d2b433
 *
rpm-build d2b433
 * Copyright (C) 2015 Hubert Figuière
rpm-build d2b433
 *
rpm-build d2b433
 * This library is free software: you can redistribute it and/or
rpm-build d2b433
 * modify it under the terms of the GNU Lesser General Public License
rpm-build d2b433
 * as published by the Free Software Foundation, either version 3 of
rpm-build d2b433
 * the License, or (at your option) any later version.
rpm-build d2b433
 *
rpm-build d2b433
 * This library is distributed in the hope that it will be useful,
rpm-build d2b433
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build d2b433
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build d2b433
 * Lesser General Public License for more details.
rpm-build d2b433
 *
rpm-build d2b433
 * You should have received a copy of the GNU Lesser General Public
rpm-build d2b433
 * License along with this library.  If not, see
rpm-build d2b433
 * <http://www.gnu.org/licenses/>.
rpm-build d2b433
 */
rpm-build d2b433
rpm-build d2b433
#include <stdint.h>
rpm-build d2b433
rpm-build d2b433
#include <libopenraw/consts.h>
rpm-build d2b433
rpm-build d2b433
#include "cfapattern.hpp"
rpm-build d2b433
#include "xtranspattern.hpp"
rpm-build d2b433
rpm-build d2b433
namespace OpenRaw {
rpm-build d2b433
namespace Internals {
rpm-build d2b433
rpm-build d2b433
/** alias the colors. */
rpm-build d2b433
static const uint8_t RED = OR_PATTERN_COLOUR_RED;
rpm-build d2b433
static const uint8_t GREEN = OR_PATTERN_COLOUR_GREEN;
rpm-build d2b433
static const uint8_t BLUE = OR_PATTERN_COLOUR_BLUE;
rpm-build d2b433
rpm-build d2b433
/** X-Trans CMOS pattern guess from marketing brochure:
rpm-build d2b433
 * http://www.fujifilm.com/products/digital_cameras/x/fujifilm_x_pro1/features/
rpm-build d2b433
 */
rpm-build d2b433
static const uint8_t XTRANS_PATTERN[] = { 
rpm-build d2b433
  GREEN, BLUE,  GREEN, GREEN, RED,   GREEN,
rpm-build d2b433
  RED,   GREEN, RED,   BLUE,  GREEN, BLUE,
rpm-build d2b433
  GREEN, BLUE,  GREEN, GREEN, RED,   GREEN,
rpm-build d2b433
  GREEN, RED,   GREEN, GREEN, BLUE,  GREEN,
rpm-build d2b433
  BLUE,  GREEN, BLUE,  RED,   GREEN, RED,
rpm-build d2b433
  GREEN, RED,   GREEN, GREEN, BLUE,  GREEN
rpm-build d2b433
};
rpm-build d2b433
rpm-build d2b433
XTransPattern::XTransPattern()
rpm-build d2b433
  : CfaPattern(OR_CFA_PATTERN_NON_RGB22, 6, 6)
rpm-build d2b433
{
rpm-build d2b433
  setPatternPattern(XTRANS_PATTERN, 36);
rpm-build d2b433
}
rpm-build d2b433
rpm-build d2b433
const XTransPattern*
rpm-build d2b433
XTransPattern::xtransPattern()
rpm-build d2b433
{
rpm-build d2b433
  static const XTransPattern* s_pat = new XTransPattern();
rpm-build d2b433
rpm-build d2b433
  return s_pat;
rpm-build d2b433
}
rpm-build d2b433
rpm-build d2b433
}
rpm-build d2b433
}
rpm-build d2b433
rpm-build d2b433
/*
rpm-build d2b433
  Local Variables:
rpm-build d2b433
  mode:c++
rpm-build d2b433
  c-file-style:"stroustrup"
rpm-build d2b433
  c-file-offsets:((innamespace . 0))
rpm-build d2b433
  tab-width:2
rpm-build d2b433
  c-basic-offset:2
rpm-build d2b433
  indent-tabs-mode:nil
rpm-build d2b433
  fill-column:80
rpm-build d2b433
  End:
rpm-build d2b433
*/