Mercurial > libavcodec.hg
comparison utils.c @ 12471:d821f7c64fc9 libavcodec
Remove use of deprecated functions av_image_fill_pointers/linesizes in
libavcodec/utils.c, fix warnings.
author | stefano |
---|---|
date | Tue, 07 Sep 2010 21:24:03 +0000 |
parents | ffb3668ff7af |
children | e9a1e1ba768f |
comparison
equal
deleted
inserted
replaced
12470:319673d2bd4b | 12471:d821f7c64fc9 |
---|---|
281 } | 281 } |
282 | 282 |
283 do { | 283 do { |
284 // NOTE: do not align linesizes individually, this breaks e.g. assumptions | 284 // NOTE: do not align linesizes individually, this breaks e.g. assumptions |
285 // that linesize[0] == 2*linesize[1] in the MPEG-encoder for 4:2:2 | 285 // that linesize[0] == 2*linesize[1] in the MPEG-encoder for 4:2:2 |
286 av_fill_image_linesizes(picture.linesize, s->pix_fmt, w); | 286 av_image_fill_linesizes(picture.linesize, s->pix_fmt, w); |
287 // increase alignment of w for next try (rhs gives the lowest bit set in w) | 287 // increase alignment of w for next try (rhs gives the lowest bit set in w) |
288 w += w & ~(w-1); | 288 w += w & ~(w-1); |
289 | 289 |
290 unaligned = 0; | 290 unaligned = 0; |
291 for (i=0; i<4; i++){ | 291 for (i=0; i<4; i++){ |
292 unaligned |= picture.linesize[i] % stride_align[i]; | 292 unaligned |= picture.linesize[i] % stride_align[i]; |
293 } | 293 } |
294 } while (unaligned); | 294 } while (unaligned); |
295 | 295 |
296 tmpsize = av_fill_image_pointers(picture.data, s->pix_fmt, h, NULL, picture.linesize); | 296 tmpsize = av_image_fill_pointers(picture.data, s->pix_fmt, h, NULL, picture.linesize); |
297 if (tmpsize < 0) | 297 if (tmpsize < 0) |
298 return -1; | 298 return -1; |
299 | 299 |
300 for (i=0; i<3 && picture.data[i+1]; i++) | 300 for (i=0; i<3 && picture.data[i+1]; i++) |
301 size[i] = picture.data[i+1] - picture.data[i]; | 301 size[i] = picture.data[i+1] - picture.data[i]; |