diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-06 12:10:34 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-08 07:13:26 +0200 |
commit | 716d413c13981da15323c7a3821860536eefdbbb (patch) | |
tree | b15ebcded50b8edaa5b9fc8f261774043138e1fa /libavutil/imgutils.c | |
parent | 78071a1420b425dfb787ac739048f523007b8139 (diff) | |
download | ffmpeg-716d413c13981da15323c7a3821860536eefdbbb.tar.gz |
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Diffstat (limited to 'libavutil/imgutils.c')
-rw-r--r-- | libavutil/imgutils.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 4e394b6b50..fdc07f87a7 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -45,7 +45,7 @@ void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], } } -int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane) +int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane) { const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; int max_step [4]; /* max pixel step for each plane */ @@ -60,7 +60,7 @@ int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane) return max_step[plane] * (((width + (1 << s) - 1)) >> s); } -int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width) +int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width) { int i; const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; @@ -69,7 +69,7 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt memset(linesizes, 0, 4*sizeof(linesizes[0])); - if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) + if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) return AVERROR(EINVAL); if (desc->flags & PIX_FMT_BITSTREAM) { @@ -91,7 +91,7 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt return 0; } -int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height, +int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, uint8_t *ptr, const int linesizes[4]) { int i, total_size, size[4] = { 0 }, has_plane[4] = { 0 }; @@ -99,7 +99,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; memset(data , 0, sizeof(data[0])*4); - if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) + if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) return AVERROR(EINVAL); data[0] = ptr; @@ -133,7 +133,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh return total_size; } -int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt) +int ff_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt) { int i; @@ -141,27 +141,27 @@ int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt) int r, g, b; switch (pix_fmt) { - case PIX_FMT_RGB8: + case AV_PIX_FMT_RGB8: r = (i>>5 )*36; g = ((i>>2)&7)*36; b = (i&3 )*85; break; - case PIX_FMT_BGR8: + case AV_PIX_FMT_BGR8: b = (i>>6 )*85; g = ((i>>3)&7)*36; r = (i&7 )*36; break; - case PIX_FMT_RGB4_BYTE: + case AV_PIX_FMT_RGB4_BYTE: r = (i>>3 )*255; g = ((i>>1)&3)*85; b = (i&1 )*255; break; - case PIX_FMT_BGR4_BYTE: + case AV_PIX_FMT_BGR4_BYTE: b = (i>>3 )*255; g = ((i>>1)&3)*85; r = (i&1 )*255; break; - case PIX_FMT_GRAY8: + case AV_PIX_FMT_GRAY8: r = b = g = i; break; default: @@ -174,7 +174,7 @@ int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt) } int av_image_alloc(uint8_t *pointers[4], int linesizes[4], - int w, int h, enum PixelFormat pix_fmt, int align) + int w, int h, enum AVPixelFormat pix_fmt, int align) { int i, ret; uint8_t *buf; @@ -237,7 +237,7 @@ void av_image_copy_plane(uint8_t *dst, int dst_linesize, void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], const uint8_t *src_data[4], const int src_linesizes[4], - enum PixelFormat pix_fmt, int width, int height) + enum AVPixelFormat pix_fmt, int width, int height) { const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; |