comparison imgconvert.c @ 10546:759ad4f2f7fe libavcodec

Indent
author ramiro
date Fri, 20 Nov 2009 11:38:37 +0000
parents 526cab0b961a
children 7a8b35405591
comparison
equal deleted inserted replaced
10545:e5a8a6b9a717 10546:759ad4f2f7fe
881 pix_fmt == PIX_FMT_RGB565LE || 881 pix_fmt == PIX_FMT_RGB565LE ||
882 pix_fmt == PIX_FMT_RGB555BE || 882 pix_fmt == PIX_FMT_RGB555BE ||
883 pix_fmt == PIX_FMT_RGB555LE) 883 pix_fmt == PIX_FMT_RGB555LE)
884 w = width * 2; 884 w = width * 2;
885 else if (pix_fmt == PIX_FMT_UYYVYY411) 885 else if (pix_fmt == PIX_FMT_UYYVYY411)
886 w = width + width/2; 886 w = width + width/2;
887 else if (pix_fmt == PIX_FMT_PAL8) 887 else if (pix_fmt == PIX_FMT_PAL8)
888 w = width; 888 w = width;
889 else 889 else
890 w = width * (pf->depth * pf->nb_channels / 8); 890 w = width * (pf->depth * pf->nb_channels / 8);
891 891
892 data_planes = 1; 892 data_planes = 1;
893 h = height; 893 h = height;
894 } else { 894 } else {
895 data_planes = pf->nb_channels; 895 data_planes = pf->nb_channels;
899 899
900 ow = w; 900 ow = w;
901 oh = h; 901 oh = h;
902 902
903 for (i=0; i<data_planes; i++) { 903 for (i=0; i<data_planes; i++) {
904 if (i == 1) { 904 if (i == 1) {
905 w = ((width >> pf->x_chroma_shift) * pf->depth + 7) / 8; 905 w = ((width >> pf->x_chroma_shift) * pf->depth + 7) / 8;
906 h = height >> pf->y_chroma_shift; 906 h = height >> pf->y_chroma_shift;
907 } else if (i == 3) { 907 } else if (i == 3) {
908 w = ow; 908 w = ow;
909 h = oh; 909 h = oh;
910 } 910 }
911 s = src->data[i]; 911 s = src->data[i];
912 for(j=0; j<h; j++) { 912 for(j=0; j<h; j++) {
913 memcpy(dest, s, w); 913 memcpy(dest, s, w);
914 dest += w; 914 dest += w;
915 s += src->linesize[i]; 915 s += src->linesize[i];
916 } 916 }
917 } 917 }
918 918
919 if (pf->pixel_type == FF_PIXEL_PALETTE) 919 if (pf->pixel_type == FF_PIXEL_PALETTE)
920 memcpy((unsigned char *)(((size_t)dest + 3) & ~3), src->data[1], 256 * 4); 920 memcpy((unsigned char *)(((size_t)dest + 3) & ~3), src->data[1], 256 * 4);
921 921