| synopsis || return value || arguments || prev || next |
bool get_instruction( jx_frame * frame_ref, int instruction_idx, int & layer_idx, int & increment, bool & is_reused, kdu_dims & source_dims, kdu_dims & target_dims)
[Declared in "../apps/compressed_io/jpx.h"]
The JPX composition box is built from a collection of instructions which each either add to the composition associated with the previous instruction or commence from scratch with a new composition surface. Each instruction also has its own timing. These aspects are untangled here to create a set of distinct frames, each of which has its own set of compositing layers.
Each frame is composed by applying each of its compositing layers in turn to an initially blank compositing surface. Each compositing layer is applied to the region of the compositing surface expressed by target_dims, where the location parameters in target_dims.pos must be non-negative. This region is generated by scaling (as required) the region of the source compositing layer described by source_dims.
Each instruction refers to exactly one compositing layer. The index of this layer is returned via the layer_idx argument, but each time the frame is repeated (if the repeat_count returned via get_next_frame is non-zero), the layer index must be augmented by increment (might be 0).
False if instruction_idx is greater than or equal to the num_instructions value returned via get_frame_info.
Opaque pointer obtained from calls to get_next_frame or get_last_persistent_frame.
0 retrieves the first instruction in the frame. Each successive instruction is retrieved using consecutive instruction indices, up to the L-1, where L is the number of instructions returned by get_next_frame.
Used to return the index of the compositing layer (starting from 0 for the first one in the JPX data source) to be used with this instruction.
Amount to be added to layer_idx each time the frame is repeated. We are not referring here to global looping, as identified by the loop counter returned by get_global_info. We are referring only to repetitions of the frame, as identified by the repeat_count value retrieved using get_next_frame.
Used to retrieve a boolean flag indicating whether or not the compositing layer associated with this instruction will be reused in any subsequent instruction in this or any future frame. This can be useful for cache optimization.
Region to be cropped from the source composition layer to use in this instruction. The source_dims.pos member identifies the location of the cropped region relative to the upper left hand corner of the image itself; its coordinates must be non-negative. All coordinates are expressed on the compositing layer's registration grid. For a description of the registration grid see jpx_layer_source::get_codestream_registration.
If source_dims has zero area, the source region is taken to be the whole of the source compositing layer.
Region within the composition surface to which the source_dims region of the compositing layer is to be mapped. This may involve some scaling.
| top || synopsis || return value || arguments || prev || next |