Mercurial > libavcodec.hg
comparison rtjpeg.c @ 4153:e283c82e10aa libavcodec
Avoid void*-arithmetic, and uint8_t* is more correct anyway.
author | reimar |
---|---|
date | Mon, 06 Nov 2006 17:56:08 +0000 |
parents | a5fca6fd5e4c |
children | c8ec0c985df8 |
comparison
equal
deleted
inserted
replaced
4152:e893c1438b36 | 4153:e283c82e10aa |
---|---|
100 uint8_t *buf, int buf_size) { | 100 uint8_t *buf, int buf_size) { |
101 DECLARE_ALIGNED_16(DCTELEM, block[64]); | 101 DECLARE_ALIGNED_16(DCTELEM, block[64]); |
102 GetBitContext gb; | 102 GetBitContext gb; |
103 int w = c->w / 16, h = c->h / 16; | 103 int w = c->w / 16, h = c->h / 16; |
104 int x, y; | 104 int x, y; |
105 void *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0]; | 105 uint8_t *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0]; |
106 void *u = f->data[1], *v = f->data[2]; | 106 uint8_t *u = f->data[1], *v = f->data[2]; |
107 init_get_bits(&gb, buf, buf_size * 8); | 107 init_get_bits(&gb, buf, buf_size * 8); |
108 for (y = 0; y < h; y++) { | 108 for (y = 0; y < h; y++) { |
109 for (x = 0; x < w; x++) { | 109 for (x = 0; x < w; x++) { |
110 if (get_block(&gb, block, c->scan, c->lquant)) | 110 if (get_block(&gb, block, c->scan, c->lquant)) |
111 c->dsp->idct_put(y1, f->linesize[0], block); | 111 c->dsp->idct_put(y1, f->linesize[0], block); |