comparison imgconvert.c @ 1425:f53d31c5eac9 libavcodec

* ffmpeg was *silently* rejecting to deinterlace NTSC DV. The problem is generic for any video with yuv411. Seems like a trivial fix, but we really have to clean up all of the pix_fmt business a bit more.
author romansh
date Tue, 26 Aug 2003 22:05:12 +0000
parents cfc80b3a4ada
children 766a2f4edbea
comparison
equal deleted inserted replaced
1424:39ebefd82728 1425:f53d31c5eac9
2131 { 2131 {
2132 int i; 2132 int i;
2133 2133
2134 if (pix_fmt != PIX_FMT_YUV420P && 2134 if (pix_fmt != PIX_FMT_YUV420P &&
2135 pix_fmt != PIX_FMT_YUV422P && 2135 pix_fmt != PIX_FMT_YUV422P &&
2136 pix_fmt != PIX_FMT_YUV444P) 2136 pix_fmt != PIX_FMT_YUV444P &&
2137 pix_fmt != PIX_FMT_YUV411P)
2137 return -1; 2138 return -1;
2138 if ((width & 3) != 0 || (height & 3) != 0) 2139 if ((width & 3) != 0 || (height & 3) != 0)
2139 return -1; 2140 return -1;
2140 2141
2141 for(i=0;i<3;i++) { 2142 for(i=0;i<3;i++) {
2146 height >>= 1; 2147 height >>= 1;
2147 break; 2148 break;
2148 case PIX_FMT_YUV422P: 2149 case PIX_FMT_YUV422P:
2149 width >>= 1; 2150 width >>= 1;
2150 break; 2151 break;
2152 case PIX_FMT_YUV411P:
2153 width >>= 2;
2154 break;
2151 default: 2155 default:
2152 break; 2156 break;
2153 } 2157 }
2154 } 2158 }
2155 if (src == dst) { 2159 if (src == dst) {