Mercurial > mplayer.hg
comparison libswscale/swscale-example.c @ 19143:c4dac777b44c
Use libavutil in libswscale, and allow it to be built out of the mplayer tree
author | lucabe |
---|---|
date | Thu, 20 Jul 2006 12:13:57 +0000 |
parents | 8579acff875e |
children | ac69ba536915 |
comparison
equal
deleted
inserted
replaced
19142:4c22e1d84ac9 | 19143:c4dac777b44c |
---|---|
20 #include <stdlib.h> | 20 #include <stdlib.h> |
21 #include <string.h> | 21 #include <string.h> |
22 #include <inttypes.h> | 22 #include <inttypes.h> |
23 #include <stdarg.h> | 23 #include <stdarg.h> |
24 | 24 |
25 #include "config.h" | |
26 | |
27 #include "swscale.h" | 25 #include "swscale.h" |
28 #include "libvo/img_format.h" | 26 #include "img_format.h" |
29 | 27 |
30 static int testFormat[]={ | 28 static int testFormat[]={ |
31 IMGFMT_YVU9, | 29 IMGFMT_YVU9, |
32 IMGFMT_YV12, | 30 IMGFMT_YV12, |
33 //IMGFMT_IYUV, | 31 //IMGFMT_IYUV, |
118 ssdU/= w*h/4; | 116 ssdU/= w*h/4; |
119 ssdV/= w*h/4; | 117 ssdV/= w*h/4; |
120 | 118 |
121 if(ssdY>100 || ssdU>100 || ssdV>100){ | 119 if(ssdY>100 || ssdU>100 || ssdV>100){ |
122 printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5lld,%5lld,%5lld\n", | 120 printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5lld,%5lld,%5lld\n", |
123 vo_format_name(srcFormat), srcW, srcH, | 121 sws_format_name(srcFormat), srcW, srcH, |
124 vo_format_name(dstFormat), dstW, dstH, | 122 sws_format_name(dstFormat), dstW, dstH, |
125 flags, | 123 flags, |
126 ssdY, ssdU, ssdV); | 124 ssdY, ssdU, ssdV); |
127 } | 125 } |
128 | 126 |
129 end: | 127 end: |
161 for(dstFormatIndex=0; ;dstFormatIndex++){ | 159 for(dstFormatIndex=0; ;dstFormatIndex++){ |
162 dstFormat= testFormat[dstFormatIndex]; | 160 dstFormat= testFormat[dstFormatIndex]; |
163 if(!dstFormat) break; | 161 if(!dstFormat) break; |
164 // if(!isSupportedOut(dstFormat)) continue; | 162 // if(!isSupportedOut(dstFormat)) continue; |
165 printf("%s -> %s\n", | 163 printf("%s -> %s\n", |
166 vo_format_name(srcFormat), | 164 sws_format_name(srcFormat), |
167 vo_format_name(dstFormat)); | 165 sws_format_name(dstFormat)); |
168 | 166 |
169 srcW= w; | 167 srcW= w; |
170 srcH= h; | 168 srcH= h; |
171 for(dstW=w - w/3; dstW<= 4*w/3; dstW+= w/3){ | 169 for(dstW=w - w/3; dstW<= 4*w/3; dstW+= w/3){ |
172 for(dstH=h - h/3; dstH<= 4*h/3; dstH+= h/3){ | 170 for(dstH=h - h/3; dstH<= 4*h/3; dstH+= h/3){ |