comparison rawdec.c @ 10773:8413193405c5 libavcodec

Cosmetics: Fix indentation and comment after r21027.
author cehoyos
date Tue, 05 Jan 2010 01:14:38 +0000
parents c76ee970d3bd
children 98520e1f1f53
comparison
equal deleted inserted replaced
10772:c76ee970d3bd 10773:8413193405c5
113 AVPicture * picture = (AVPicture *) data; 113 AVPicture * picture = (AVPicture *) data;
114 114
115 frame->interlaced_frame = avctx->coded_frame->interlaced_frame; 115 frame->interlaced_frame = avctx->coded_frame->interlaced_frame;
116 frame->top_field_first = avctx->coded_frame->top_field_first; 116 frame->top_field_first = avctx->coded_frame->top_field_first;
117 117
118 //4bpp raw in avi and mov (yes this is ugly ...) 118 //2bpp and 4bpp raw in avi and mov (yes this is ugly ...)
119 if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) && 119 if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
120 avctx->pix_fmt==PIX_FMT_PAL8 && 120 avctx->pix_fmt==PIX_FMT_PAL8 &&
121 (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){ 121 (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
122 int i; 122 int i;
123 uint8_t *dst = context->buffer + 256*4; 123 uint8_t *dst = context->buffer + 256*4;
124 buf_size = context->length - 256*4; 124 buf_size = context->length - 256*4;
125 if (avctx->bits_per_coded_sample == 4){ 125 if (avctx->bits_per_coded_sample == 4){
126 for(i=0; 2*i+1 < buf_size; i++){ 126 for(i=0; 2*i+1 < buf_size; i++){
127 dst[2*i+0]= buf[i]>>4; 127 dst[2*i+0]= buf[i]>>4;
128 dst[2*i+1]= buf[i]&15; 128 dst[2*i+1]= buf[i]&15;
129 } 129 }
130 } else 130 } else
131 for(i=0; 4*i+3 < buf_size; i++){ 131 for(i=0; 4*i+3 < buf_size; i++){
132 dst[4*i+0]= buf[i]>>6; 132 dst[4*i+0]= buf[i]>>6;
133 dst[4*i+1]= buf[i]>>4&3; 133 dst[4*i+1]= buf[i]>>4&3;
134 dst[4*i+2]= buf[i]>>2&3; 134 dst[4*i+2]= buf[i]>>2&3;