Mercurial > mplayer.hg
comparison libswscale/swscale-test.c @ 32022:4cdf76e4317c
av_fill_image_linesizes -> av_image_fill_linesizes
author | ramiro |
---|---|
date | Wed, 08 Sep 2010 23:36:02 +0000 |
parents | 989b68128b45 |
children | 24299859359f |
comparison
equal
deleted
inserted
replaced
32021:1d9f646f8db3 | 32022:4cdf76e4317c |
---|---|
85 uint64_t ssdY, ssdU=0, ssdV=0, ssdA=0; | 85 uint64_t ssdY, ssdU=0, ssdV=0, ssdA=0; |
86 struct SwsContext *dstContext = NULL, *outContext = NULL; | 86 struct SwsContext *dstContext = NULL, *outContext = NULL; |
87 uint32_t crc = 0; | 87 uint32_t crc = 0; |
88 int res = 0; | 88 int res = 0; |
89 | 89 |
90 av_fill_image_linesizes(dstStride, dstFormat, dstW); | 90 av_image_fill_linesizes(dstStride, dstFormat, dstW); |
91 for (i=0; i<4; i++) { | 91 for (i=0; i<4; i++) { |
92 /* Image buffers passed into libswscale can be allocated any way you | 92 /* Image buffers passed into libswscale can be allocated any way you |
93 * prefer, as long as they're aligned enough for the architecture, and | 93 * prefer, as long as they're aligned enough for the architecture, and |
94 * they're freed appropriately (such as using av_free for buffers | 94 * they're freed appropriately (such as using av_free for buffers |
95 * allocated with av_malloc). */ | 95 * allocated with av_malloc). */ |
203 for (k = 0; flags[k] && !res; k++) { | 203 for (k = 0; flags[k] && !res; k++) { |
204 struct SwsContext *srcContext = NULL; | 204 struct SwsContext *srcContext = NULL; |
205 uint8_t *src[4] = {0}; | 205 uint8_t *src[4] = {0}; |
206 int srcStride[4]; | 206 int srcStride[4]; |
207 int p; | 207 int p; |
208 av_fill_image_linesizes(srcStride, srcFormat, srcW); | 208 av_image_fill_linesizes(srcStride, srcFormat, srcW); |
209 for (p = 0; p < 4; p++) { | 209 for (p = 0; p < 4; p++) { |
210 if (srcStride[p]) | 210 if (srcStride[p]) |
211 src[p] = av_mallocz(srcStride[p]*srcH+16); | 211 src[p] = av_mallocz(srcStride[p]*srcH+16); |
212 if (srcStride[p] && !src[p]) { | 212 if (srcStride[p] && !src[p]) { |
213 perror("Malloc"); | 213 perror("Malloc"); |