Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/nuv.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * NuppelVideo decoder 2 * NuppelVideo decoder
3 * Copyright (c) 2006 Reimar Doeffinger 3 * Copyright (c) 2006 Reimar Doeffinger
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 } 106 }
107 107
108 static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit y) { 108 static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit y) {
109 NuvContext *c = avctx->priv_data; 109 NuvContext *c = avctx->priv_data;
110 width = (width + 1) & ~1; 110 width = (width + 1) & ~1;
111 height = (height + 1) & ~1; 111 height = (height + 1) & ~1;
112 if (quality >= 0) 112 if (quality >= 0)
113 get_quant_quality(c, quality); 113 get_quant_quality(c, quality);
114 if (width != c->width || height != c->height) { 114 if (width != c->width || height != c->height) {
115 if (av_check_image_size(height, width, 0, avctx) < 0) 115 if (av_image_check_size(height, width, 0, avctx) < 0)
116 return 0; 116 return 0;
117 avctx->width = c->width = width; 117 avctx->width = c->width = width;
118 avctx->height = c->height = height; 118 avctx->height = c->height = height;
119 c->decomp_size = c->height * c->width * 3 / 2; 119 c->decomp_size = c->height * c->width * 3 / 2;
120 c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + AV_LZO_OUTPUT _PADDING); 120 c->decomp_buf = av_realloc(c->decomp_buf, c->decomp_size + AV_LZO_OUTPUT _PADDING);
121 if (!c->decomp_buf) { 121 if (!c->decomp_buf) {
122 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n" ); 122 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n" );
123 return 0; 123 return 0;
124 } 124 }
125 rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); 125 rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 CODEC_ID_NUV, 279 CODEC_ID_NUV,
280 sizeof(NuvContext), 280 sizeof(NuvContext),
281 decode_init, 281 decode_init,
282 NULL, 282 NULL,
283 decode_end, 283 decode_end,
284 decode_frame, 284 decode_frame,
285 CODEC_CAP_DR1, 285 CODEC_CAP_DR1,
286 .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"), 286 .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"),
287 }; 287 };
288 288
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/msmpeg4.c ('k') | source/patched-ffmpeg-mt/libavcodec/pcx.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698