~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/rtjpeg.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20081226001006-wd8cuqn8d81smkdp
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 *
42
42
 * Note: GetBitContext is used to make the code simpler, since all data is
43
43
 * aligned this could be done faster in a different way, e.g. as it is done
44
 
 * in MPlayer libmpcodecs/native/RTjpegN.c
 
44
 * in MPlayer libmpcodecs/native/rtjpegn.c.
45
45
 */
46
 
static inline int get_block(GetBitContext *gb, DCTELEM *block, uint8_t *scan,
47
 
                            uint32_t *quant) {
 
46
static inline int get_block(GetBitContext *gb, DCTELEM *block, const uint8_t *scan,
 
47
                            const uint32_t *quant) {
48
48
    int coeff, i, n;
49
49
    int8_t ac;
50
50
    uint8_t dc = get_bits(gb, 8);
97
97
 * \return number of bytes consumed from the input buffer
98
98
 */
99
99
int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f,
100
 
                               uint8_t *buf, int buf_size) {
 
100
                               const uint8_t *buf, int buf_size) {
101
101
    DECLARE_ALIGNED_16(DCTELEM, block[64]);
102
102
    GetBitContext gb;
103
103
    int w = c->w / 16, h = c->h / 16;
147
147
 */
148
148
void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp,
149
149
                        int width, int height,
150
 
                        uint32_t *lquant, uint32_t *cquant) {
 
150
                        const uint32_t *lquant, const uint32_t *cquant) {
151
151
    int i;
152
152
    c->dsp = dsp;
153
153
    for (i = 0; i < 64; i++) {