annotate ffmpeg/libavcodec/videodsp.h @ 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) 2012 Ronald S. Bultje
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 /**
yading@10 22 * @file
yading@10 23 * Core video DSP helper functions
yading@10 24 */
yading@10 25
yading@10 26 #ifndef AVCODEC_VIDEODSP_H
yading@10 27 #define AVCODEC_VIDEODSP_H
yading@10 28
yading@10 29 #include <stddef.h>
yading@10 30 #include <stdint.h>
yading@10 31
yading@10 32 #define EMULATED_EDGE(depth) \
yading@10 33 void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, ptrdiff_t linesize,\
yading@10 34 int block_w, int block_h,\
yading@10 35 int src_x, int src_y, int w, int h);
yading@10 36
yading@10 37 EMULATED_EDGE(8)
yading@10 38 EMULATED_EDGE(16)
yading@10 39
yading@10 40 typedef struct VideoDSPContext {
yading@10 41 /**
yading@10 42 * Copy a rectangular area of samples to a temporary buffer and replicate
yading@10 43 * the border samples.
yading@10 44 *
yading@10 45 * @param buf destination buffer
yading@10 46 * @param src source buffer
yading@10 47 * @param linesize number of bytes between 2 vertically adjacent samples
yading@10 48 * in both the source and destination buffers
yading@10 49 * @param block_w width of block
yading@10 50 * @param block_h height of block
yading@10 51 * @param src_x x coordinate of the top left sample of the block in the
yading@10 52 * source buffer
yading@10 53 * @param src_y y coordinate of the top left sample of the block in the
yading@10 54 * source buffer
yading@10 55 * @param w width of the source buffer
yading@10 56 * @param h height of the source buffer
yading@10 57 */
yading@10 58 void (*emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
yading@10 59 ptrdiff_t linesize, int block_w, int block_h,
yading@10 60 int src_x, int src_y, int w, int h);
yading@10 61
yading@10 62 /**
yading@10 63 * Prefetch memory into cache (if supported by hardware).
yading@10 64 *
yading@10 65 * @buf pointer to buffer to prefetch memory from
yading@10 66 * @stride distance between two lines of buf (in bytes)
yading@10 67 * @h number of lines to prefetch
yading@10 68 */
yading@10 69 void (*prefetch)(uint8_t *buf, ptrdiff_t stride, int h);
yading@10 70 } VideoDSPContext;
yading@10 71
yading@10 72 void ff_videodsp_init(VideoDSPContext *ctx, int bpc);
yading@10 73
yading@10 74 /* for internal use only (i.e. called by ff_videodsp_init() */
yading@10 75 void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc);
yading@10 76 void ff_videodsp_init_ppc(VideoDSPContext *ctx, int bpc);
yading@10 77 void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc);
yading@10 78
yading@10 79 #endif /* AVCODEC_VIDEODSP_H */