comparison rawdec.c @ 11753:4c894b716948 libavcodec

Rename pixelFormatBpsAVI to pix_fmt_bps_avi and pixelFormatBpsMOV to pix_fmt_bps_mov. The new names are consistent with the predominant FFmpeg style.
author stefano
date Fri, 21 May 2010 23:19:50 +0000
parents 3ba304b8cbd2
children 33498215b74f
comparison
equal deleted inserted replaced
11752:3ba304b8cbd2 11753:4c894b716948
33 int length; /* number of bytes in buffer */ 33 int length; /* number of bytes in buffer */
34 int flip; 34 int flip;
35 AVFrame pic; ///< AVCodecContext.coded_frame 35 AVFrame pic; ///< AVCodecContext.coded_frame
36 } RawVideoContext; 36 } RawVideoContext;
37 37
38 static const PixelFormatTag pixelFormatBpsAVI[] = { 38 static const PixelFormatTag pix_fmt_bps_avi[] = {
39 { PIX_FMT_PAL8, 4 }, 39 { PIX_FMT_PAL8, 4 },
40 { PIX_FMT_PAL8, 8 }, 40 { PIX_FMT_PAL8, 8 },
41 { PIX_FMT_RGB555, 15 }, 41 { PIX_FMT_RGB555, 15 },
42 { PIX_FMT_RGB555, 16 }, 42 { PIX_FMT_RGB555, 16 },
43 { PIX_FMT_BGR24, 24 }, 43 { PIX_FMT_BGR24, 24 },
44 { PIX_FMT_RGB32, 32 }, 44 { PIX_FMT_RGB32, 32 },
45 { PIX_FMT_NONE, 0 }, 45 { PIX_FMT_NONE, 0 },
46 }; 46 };
47 47
48 static const PixelFormatTag pixelFormatBpsMOV[] = { 48 static const PixelFormatTag pix_fmt_bps_mov[] = {
49 { PIX_FMT_MONOWHITE, 1 }, 49 { PIX_FMT_MONOWHITE, 1 },
50 { PIX_FMT_PAL8, 2 }, 50 { PIX_FMT_PAL8, 2 },
51 { PIX_FMT_PAL8, 4 }, 51 { PIX_FMT_PAL8, 4 },
52 { PIX_FMT_PAL8, 8 }, 52 { PIX_FMT_PAL8, 8 },
53 // FIXME swscale does not support 16 bit in .mov, sample 16bit.mov 53 // FIXME swscale does not support 16 bit in .mov, sample 16bit.mov
71 static av_cold int raw_init_decoder(AVCodecContext *avctx) 71 static av_cold int raw_init_decoder(AVCodecContext *avctx)
72 { 72 {
73 RawVideoContext *context = avctx->priv_data; 73 RawVideoContext *context = avctx->priv_data;
74 74
75 if (avctx->codec_tag == MKTAG('r','a','w',' ')) 75 if (avctx->codec_tag == MKTAG('r','a','w',' '))
76 avctx->pix_fmt = find_pix_fmt(pixelFormatBpsMOV, avctx->bits_per_coded_sample); 76 avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample);
77 else if (avctx->codec_tag) 77 else if (avctx->codec_tag)
78 avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag); 78 avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag);
79 else if (avctx->bits_per_coded_sample) 79 else if (avctx->bits_per_coded_sample)
80 avctx->pix_fmt = find_pix_fmt(pixelFormatBpsAVI, avctx->bits_per_coded_sample); 80 avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample);
81 81
82 context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); 82 context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
83 context->buffer = av_malloc(context->length); 83 context->buffer = av_malloc(context->length);
84 context->pic.pict_type = FF_I_TYPE; 84 context->pic.pict_type = FF_I_TYPE;
85 context->pic.key_frame = 1; 85 context->pic.key_frame = 1;