本文整理汇总了C++中dng_pixel_buffer类的典型用法代码示例。如果您正苦于以下问题:C++ dng_pixel_buffer类的具体用法?C++ dng_pixel_buffer怎么用?C++ dng_pixel_buffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了dng_pixel_buffer类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ProcessArea
void dng_opcode_MapTable::ProcessArea (dng_negative & /* negative */,
uint32 /* threadIndex */,
dng_pixel_buffer &buffer,
const dng_rect &dstArea,
const dng_rect & /* imageBounds */)
{
dng_rect overlap = fAreaSpec.Overlap (dstArea);
if (overlap.NotEmpty ())
{
for (uint32 plane = fAreaSpec.Plane ();
plane < fAreaSpec.Plane () + fAreaSpec.Planes () &&
plane < buffer.Planes ();
plane++)
{
DoMapArea16 (buffer.DirtyPixel_uint16 (overlap.t, overlap.l, plane),
1,
(overlap.H () + fAreaSpec.RowPitch () - 1) / fAreaSpec.RowPitch (),
(overlap.W () + fAreaSpec.ColPitch () - 1) / fAreaSpec.ColPitch (),
0,
fAreaSpec.RowPitch () * buffer.RowStep (),
fAreaSpec.ColPitch (),
fTable->Buffer_uint16 ());
}
}
}
开发者ID:KDE,项目名称:digikam,代码行数:32,代码来源:dng_misc_opcodes.cpp
示例2: ProcessArea
void dng_opcode_GainMap::ProcessArea (dng_negative & /* negative */,
uint32 /* threadIndex */,
dng_pixel_buffer &buffer,
const dng_rect &dstArea,
const dng_rect &imageBounds)
{
dng_rect overlap = fAreaSpec.Overlap (dstArea);
if (overlap.NotEmpty ())
{
uint32 cols = overlap.W ();
uint32 colPitch = fAreaSpec.ColPitch ();
for (uint32 plane = fAreaSpec.Plane ();
plane < fAreaSpec.Plane () + fAreaSpec.Planes () &&
plane < buffer.Planes ();
plane++)
{
uint32 mapPlane = Min_uint32 (plane, fGainMap->Planes () - 1);
for (int32 row = overlap.t; row < overlap.b; row += fAreaSpec.RowPitch ())
{
real32 *dPtr = buffer.DirtyPixel_real32 (row, overlap.l, plane);
dng_gain_map_interpolator interp (*fGainMap,
imageBounds,
row,
overlap.l,
mapPlane);
for (uint32 col = 0; col < cols; col += colPitch)
{
real32 gain = interp.Interpolate ();
dPtr [col] = Min_real32 (dPtr [col] * gain, 1.0f);
for (uint32 j = 0; j < colPitch; j++)
{
interp.Increment ();
}
}
}
}
}
}
开发者ID:F0x06,项目名称:Movie2DNG,代码行数:56,代码来源:dng_gain_map.cpp
示例3: temp
void dng_image::Put (const dng_pixel_buffer &buffer)
{
// Move the overlapping pixels.
dng_rect overlap = buffer.fArea & fBounds;
if (overlap.NotEmpty ())
{
dng_pixel_buffer temp (buffer);
temp.fArea = overlap;
temp.fData = (void *) buffer.ConstPixel (overlap.t,
overlap.l,
buffer.fPlane);
// Move the overlapping planes.
if (temp.fPlane < Planes ())
{
temp.fPlanes = Min_uint32 (temp.fPlanes,
Planes () - temp.fPlane);
DoPut (temp);
}
}
}
开发者ID:rcketscientist,项目名称:platform_external_dng_sdk,代码行数:33,代码来源:dng_image.cpp
示例4: DoGet
void dng_image::DoGet (dng_pixel_buffer &buffer) const
{
dng_rect tile;
dng_tile_iterator iter (*this, buffer.fArea);
while (iter.GetOneTile (tile))
{
dng_const_tile_buffer tileBuffer (*this, tile);
buffer.CopyArea (tileBuffer,
tile,
buffer.fPlane,
buffer.fPlanes);
}
}
开发者ID:rcketscientist,项目名称:platform_external_dng_sdk,代码行数:20,代码来源:dng_image.cpp
示例5: switch
void dng_image::GetEdge (dng_pixel_buffer &buffer,
edge_option edgeOption,
const dng_rect &srcArea,
const dng_rect &dstArea) const
{
switch (edgeOption)
{
case edge_zero:
{
buffer.SetZero (dstArea,
buffer.fPlane,
buffer.fPlanes);
break;
}
case edge_repeat:
{
GetRepeat (buffer,
srcArea,
dstArea);
break;
}
case edge_repeat_zero_last:
{
if (buffer.fPlanes > 1)
{
dng_pixel_buffer buffer1 (buffer);
buffer1.fPlanes--;
GetEdge (buffer1,
edge_repeat,
srcArea,
dstArea);
}
dng_pixel_buffer buffer2 (buffer);
buffer2.fPlane = buffer.fPlanes - 1;
buffer2.fPlanes = 1;
buffer2.fData = buffer.DirtyPixel (buffer2.fArea.t,
buffer2.fArea.l,
buffer2.fPlane);
GetEdge (buffer2,
edge_zero,
srcArea,
dstArea);
break;
}
default:
{
ThrowProgramError ();
}
}
}
开发者ID:rcketscientist,项目名称:platform_external_dng_sdk,代码行数:76,代码来源:dng_image.cpp
示例6: dst1
void dng_image::GetRepeat (dng_pixel_buffer &buffer,
const dng_rect &srcArea,
const dng_rect &dstArea) const
{
// If we already have the entire srcArea in the
// buffer, we can just repeat that.
if ((srcArea & buffer.fArea) == srcArea)
{
buffer.RepeatArea (srcArea,
dstArea);
}
// Else we first need to get the srcArea into the buffer area.
else
{
// Find repeating pattern size.
dng_point repeat = srcArea.Size ();
// Find pattern phase at top-left corner of destination area.
dng_point phase = dng_pixel_buffer::RepeatPhase (srcArea,
dstArea);
// Find new source area at top-left of dstArea.
dng_rect newArea = srcArea + (dstArea.TL () -
srcArea.TL ());
// Find quadrant split coordinates.
int32 splitV = newArea.t + repeat.v - phase.v;
int32 splitH = newArea.l + repeat.h - phase.h;
// Top-left quadrant.
dng_rect dst1 (dng_rect (newArea.t,
newArea.l,
splitV,
splitH) & dstArea);
if (dst1.NotEmpty ())
{
dng_pixel_buffer temp (buffer);
temp.fArea = dst1 + (srcArea.TL () -
dstArea.TL () +
dng_point (phase.v, phase.h));
temp.fData = buffer.DirtyPixel (dst1.t,
dst1.l,
buffer.fPlane);
DoGet (temp);
}
// Top-right quadrant.
dng_rect dst2 (dng_rect (newArea.t,
splitH,
splitV,
newArea.r) & dstArea);
if (dst2.NotEmpty ())
{
dng_pixel_buffer temp (buffer);
temp.fArea = dst2 + (srcArea.TL () -
dstArea.TL () +
dng_point (phase.v, -phase.h));
temp.fData = buffer.DirtyPixel (dst2.t,
dst2.l,
buffer.fPlane);
DoGet (temp);
}
// Bottom-left quadrant.
dng_rect dst3 (dng_rect (splitV,
newArea.l,
newArea.b,
splitH) & dstArea);
if (dst3.NotEmpty ())
{
dng_pixel_buffer temp (buffer);
//.........这里部分代码省略.........
开发者ID:rcketscientist,项目名称:platform_external_dng_sdk,代码行数:101,代码来源:dng_image.cpp
注:本文中的dng_pixel_buffer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论