comparison nuv.c @ 6243:930ac362be5a libavcodec

const
author michael
date Fri, 01 Feb 2008 13:55:15 +0000
parents dfdff1ca78a7
children 48759bfbd073
comparison
equal deleted inserted replaced
6242:67986191913d 6243:930ac362be5a
67 * \param f destination AVFrame 67 * \param f destination AVFrame
68 * \param src source buffer, does not use any line-stride 68 * \param src source buffer, does not use any line-stride
69 * \param width width of the video frame 69 * \param width width of the video frame
70 * \param height height of the video frame 70 * \param height height of the video frame
71 */ 71 */
72 static void copy_frame(AVFrame *f, uint8_t *src, 72 static void copy_frame(AVFrame *f, const uint8_t *src,
73 int width, int height) { 73 int width, int height) {
74 AVPicture pic; 74 AVPicture pic;
75 avpicture_fill(&pic, src, PIX_FMT_YUV420P, width, height); 75 avpicture_fill(&pic, src, PIX_FMT_YUV420P, width, height);
76 av_picture_copy((AVPicture *)f, &pic, PIX_FMT_YUV420P, width, height); 76 av_picture_copy((AVPicture *)f, &pic, PIX_FMT_YUV420P, width, height);
77 } 77 }
78 78
79 /** 79 /**
80 * \brief extract quantization tables from codec data into our context 80 * \brief extract quantization tables from codec data into our context
81 */ 81 */
82 static int get_quant(AVCodecContext *avctx, NuvContext *c, 82 static int get_quant(AVCodecContext *avctx, NuvContext *c,
83 uint8_t *buf, int size) { 83 const uint8_t *buf, int size) {
84 int i; 84 int i;
85 if (size < 2 * 64 * 4) { 85 if (size < 2 * 64 * 4) {
86 av_log(avctx, AV_LOG_ERROR, "insufficient rtjpeg quant data\n"); 86 av_log(avctx, AV_LOG_ERROR, "insufficient rtjpeg quant data\n");
87 return -1; 87 return -1;
88 } 88 }