~siretart/ubuntu/utopic/libav/libav10

« back to all changes in this revision

Viewing changes to libavcodec/hpeldsp.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-11 12:28:45 UTC
  • mfrom: (1.1.22) (2.1.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140511122845-gxvpts83i958y0i5
Tags: 6:10.1-1
* New upstream release 10:
   - pcm-dvd: Fix 20bit decoding (bug/592)
   - avi: Improve non-interleaved detection (bug/666)
   - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
   - arm: hpeldsp: prevent overreads in armv6 asm (bug/646)
   - avfilter: Add missing emms_c when needed
   - rtmpproto: Check the buffer sizes when copying app/playpath strings
   - swscale: Fix an undefined behaviour
   - vp9: Read the frame size as unsigned
   - dcadec: Use correct channel count in stereo downmix check
   - dcadec: Do not decode the XCh extension when downmixing to stereo
   - matroska: add the Opus mapping
   - matroskadec: read the CodecDelay element
   - rtmpproto: Make sure to pass on the error code if read_connect failed
   - lavr: allocate the resampling buffer with a positive size
   - mp3enc: Properly write bitrate value in XING header (Closes: #736088)
   - golomb: Fix the implementation of get_se_golomb_long
* Drop debian/libav-tools.maintscript. ffserver is no longer found in
  stable, and this seems to cause other problems today (Closes: #742676)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Half-pel DSP functions.
 
3
 * Copyright (c) 2000, 2001 Fabrice Bellard
 
4
 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
 
5
 *
 
6
 * gmc & q-pel & 32/64 bit based MC by Michael Niedermayer <michaelni@gmx.at>
 
7
 *
 
8
 * This file is part of Libav.
 
9
 *
 
10
 * Libav is free software; you can redistribute it and/or
 
11
 * modify it under the terms of the GNU Lesser General Public
 
12
 * License as published by the Free Software Foundation; either
 
13
 * version 2.1 of the License, or (at your option) any later version.
 
14
 *
 
15
 * Libav is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
18
 * Lesser General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU Lesser General Public
 
21
 * License along with Libav; if not, write to the Free Software
 
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
23
 */
 
24
 
 
25
/**
 
26
 * @file
 
27
 * Half-pel DSP functions.
 
28
 */
 
29
 
 
30
#include "libavutil/attributes.h"
 
31
#include "libavutil/intreadwrite.h"
 
32
#include "hpeldsp.h"
 
33
 
 
34
#define BIT_DEPTH 8
 
35
#include "hpeldsp_template.c"
 
36
 
 
37
av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
 
38
{
 
39
#define hpel_funcs(prefix, idx, num) \
 
40
    c->prefix ## _pixels_tab idx [0] = prefix ## _pixels ## num ## _8_c; \
 
41
    c->prefix ## _pixels_tab idx [1] = prefix ## _pixels ## num ## _x2_8_c; \
 
42
    c->prefix ## _pixels_tab idx [2] = prefix ## _pixels ## num ## _y2_8_c; \
 
43
    c->prefix ## _pixels_tab idx [3] = prefix ## _pixels ## num ## _xy2_8_c
 
44
 
 
45
    hpel_funcs(put, [0], 16);
 
46
    hpel_funcs(put, [1],  8);
 
47
    hpel_funcs(put, [2],  4);
 
48
    hpel_funcs(put, [3],  2);
 
49
    hpel_funcs(put_no_rnd, [0], 16);
 
50
    hpel_funcs(put_no_rnd, [1],  8);
 
51
    hpel_funcs(avg, [0], 16);
 
52
    hpel_funcs(avg, [1],  8);
 
53
    hpel_funcs(avg, [2],  4);
 
54
    hpel_funcs(avg, [3],  2);
 
55
    hpel_funcs(avg_no_rnd,, 16);
 
56
 
 
57
    if (ARCH_AARCH64)
 
58
        ff_hpeldsp_init_aarch64(c, flags);
 
59
    if (ARCH_ARM)
 
60
        ff_hpeldsp_init_arm(c, flags);
 
61
    if (ARCH_BFIN)
 
62
        ff_hpeldsp_init_bfin(c, flags);
 
63
    if (ARCH_PPC)
 
64
        ff_hpeldsp_init_ppc(c, flags);
 
65
    if (HAVE_VIS)
 
66
        ff_hpeldsp_init_vis(c, flags);
 
67
    if (ARCH_X86)
 
68
        ff_hpeldsp_init_x86(c, flags);
 
69
}