Exemplo n.º 1
0
JPEGCodec::JPEGCodec(const Header &header, const ChannelList &channels) :
	VideoCodec(header, channels),
	_descriptor(header.frameRate(), header.width(), header.height(), MoxMxf::VideoDescriptor::VideoCodecJPEG)
{
	setWindows(_descriptor, header);
	
	assert(channels.size() == 3);
	
	const Channel *r_channel = channels.findChannel("R");
	
	if(r_channel)
	{
		assert(r_channel->type == UINT8);
	}
	else
		assert(false);
	
	
	MoxMxf::RGBADescriptor::RGBALayout layout;
	
	layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('R', 8));
	layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('G', 8));
	layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('B', 8));
	
	_descriptor.setPixelLayout(layout);
	
	
	_quality = (isLossless(header) ? 100 : getQuality(header));
}
Exemplo n.º 2
0
  //
  // In case the high-pass is supposed to be a lossless process such that
  // we require exact differentials, return true.
  virtual bool isLossless(void) const
  {
#if ACCUSOFT_CODE
    return m_pHighPass->isLossless();
#else
    return false;
#endif
  }