annotate ffmpeg/libavcodec/arm/mpegvideo_arm.c @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * Copyright (c) 2002 Michael Niedermayer
yading@10 3 *
yading@10 4 * This file is part of FFmpeg.
yading@10 5 *
yading@10 6 * FFmpeg is free software; you can redistribute it and/or
yading@10 7 * modify it under the terms of the GNU Lesser General Public
yading@10 8 * License as published by the Free Software Foundation; either
yading@10 9 * version 2.1 of the License, or (at your option) any later version.
yading@10 10 *
yading@10 11 * FFmpeg is distributed in the hope that it will be useful,
yading@10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 14 * Lesser General Public License for more details.
yading@10 15 *
yading@10 16 * You should have received a copy of the GNU Lesser General Public
yading@10 17 * License along with FFmpeg; if not, write to the Free Software
yading@10 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 19 */
yading@10 20
yading@10 21 #include "libavutil/arm/cpu.h"
yading@10 22 #include "libavcodec/avcodec.h"
yading@10 23 #include "libavcodec/mpegvideo.h"
yading@10 24 #include "mpegvideo_arm.h"
yading@10 25 #include "asm-offsets.h"
yading@10 26
yading@10 27 #if HAVE_NEON
yading@10 28 CHK_OFFS(MpegEncContext, y_dc_scale, Y_DC_SCALE);
yading@10 29 CHK_OFFS(MpegEncContext, c_dc_scale, C_DC_SCALE);
yading@10 30 CHK_OFFS(MpegEncContext, ac_pred, AC_PRED);
yading@10 31 CHK_OFFS(MpegEncContext, block_last_index, BLOCK_LAST_INDEX);
yading@10 32 CHK_OFFS(MpegEncContext, inter_scantable.raster_end, INTER_SCANTAB_RASTER_END);
yading@10 33 CHK_OFFS(MpegEncContext, h263_aic, H263_AIC);
yading@10 34 #endif
yading@10 35
yading@10 36 void ff_dct_unquantize_h263_inter_neon(MpegEncContext *s, int16_t *block,
yading@10 37 int n, int qscale);
yading@10 38 void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, int16_t *block,
yading@10 39 int n, int qscale);
yading@10 40
yading@10 41 av_cold void ff_MPV_common_init_arm(MpegEncContext *s)
yading@10 42 {
yading@10 43 int cpu_flags = av_get_cpu_flags();
yading@10 44
yading@10 45 if (have_armv5te(cpu_flags))
yading@10 46 ff_MPV_common_init_armv5te(s);
yading@10 47
yading@10 48 if (have_neon(cpu_flags)) {
yading@10 49 s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_neon;
yading@10 50 s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_neon;
yading@10 51 }
yading@10 52 }