oyPixelAccess_s Struct Reference
[Conversion API's]

control pixel access order

A struct to control pixel access. It is a kind of flexible pixel iterator. The order or pattern of access is defined by the array_xy and start_[x,y] variables. More...

#include <oyranos_alpha.h>


Data Fields

oyOBJECT_e type
oyStruct_Copy_f copy
oyStruct_Release_f release
oyObject_s oy_
int32_t start_xy [2]
int32_t start_xy_old [2]
int32_t * array_xy
int array_n
int index
size_t pixels_n
int32_t workspace_id
oyStruct_suser_data

Related Functions

(Note that these are not member functions.)

oyPixelAccess_soyPixelAccess_Create (int32_t start_x, int32_t start_y, oyFilterSocket_s *sock, oyPIXEL_ACCESS_TYPE_e type, oyObject_s object)
 allocate iand initialise a basic oyPixelAccess_s object
oyPixelAccess_soyPixelAccess_Copy (oyPixelAccess_s *obj, oyObject_s object)
 copy or reference a oyPixelAccess_s object
int oyPixelAccess_Release (oyPixelAccess_s **obj)
 release and zero a oyPixelAccess_s object
int oyPixelAccess_CalculateNextStartPixel (oyPixelAccess_s *obj, oyFilterPlug_s *requestor_plug)
 predict the next start position


Detailed Description

control pixel access order

A struct to control pixel access. It is a kind of flexible pixel iterator. The order or pattern of access is defined by the array_xy and start_[x,y] variables.

The index variable specifies the iterator position in the array_xy index array.

oyPixelAccess_s is like a job ticket. Goal is to maintain all intermediate and processing dependend memory references here in this structure.

pixels_n says how many pixels are to be processed for the cache. pixels_n is used to calculate the buffers located with getBuffer and freeBuffer. The amount of pixel specified in pixels_n must be processed by each filter, because other filters are relying on a properly filled cache. This variable also determins the size of the next iteration.

The relation of pixels_n to array_xy and start_[x,y] is that a minimum of pixels_n must be processed by starting with start_[x,y] and processing pixels_n through array_xy. array_xy specifies the offset pixel distance to a next pixel in x and y directions. In case pixels_n is larger than array_n the array_xy has to be continued at array_xy[0,1] after reaching its end (array_n).
Example:
Thus a line iterator behaviour can be specified by simply setting array_xy = {1,0}, for a advancement in x direction of one, array_n = 1, as we need just this type of advancement and pixels_n = image_width, for saying how often the pattern descibed in array_xy has to be applied.

Handling of pixel access is to be supported by a filter in a function of type oyCMMFilter_GetNext_f() in oyCMMapi4_s::oyCMMConnector_GetNext().

Access to the buffers by concurrenting threads is handled by passing different oyPixelAccess_s objects per thread.

From the backend point of view it is a requirement to obtain the intermediate buffers from somewhere. These are the ones to read from and to write computed results into.

Pixel in- and output buffers separation:

Access to input and output buffers:

Thread synchronisation:

Area dimensions:

Possible strategies are (old text):

Todo:
clear about pixel buffer copying, how to reach the buffers, thread synchronisation, simple or complex pixel areas (point, line, area, pattern )
Version:
Oyranos: 0.1.8
Since:
2008/07/04 (Oyranos: 0.1.8)
Date:
2008/10/22

Field Documentation

Deprecated:
the number of points in array_xy

Referenced by oyPixelAccess_CalculateNextStartPixel(), and oyPixelAccess_Create().

oyStruct_Copy_f oyPixelAccess_s::copy

copy function

to be advanced by the last caller

pixels to process/cache at once; should be set to 0 or 1

Referenced by oyPixelAccess_CalculateNextStartPixel(), and oyPixelAccess_Create().

oyStruct_Release_f oyPixelAccess_s::release

release function

Deprecated:
the previous start point

Referenced by oyPixelAccess_Create().

internal struct type oyOBJECT_PIXEL_ACCESS_S

Referenced by oyPixelAccess_Release().

user data, e.g. for error messages

a ID to assign distinct resources to


Generated on Mon Jul 27 04:18:26 2009 for Oyranos by  doxygen 1.5.9