Logo Search packages:      
Sourcecode: librasterlite version File versions  Download package

local int decode_sorting_pass ( int **  channel,
int  channel_size,
linked_list **  LIS_slots,
linked_list LSP,
pixel_set I,
bit_buffer bb,
int  threshold 
)

Decode sorting pass

The SPECK decoding algorithm alternates two types of passes through the data: sorting pass and refinement pass. This function implements the first one.

Parameters:
channelChannel
channel_sizeChannel size
LIS_slotsArray of LIS slots
LSPList of Significant Pixels
ISet of type I
bbBit-buffer
thresholdThreshold
Returns:
Either BIT_BUFFER_OK or BIT_BUFFER_UNDERFLOW

Definition at line 873 of file speck.c.

References CONTINUE_IF_EMPTY, linked_list_tag::first, list_node_tag::next, number_of_bits(), RETURN_IF_UNDERFLOW, speck_unprocess_I(), speck_unprocess_S(), and STAGE_S.

Referenced by speck_decode().

{
    int n_slots;
    int result;
    int i;

    n_slots = number_of_bits(channel_size);

    /* Travels through all LIS slots */
    for (i = 0; i < n_slots; i++) {
        linked_list *cur_slot = LIS_slots[i];
        list_node *cur_node;

        /* Skip over empty slots */
        CONTINUE_IF_EMPTY(cur_slot);

        /* Get first node */
        cur_node = cur_slot->first;

        /* Process all nodes within this slot */
        while (cur_node) {
            list_node *next_node = cur_node->next;

            /* Unprocess set of type 'S' */
            result = speck_unprocess_S(channel, channel_size, cur_node,
                                       cur_slot, LIS_slots, LSP,
                                       bb, threshold, STAGE_S);

            RETURN_IF_UNDERFLOW(result);

            /* Next node */
            cur_node = next_node;
        }
    }

    /* Unprocess set of type 'I' */
    result = speck_unprocess_I(channel, channel_size, I,
                               LIS_slots, LSP, bb, threshold);

    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index