comparison imgconvert.c @ 5810:3e5e2bafe35c libavcodec

Enable avpicture_deinterlace() for PIX_FMT_GRAY8. Patch by Andrea Gualano, gualano T imavis O com
author cehoyos
date Thu, 11 Oct 2007 22:31:08 +0000
parents 8b211f34a3eb
children 80103098c797
comparison
equal deleted inserted replaced
5809:7301ea0ae221 5810:3e5e2bafe35c
2822 int i; 2822 int i;
2823 2823
2824 if (pix_fmt != PIX_FMT_YUV420P && 2824 if (pix_fmt != PIX_FMT_YUV420P &&
2825 pix_fmt != PIX_FMT_YUV422P && 2825 pix_fmt != PIX_FMT_YUV422P &&
2826 pix_fmt != PIX_FMT_YUV444P && 2826 pix_fmt != PIX_FMT_YUV444P &&
2827 pix_fmt != PIX_FMT_YUV411P) 2827 pix_fmt != PIX_FMT_YUV411P &&
2828 pix_fmt != PIX_FMT_GRAY8)
2828 return -1; 2829 return -1;
2829 if ((width & 3) != 0 || (height & 3) != 0) 2830 if ((width & 3) != 0 || (height & 3) != 0)
2830 return -1; 2831 return -1;
2831 2832
2832 for(i=0;i<3;i++) { 2833 for(i=0;i<3;i++) {
2843 width >>= 2; 2844 width >>= 2;
2844 break; 2845 break;
2845 default: 2846 default:
2846 break; 2847 break;
2847 } 2848 }
2849 if (pix_fmt == PIX_FMT_GRAY8) {
2850 break;
2851 }
2848 } 2852 }
2849 if (src == dst) { 2853 if (src == dst) {
2850 deinterlace_bottom_field_inplace(dst->data[i], dst->linesize[i], 2854 deinterlace_bottom_field_inplace(dst->data[i], dst->linesize[i],
2851 width, height); 2855 width, height);
2852 } else { 2856 } else {