当前位置: 首页>>代码示例>>C++>>正文


C++ dng_stream::Get_real32方法代码示例

本文整理汇总了C++中dng_stream::Get_real32方法的典型用法代码示例。如果您正苦于以下问题:C++ dng_stream::Get_real32方法的具体用法?C++ dng_stream::Get_real32怎么用?C++ dng_stream::Get_real32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dng_stream的用法示例。


在下文中一共展示了dng_stream::Get_real32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ReadHueSatMap

void dng_camera_profile::ReadHueSatMap (dng_stream &stream,
										dng_hue_sat_map &hueSatMap,
										uint32 hues,
										uint32 sats,
										uint32 vals,
										bool skipSat0)
	{

	hueSatMap.SetDivisions (hues, sats, vals);

	for (uint32 val = 0; val < vals; val++)
		{

		for (uint32 hue = 0; hue < hues; hue++)
			{

			for (uint32 sat = skipSat0 ? 1 : 0; sat < sats; sat++)
				{

				dng_hue_sat_map::HSBModify modify;

				modify.fHueShift = stream.Get_real32 ();
				modify.fSatScale = stream.Get_real32 ();
				modify.fValScale = stream.Get_real32 ();

				hueSatMap.SetDelta (hue, sat, val, modify);
				
				}
				
			}
			
		}
	
	}
开发者ID:F0x06,项目名称:Movie2DNG,代码行数:34,代码来源:dng_camera_profile.cpp

示例2: Parse


//.........这里部分代码省略.........
		if (profileInfo.fReductionMatrix2.NotEmpty ())
			{
			
			SetReductionMatrix2 (profileInfo.fReductionMatrix2);
			
			}
		
		}

	SetProfileCalibrationSignature (profileInfo.fProfileCalibrationSignature.Get ());

	if (profileInfo.fHueSatDeltas1Offset != 0 &&
		profileInfo.fHueSatDeltas1Count  != 0)
		{

		TempBigEndian setEndianness (stream, profileInfo.fBigEndian);

		stream.SetReadPosition (profileInfo.fHueSatDeltas1Offset);
		
		bool skipSat0 = (profileInfo.fHueSatDeltas1Count == profileInfo.fProfileHues *
														   (profileInfo.fProfileSats - 1) *
														    profileInfo.fProfileVals * 3);

		ReadHueSatMap (stream,
					   fHueSatDeltas1,
					   profileInfo.fProfileHues,
					   profileInfo.fProfileSats,
					   profileInfo.fProfileVals,
					   skipSat0);

		}

	if (profileInfo.fHueSatDeltas2Offset != 0 &&
		profileInfo.fHueSatDeltas2Count  != 0)
		{

		TempBigEndian setEndianness (stream, profileInfo.fBigEndian);

		stream.SetReadPosition (profileInfo.fHueSatDeltas2Offset);

		bool skipSat0 = (profileInfo.fHueSatDeltas2Count == profileInfo.fProfileHues *
														   (profileInfo.fProfileSats - 1) *
														    profileInfo.fProfileVals * 3);

		ReadHueSatMap (stream,
					   fHueSatDeltas2,
					   profileInfo.fProfileHues,
					   profileInfo.fProfileSats,
					   profileInfo.fProfileVals,
					   skipSat0);

		}

	if (profileInfo.fLookTableOffset != 0 &&
		profileInfo.fLookTableCount  != 0)
		{

		TempBigEndian setEndianness (stream, profileInfo.fBigEndian);

		stream.SetReadPosition (profileInfo.fLookTableOffset);

		bool skipSat0 = (profileInfo.fLookTableCount == profileInfo.fLookTableHues *
													   (profileInfo.fLookTableSats - 1) *
														profileInfo.fLookTableVals * 3);

		ReadHueSatMap (stream,
					   fLookTable,
					   profileInfo.fLookTableHues,
					   profileInfo.fLookTableSats,
					   profileInfo.fLookTableVals,
					   skipSat0);

		}

	if ((profileInfo.fToneCurveCount & 1) == 0)
		{

		TempBigEndian setEndianness (stream, profileInfo.fBigEndian);

		stream.SetReadPosition (profileInfo.fToneCurveOffset);

		uint32 points = profileInfo.fToneCurveCount / 2;

		fToneCurve.fCoord.resize (points);

		for (size_t i = 0; i < points; i++)
			{

			dng_point_real64 point;

			point.h = stream.Get_real32 ();
			point.v = stream.Get_real32 ();

			fToneCurve.fCoord [i] = point;

			}
			
		}
		
	}
开发者ID:F0x06,项目名称:Movie2DNG,代码行数:101,代码来源:dng_camera_profile.cpp

示例3: sizeof

dng_opcode_DeltaPerRow::dng_opcode_DeltaPerRow (dng_host &host,
												dng_stream &stream)

	:	dng_inplace_opcode (dngOpcode_DeltaPerRow,
							stream,
							"DeltaPerRow")

	,	fAreaSpec ()
	,	fTable    ()
	,	fScale    (1.0f)

	{

	uint32 dataSize = stream.Get_uint32 ();

	fAreaSpec.GetData (stream);

	uint32 deltas = (fAreaSpec.Area ().H () +
					 fAreaSpec.RowPitch () - 1) /
					 fAreaSpec.RowPitch ();

	if (deltas != stream.Get_uint32 ())
		{
		ThrowBadFormat ();
		}

	if (dataSize != dng_area_spec::kDataSize + 4 + deltas * 4)
		{
		ThrowBadFormat ();
		}

	fTable.Reset (host.Allocate (deltas * sizeof (real32)));

	real32 *table = fTable->Buffer_real32 ();

	for (uint32 j = 0; j < deltas; j++)
		{
		table [j] = stream.Get_real32 ();
		}

	#if qDNGValidate

	if (gVerbose)
		{

		printf ("Count: %u\n", (unsigned) deltas);

		for (uint32 k = 0; k < deltas && k < gDumpLineLimit; k++)
			{
			printf ("    Delta [%u] = %f\n", k, table [k]);
			}

		if (deltas > gDumpLineLimit)
			{
			printf ("    ... %u deltas skipped\n", deltas - gDumpLineLimit);
			}

		}

	#endif

	}
开发者ID:KDE,项目名称:digikam,代码行数:62,代码来源:dng_misc_opcodes.cpp


注:本文中的dng_stream::Get_real32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。