comparison rawdec.c @ 10390:5198794511a4 libavcodec

Simplify: use FFSWAP
author reimar
date Tue, 13 Oct 2009 08:23:00 +0000
parents 45d331133468
children 8a9b0b693a30
comparison
equal deleted inserted replaced
10389:c857cd6b77b6 10390:5198794511a4
140 if(context->flip) 140 if(context->flip)
141 flip(avctx, picture); 141 flip(avctx, picture);
142 142
143 if ( avctx->codec_tag == MKTAG('Y', 'V', '1', '2') 143 if ( avctx->codec_tag == MKTAG('Y', 'V', '1', '2')
144 || avctx->codec_tag == MKTAG('Y', 'V', 'U', '9')) 144 || avctx->codec_tag == MKTAG('Y', 'V', 'U', '9'))
145 { 145 FFSWAP(uint8_t *, picture->data[1], picture->data[2]);
146 // swap fields
147 unsigned char *tmp = picture->data[1];
148 picture->data[1] = picture->data[2];
149 picture->data[2] = tmp;
150 }
151 146
152 if(avctx->codec_tag == AV_RL32("yuv2") && 147 if(avctx->codec_tag == AV_RL32("yuv2") &&
153 avctx->pix_fmt == PIX_FMT_YUYV422) { 148 avctx->pix_fmt == PIX_FMT_YUYV422) {
154 int x, y; 149 int x, y;
155 uint8_t *line = picture->data[0]; 150 uint8_t *line = picture->data[0];