annotate arm/float_arm_vfp.c @ 10061:09f2db2d7c90 libavcodec

Fix bug caused by difference in stride and picture width. When a frame is allocated using libschroedinger routines, the frame data size does not match the actual frame size if the width is not a multiple of 16. So we cannot do a straightforward memcpy of the frame returned by libschroedinger into the FFmpeg picture as the stride differs from the width. Fix this bug by allocating for the libschroedinger frame with the dimensions in AVCodecContext within libavcodec and passing the frame to libschroedinger. patch by Anuradha Suraparaju, anuradha rd.bbc.co uk
author diego
date Sat, 15 Aug 2009 11:59:53 +0000
parents 7a463923ecd1
children 48be79afc72d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7060
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
1 /*
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
2 * Copyright (c) 2008 Siarhei Siamashka <ssvb@users.sourceforge.net>
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
3 *
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
4 * This file is part of FFmpeg.
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
5 *
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
8 * License as published by the Free Software Foundation; either
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
10 *
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
14 * Lesser General Public License for more details.
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
15 *
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
19 */
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
20
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
21 #include "libavcodec/dsputil.h"
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
22
8250
cf4d575b1982 Delete unnecessary 'extern' keywords.
diego
parents: 8071
diff changeset
23 void ff_vector_fmul_vfp(float *dst, const float *src, int len);
cf4d575b1982 Delete unnecessary 'extern' keywords.
diego
parents: 8071
diff changeset
24 void ff_vector_fmul_reverse_vfp(float *dst, const float *src0,
cf4d575b1982 Delete unnecessary 'extern' keywords.
diego
parents: 8071
diff changeset
25 const float *src1, int len);
cf4d575b1982 Delete unnecessary 'extern' keywords.
diego
parents: 8071
diff changeset
26 void ff_float_to_int16_vfp(int16_t *dst, const float *src, long len);
7060
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
27
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
28 void ff_float_init_arm_vfp(DSPContext* c, AVCodecContext *avctx)
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
29 {
8071
2487a9db02a0 ARM: move VFP DSP functions to dsputils_vfp.S
mru
parents: 8031
diff changeset
30 c->vector_fmul = ff_vector_fmul_vfp;
2487a9db02a0 ARM: move VFP DSP functions to dsputils_vfp.S
mru
parents: 8031
diff changeset
31 c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
8590
7a463923ecd1 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 8359
diff changeset
32 #if HAVE_ARMV6
8071
2487a9db02a0 ARM: move VFP DSP functions to dsputils_vfp.S
mru
parents: 8031
diff changeset
33 c->float_to_int16 = ff_float_to_int16_vfp;
7060
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
34 #endif
9e5b6bf87f76 convert DOS-style carriage return to Unix-style
gpoirier
parents: 6786
diff changeset
35 }