Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jpec_huff_encode_block simplification #3

Open
timotheecour opened this issue Jun 19, 2018 · 0 comments
Open

jpec_huff_encode_block simplification #3

timotheecour opened this issue Jun 19, 2018 · 0 comments

Comments

@timotheecour
Copy link

timotheecour commented Jun 19, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant