comparison imgconvert.c @ 12387:e7de1ba6dbc0 libavcodec

Deprecate ff_get_plane_bytewidth() in favor of av_get_image_linesize().
author stefano
date Thu, 12 Aug 2010 15:06:04 +0000
parents b4b2f1006d9d
children e05e29a04ada
comparison
equal deleted inserted replaced
12386:b4b2f1006d9d 12387:e7de1ba6dbc0
792 dst += dst_wrap; 792 dst += dst_wrap;
793 src += src_wrap; 793 src += src_wrap;
794 } 794 }
795 } 795 }
796 796
797 #if LIBAVCODEC_VERSION_MAJOR < 53
797 int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane) 798 int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane)
798 { 799 {
799 return av_get_image_linesize(pix_fmt, width, plane); 800 return av_get_image_linesize(pix_fmt, width, plane);
800 } 801 }
802 #endif
801 803
802 void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4], 804 void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
803 uint8_t *src_data[4], int src_linesize[4], 805 uint8_t *src_data[4], int src_linesize[4],
804 enum PixelFormat pix_fmt, int width, int height) 806 enum PixelFormat pix_fmt, int width, int height)
805 { 807 {
810 switch(pf->pixel_type) { 812 switch(pf->pixel_type) {
811 case FF_PIXEL_PACKED: 813 case FF_PIXEL_PACKED:
812 case FF_PIXEL_PLANAR: 814 case FF_PIXEL_PLANAR:
813 for(i = 0; i < pf->nb_channels; i++) { 815 for(i = 0; i < pf->nb_channels; i++) {
814 int h; 816 int h;
815 int bwidth = ff_get_plane_bytewidth(pix_fmt, width, i); 817 int bwidth = av_get_image_linesize(pix_fmt, width, i);
816 h = height; 818 h = height;
817 if (i == 1 || i == 2) { 819 if (i == 1 || i == 2) {
818 h= -((-height)>>desc->log2_chroma_h); 820 h= -((-height)>>desc->log2_chroma_h);
819 } 821 }
820 ff_img_copy_plane(dst_data[i], dst_linesize[i], 822 ff_img_copy_plane(dst_data[i], dst_linesize[i],