Mercurial > libavcodec.hg
comparison imgconvert.c @ 64:5aa6292a1660 libavcodec
win32 fixes
author | glantau |
---|---|
date | Mon, 13 Aug 2001 21:48:05 +0000 |
parents | 1d796bdb2c2a |
children | 40d8092e2ff0 |
comparison
equal
deleted
inserted
replaced
63:8e2d8dbf89a5 | 64:5aa6292a1660 |
---|---|
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License | 15 * You should have received a copy of the GNU General Public License |
16 * along with this program; if not, write to the Free Software | 16 * along with this program; if not, write to the Free Software |
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 */ | 18 */ |
19 #include <stdlib.h> | |
20 #include <stdio.h> | |
21 #include <string.h> | |
22 | |
23 #include "avcodec.h" | 19 #include "avcodec.h" |
24 #include "dsputil.h" | 20 #include "dsputil.h" |
25 | 21 |
26 #ifdef USE_FASTMEMCPY | 22 #ifdef USE_FASTMEMCPY |
27 #include "fastmemcpy.h" | 23 #include "fastmemcpy.h" |
479 UINT8 *src1, int src_wrap, | 475 UINT8 *src1, int src_wrap, |
480 int width, int height) | 476 int width, int height) |
481 { | 477 { |
482 UINT8 *src, *ptr; | 478 UINT8 *src, *ptr; |
483 int y, y1, i; | 479 int y, y1, i; |
484 UINT8 buf[5 * width]; | 480 UINT8 *buf; |
481 | |
482 buf= (UINT8*) malloc(5 * width); | |
485 | 483 |
486 src = src1; | 484 src = src1; |
487 for(y=0;y<height;y+=2) { | 485 for(y=0;y<height;y+=2) { |
488 /* copy top field line */ | 486 /* copy top field line */ |
489 memcpy(dst, src, width); | 487 memcpy(dst, src, width); |
509 deinterlace_line(dst, buf, width, width); | 507 deinterlace_line(dst, buf, width, width); |
510 } | 508 } |
511 dst += dst_wrap; | 509 dst += dst_wrap; |
512 src += (2 + 1) * src_wrap; | 510 src += (2 + 1) * src_wrap; |
513 } | 511 } |
512 free(buf); | |
514 } | 513 } |
515 | 514 |
516 | 515 |
517 /* deinterlace, return -1 if format not handled */ | 516 /* deinterlace, return -1 if format not handled */ |
518 int avpicture_deinterlace(AVPicture *dst, AVPicture *src, | 517 int avpicture_deinterlace(AVPicture *dst, AVPicture *src, |