Mercurial > libavcodec.hg
comparison rawdec.c @ 8995:231e8535e00e libavcodec
indent
author | michael |
---|---|
date | Sat, 21 Feb 2009 17:17:09 +0000 |
parents | 80720c5427a0 |
children | c7396480f8e3 |
comparison
equal
deleted
inserted
replaced
8994:206d0cfa3163 | 8995:231e8535e00e |
---|---|
91 | 91 |
92 return 0; | 92 return 0; |
93 } | 93 } |
94 | 94 |
95 static void flip(AVCodecContext *avctx, AVPicture * picture){ | 95 static void flip(AVCodecContext *avctx, AVPicture * picture){ |
96 picture->data[0] += picture->linesize[0] * (avctx->height-1); | 96 picture->data[0] += picture->linesize[0] * (avctx->height-1); |
97 picture->linesize[0] *= -1; | 97 picture->linesize[0] *= -1; |
98 } | 98 } |
99 | 99 |
100 static int raw_decode(AVCodecContext *avctx, | 100 static int raw_decode(AVCodecContext *avctx, |
101 void *data, int *data_size, | 101 void *data, int *data_size, |
102 const uint8_t *buf, int buf_size) | 102 const uint8_t *buf, int buf_size) |
132 memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE); | 132 memcpy(frame->data[1], avctx->palctrl->palette, AVPALETTE_SIZE); |
133 avctx->palctrl->palette_changed = 0; | 133 avctx->palctrl->palette_changed = 0; |
134 } | 134 } |
135 | 135 |
136 if(context->flip) | 136 if(context->flip) |
137 flip(avctx, picture); | 137 flip(avctx, picture); |
138 | 138 |
139 if (avctx->codec_tag == MKTAG('Y', 'V', '1', '2')) | 139 if (avctx->codec_tag == MKTAG('Y', 'V', '1', '2')) |
140 { | 140 { |
141 // swap fields | 141 // swap fields |
142 unsigned char *tmp = picture->data[1]; | 142 unsigned char *tmp = picture->data[1]; |