On Tue, Jan 20, 2015 at 09:51:25PM +0000, Kieran Kunhya wrote: > > + for(p=0; p<3; p++) { > > + int h = f->height; > > + int w = f->width; > > + if (p) { > > + w >>= h_chroma_shift; > > + h >>= v_chroma_shift; > > + } > > + for(y=field; y<h && (y^1)<h; y+=2) { > > + memcpy(&f->data[p][ (y^1)*f->linesize[p] ], > > + &f->data[p][ y*f->linesize[p] ], w); > > + } > > Can this not be written with a standard function?
yes, its overall 3 lines shorter as well ive locally changed it to this: + for (p = 0; p<4; p++) { + dst_data[p] = f->data[p] + (field^1)*f->linesize[p]; + src_data[p] = f->data[p] + field *f->linesize[p]; + linesizes[p] = 2*f->linesize[p]; + } + + av_image_copy(dst_data, linesizes, src_data, linesizes, + f->format, f->width, f->height>>1) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel