Skip to content

ok_jpg.c optimze #24

@suitingduan

Description

@suitingduan
uint8_t *src = buffer;
for (int i = 0; i < decoder->num_scan_components; i++, src += 2)
{
    int C = src[0];
    bool component_found = false;
    for (int j = 0; j < decoder->num_components; j++)
    {
        ok_jpg_component *c = decoder->components + j;
        if (c->id == C)
        {
            decoder->scan_components[i] = j;
            component_found = true;

// continue;
}
}
continue shall be added
here i have a problem: at ok_jpg_decode_scan() function if (decoder->progressive) is false ,the code run decoder->huffman_error is true, because ok_jpg_huffman_decode() run and at the function decoder->huffman_error = true;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions