Oyranos Colour Management System API
Data Fields
oyPixelAccess_s Struct Reference

control pixel access order More...

#include <oyranos_alpha.h>

Collaboration diagram for oyPixelAccess_s:
Collaboration graph
[legend]

Data Fields

oyOBJECT_e type
oyStruct_Copy_f copy
oyStruct_Release_f release
double start_xy [2]
double start_xy_old [2]
int32_t * array_xy
int array_n
int index
size_t pixels_n
int32_t workspace_id
oyStruct_s * user_data
oyArray2d_sarray
oyRectangle_soutput_image_roi
oyImage_soutput_image
oyFilterGraph_sgraph
oyOptions_s * request_queue

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.

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

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

[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 module 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 )
    Relation of positional parameters:

                start_xy         output_image_roi
                   |                /
             +-----|---------------/--------------+
    original |     |              /               |
    image ---+     |             /                |
             |  ---+------------/----------+      |
             |     |           /           +---------- output_image
             |     |   +------+--------+   |      |
             |     |   |               |   |      |
             |     |   |               |   |      |
             |     |   +---------------+   |      |
             |     |                       |      |
             |     +-----------------------+      |
             |                                    |
             +------------------------------------+
    
Version:
Oyranos: 0.1.10
Since:
2008/07/04 (Oyranos: 0.1.8)
Date:
2009/05/05

Field Documentation

processing data. The position is in start_xy relative to the previous mediator in the graph.

Deprecated:
the number of points in array_xy
Deprecated:
array of shifts, e.g. 1,0,2,0,1,0
oyStruct_Copy_f oyPixelAccess_s::copy

copy function

the graph to process

Deprecated:
to be advanced by the last caller

the image which issued the request

Referenced by oyFilterPlug_s::oyFilterPlug_ResolveImage().

rectangle of interesst; The rectangle is to be seen in relation to the output_image (of the last filter).

Deprecated:
pixels to process/cache at once; should be set to 0 or 1
oyStruct_Release_f oyPixelAccess_s::release

release function

messaging; requests to resolve

Referenced by oyFilterPlug_s::oyFilterPlug_ResolveImage().

the start point of output_image

Deprecated:
the previous start point

internal struct type oyOBJECT_PIXEL_ACCESS_S

user data, e.g. for error messages

a ID to assign distinct resources to