~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavcodec/vp3dsp.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * source code.
25
25
 */
26
26
 
 
27
#include "libavutil/attributes.h"
 
28
#include "libavutil/common.h"
27
29
#include "avcodec.h"
28
30
#include "dsputil.h"
 
31
#include "vp3dsp.h"
29
32
 
30
33
#define IdctAdjustBeforeShift 8
31
34
#define xC1S7 64277
210
213
    }
211
214
}
212
215
 
213
 
void ff_vp3_idct_c(DCTELEM *block/* align 16*/){
214
 
    idct(NULL, 0, block, 0);
215
 
}
216
 
 
217
 
void ff_vp3_idct_put_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
 
216
static void vp3_idct_put_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
218
217
    idct(dest, line_size, block, 1);
219
218
}
220
219
 
221
 
void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
 
220
static void vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){
222
221
    idct(dest, line_size, block, 2);
223
222
}
224
223
 
225
 
void ff_vp3_idct_dc_add_c(uint8_t *dest/*align 8*/, int line_size, const DCTELEM *block/*align 16*/){
 
224
static void vp3_idct_dc_add_c(uint8_t *dest/*align 8*/, int line_size,
 
225
                              const DCTELEM *block/*align 16*/){
226
226
    int i, dc = (block[0] + 15) >> 5;
227
227
 
228
228
    for(i = 0; i < 8; i++){
238
238
    }
239
239
}
240
240
 
241
 
void ff_vp3_v_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values)
 
241
static void vp3_v_loop_filter_c(uint8_t *first_pixel, int stride,
 
242
                                int *bounding_values)
242
243
{
243
244
    unsigned char *end;
244
245
    int filter_value;
254
255
    }
255
256
}
256
257
 
257
 
void ff_vp3_h_loop_filter_c(uint8_t *first_pixel, int stride, int *bounding_values)
 
258
static void vp3_h_loop_filter_c(uint8_t *first_pixel, int stride,
 
259
                                int *bounding_values)
258
260
{
259
261
    unsigned char *end;
260
262
    int filter_value;
268
270
        first_pixel[ 0] = av_clip_uint8(first_pixel[ 0] - filter_value);
269
271
    }
270
272
}
 
273
 
 
274
av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags)
 
275
{
 
276
    c->idct_put      = vp3_idct_put_c;
 
277
    c->idct_add      = vp3_idct_add_c;
 
278
    c->idct_dc_add   = vp3_idct_dc_add_c;
 
279
    c->v_loop_filter = vp3_v_loop_filter_c;
 
280
    c->h_loop_filter = vp3_h_loop_filter_c;
 
281
 
 
282
    c->idct_perm = FF_NO_IDCT_PERM;
 
283
 
 
284
    if (ARCH_ARM)
 
285
        ff_vp3dsp_init_arm(c, flags);
 
286
    if (ARCH_PPC)
 
287
        ff_vp3dsp_init_ppc(c, flags);
 
288
    if (ARCH_X86)
 
289
        ff_vp3dsp_init_x86(c, flags);
 
290
}