Mercurial > libavcodec.hg
comparison nuv.c @ 8732:967c0a1a60a0 libavcodec
Add av_ prefix to LZO stuff and thus make it officially part of the public API.
Keep lzo1x_decode until the next major version bump for binary compatibility.
author | reimar |
---|---|
date | Mon, 02 Feb 2009 20:16:00 +0000 |
parents | c4f105f7c886 |
children | bf274494b66e |
comparison
equal
deleted
inserted
replaced
8731:6a1ef00ca991 | 8732:967c0a1a60a0 |
---|---|
114 if (avcodec_check_dimensions(avctx, height, width) < 0) | 114 if (avcodec_check_dimensions(avctx, height, width) < 0) |
115 return 0; | 115 return 0; |
116 avctx->width = c->width = width; | 116 avctx->width = c->width = width; |
117 avctx->height = c->height = height; | 117 avctx->height = c->height = height; |
118 c->decomp_size = c->height * c->width * 3 / 2; | 118 c->decomp_size = c->height * c->width * 3 / 2; |
119 c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + LZO_OUTPUT_PADDING); | 119 c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + AV_LZO_OUTPUT_PADDING); |
120 if (!c->decomp_buf) { | 120 if (!c->decomp_buf) { |
121 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); | 121 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); |
122 return 0; | 122 return 0; |
123 } | 123 } |
124 rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); | 124 rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); |
173 // skip rest of the frameheader. | 173 // skip rest of the frameheader. |
174 buf = &buf[12]; | 174 buf = &buf[12]; |
175 buf_size -= 12; | 175 buf_size -= 12; |
176 if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) { | 176 if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) { |
177 int outlen = c->decomp_size, inlen = buf_size; | 177 int outlen = c->decomp_size, inlen = buf_size; |
178 if (lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen)) | 178 if (av_lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen)) |
179 av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n"); | 179 av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n"); |
180 buf = c->decomp_buf; | 180 buf = c->decomp_buf; |
181 buf_size = c->decomp_size; | 181 buf_size = c->decomp_size; |
182 } | 182 } |
183 if (c->codec_frameheader) { | 183 if (c->codec_frameheader) { |