Skip to content

jpec_huff_encode_block simplification #3

@timotheecour

Description

@timotheecour

in jpec_huff_encode_block:
why not:

  jpec_huff_state_t state;
  state.buffer = h->state.buffer;
  state.nbits = h->state.nbits;
  state.dc = h->state.dc;
  state.buf = buf;
  jpec_huff_encode_block_impl(block, &state);
  h->state.buffer = state.buffer;
  h->state.nbits = state.nbits;
  h->state.dc = state.dc;
  h->state.buf = state.buf;

=>

  h->state.buf = buf;
  jpec_huff_encode_block_impl(block, &h->state);

? am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions