comparison v210x.c @ 12128:ee740a4e80c5 libavcodec

bswap: change ME to NE in macro names Other parts of FFmpeg use NE (native endian) rather than ME (machine). This makes it consistent.
author mru
date Sat, 10 Jul 2010 22:09:01 +0000
parents 8a4984c5cacc
children 8b28e74de2c0
comparison
equal deleted inserted replaced
12127:9ba7d2a5b20a 12128:ee740a4e80c5
65 yend= ydst + width; 65 yend= ydst + width;
66 pic->pict_type= FF_I_TYPE; 66 pic->pict_type= FF_I_TYPE;
67 pic->key_frame= 1; 67 pic->key_frame= 1;
68 68
69 for(;;){ 69 for(;;){
70 uint32_t v= be2me_32(*src++); 70 uint32_t v= be2ne_32(*src++);
71 *udst++= (v>>16) & 0xFFC0; 71 *udst++= (v>>16) & 0xFFC0;
72 *ydst++= (v>>6 ) & 0xFFC0; 72 *ydst++= (v>>6 ) & 0xFFC0;
73 *vdst++= (v<<4 ) & 0xFFC0; 73 *vdst++= (v<<4 ) & 0xFFC0;
74 74
75 v= be2me_32(*src++); 75 v= be2ne_32(*src++);
76 *ydst++= (v>>16) & 0xFFC0; 76 *ydst++= (v>>16) & 0xFFC0;
77 77
78 if(ydst >= yend){ 78 if(ydst >= yend){
79 ydst+= pic->linesize[0]/2 - width; 79 ydst+= pic->linesize[0]/2 - width;
80 udst+= pic->linesize[1]/2 - width/2; 80 udst+= pic->linesize[1]/2 - width/2;
85 } 85 }
86 86
87 *udst++= (v>>6 ) & 0xFFC0; 87 *udst++= (v>>6 ) & 0xFFC0;
88 *ydst++= (v<<4 ) & 0xFFC0; 88 *ydst++= (v<<4 ) & 0xFFC0;
89 89
90 v= be2me_32(*src++); 90 v= be2ne_32(*src++);
91 *vdst++= (v>>16) & 0xFFC0; 91 *vdst++= (v>>16) & 0xFFC0;
92 *ydst++= (v>>6 ) & 0xFFC0; 92 *ydst++= (v>>6 ) & 0xFFC0;
93 93
94 if(ydst >= yend){ 94 if(ydst >= yend){
95 ydst+= pic->linesize[0]/2 - width; 95 ydst+= pic->linesize[0]/2 - width;
100 break; 100 break;
101 } 101 }
102 102
103 *udst++= (v<<4 ) & 0xFFC0; 103 *udst++= (v<<4 ) & 0xFFC0;
104 104
105 v= be2me_32(*src++); 105 v= be2ne_32(*src++);
106 *ydst++= (v>>16) & 0xFFC0; 106 *ydst++= (v>>16) & 0xFFC0;
107 *vdst++= (v>>6 ) & 0xFFC0; 107 *vdst++= (v>>6 ) & 0xFFC0;
108 *ydst++= (v<<4 ) & 0xFFC0; 108 *ydst++= (v<<4 ) & 0xFFC0;
109 if(ydst >= yend){ 109 if(ydst >= yend){
110 ydst+= pic->linesize[0]/2 - width; 110 ydst+= pic->linesize[0]/2 - width;