Mercurial > mplayer.hg
comparison TOOLS/mwallp/jpeg.c @ 9500:4930b82dbf02
forgot ...
author | michael |
---|---|
date | Mon, 24 Feb 2003 22:46:48 +0000 |
parents | 95918d5066b6 |
children | 3a6ae4199f67 |
comparison
equal
deleted
inserted
replaced
9499:bc5b87370cd1 | 9500:4930b82dbf02 |
---|---|
14 #include "img_format.h" | 14 #include "img_format.h" |
15 | 15 |
16 #include "swscale.h" | 16 #include "swscale.h" |
17 #include "rgb2rgb.h" | 17 #include "rgb2rgb.h" |
18 | 18 |
19 static SwsContext *swsContext=NULL; | 19 static struct SwsContext *swsContext=NULL; |
20 | 20 |
21 typedef struct | 21 typedef struct |
22 { | 22 { |
23 struct jpeg_source_mgr pub; | 23 struct jpeg_source_mgr pub; |
24 unsigned char * inbuf; | 24 unsigned char * inbuf; |
132 } | 132 } |
133 | 133 |
134 jpeg_finish_decompress(&cinfo); | 134 jpeg_finish_decompress(&cinfo); |
135 jpeg_destroy_decompress(&cinfo); | 135 jpeg_destroy_decompress(&cinfo); |
136 | 136 |
137 swsContext= getSwsContextFromCmdLine(width,height, in_fmt, | 137 swsContext= sws_getContextFromCmdLine(width,height, in_fmt, |
138 dwidth,dheight, IMGFMT_BGR|dbpp); | 138 dwidth,dheight, IMGFMT_BGR|dbpp); |
139 | 139 |
140 swsContext->swScale(swsContext,&img,&row_stride,0,height,&dbuffer, &dstride); | 140 sws_scale(swsContext,&img,&row_stride,0,height,&dbuffer, &dstride); |
141 | 141 |
142 freeSwsContext(swsContext); | 142 sws_freeContext(swsContext); |
143 | 143 |
144 free(img); | 144 free(img); |
145 | 145 |
146 return 1; | 146 return 1; |
147 } | 147 } |