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

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/cscd.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 * CamStudio decoder 2 * CamStudio 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 static av_cold int decode_init(AVCodecContext *avctx) { 217 static av_cold int decode_init(AVCodecContext *avctx) {
218 CamStudioContext *c = avctx->priv_data; 218 CamStudioContext *c = avctx->priv_data;
219 switch (avctx->bits_per_coded_sample) { 219 switch (avctx->bits_per_coded_sample) {
220 case 16: avctx->pix_fmt = PIX_FMT_RGB555; break; 220 case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
221 case 24: avctx->pix_fmt = PIX_FMT_BGR24; break; 221 case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
222 case 32: avctx->pix_fmt = PIX_FMT_RGB32; break; 222 case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
223 default: 223 default:
224 av_log(avctx, AV_LOG_ERROR, 224 av_log(avctx, AV_LOG_ERROR,
225 "CamStudio codec error: invalid depth %i bpp\n", 225 "CamStudio codec error: invalid depth %i bpp\n",
226 avctx->bits_per_coded_sample); 226 avctx->bits_per_coded_sample);
227 return 1; 227 return 1;
228 } 228 }
229 c->bpp = avctx->bits_per_coded_sample; 229 c->bpp = avctx->bits_per_coded_sample;
230 c->pic.data[0] = NULL; 230 c->pic.data[0] = NULL;
231 c->linelen = avctx->width * avctx->bits_per_coded_sample / 8; 231 c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
232 c->height = avctx->height; 232 c->height = avctx->height;
233 c->decomp_size = c->height * c->linelen; 233 c->decomp_size = c->height * c->linelen;
234 c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING); 234 c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING);
235 if (!c->decomp_buf) { 235 if (!c->decomp_buf) {
236 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); 236 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
237 return 1; 237 return 1;
(...skipping 15 matching lines...) Expand all
253 CODEC_ID_CSCD, 253 CODEC_ID_CSCD,
254 sizeof(CamStudioContext), 254 sizeof(CamStudioContext),
255 decode_init, 255 decode_init,
256 NULL, 256 NULL,
257 decode_end, 257 decode_end,
258 decode_frame, 258 decode_frame,
259 CODEC_CAP_DR1, 259 CODEC_CAP_DR1,
260 .long_name = NULL_IF_CONFIG_SMALL("CamStudio"), 260 .long_name = NULL_IF_CONFIG_SMALL("CamStudio"),
261 }; 261 };
262 262
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/cavsdsp.c ('k') | source/patched-ffmpeg-mt/libavcodec/dct-test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698