summaryrefslogtreecommitdiff
path: root/libavcodec/videodsp.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-09-20 08:01:19 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2013-09-28 20:28:08 -0400
commitface578d56c2d1375e40d5e2a28acc122132bc55 (patch)
tree8a4fe63c8066b59ea41dd09285b4a82587a65030 /libavcodec/videodsp.h
parentf574b4da567cc1c175ab5463fb5b3901cbaa5595 (diff)
downloadffmpeg-face578d56c2d1375e40d5e2a28acc122132bc55.tar.gz
Rewrite emu_edge functions to have separate src/dst_stride arguments.
This allows supporting files for which the image stride is smaller than the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file or a 16x16 VP8 file with -fflags +emu_edge.
Diffstat (limited to 'libavcodec/videodsp.h')
-rw-r--r--libavcodec/videodsp.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/libavcodec/videodsp.h b/libavcodec/videodsp.h
index e397720773..e85dff355c 100644
--- a/libavcodec/videodsp.h
+++ b/libavcodec/videodsp.h
@@ -30,9 +30,10 @@
#include <stdint.h>
#define EMULATED_EDGE(depth) \
-void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, ptrdiff_t linesize,\
- int block_w, int block_h,\
- int src_x, int src_y, int w, int h);
+void ff_emulated_edge_mc_ ## depth(uint8_t *dst, ptrdiff_t dst_stride, \
+ const uint8_t *src, ptrdiff_t src_stride, \
+ int block_w, int block_h,\
+ int src_x, int src_y, int w, int h);
EMULATED_EDGE(8)
EMULATED_EDGE(16)
@@ -42,10 +43,12 @@ typedef struct VideoDSPContext {
* Copy a rectangular area of samples to a temporary buffer and replicate
* the border samples.
*
- * @param buf destination buffer
+ * @param dst destination buffer
+ * @param dst_stride number of bytes between 2 vertically adjacent samples
+ * in destination buffer
* @param src source buffer
- * @param linesize number of bytes between 2 vertically adjacent samples
- * in both the source and destination buffers
+ * @param src_stride number of bytes between 2 vertically adjacent samples
+ * in source buffer
* @param block_w width of block
* @param block_h height of block
* @param src_x x coordinate of the top left sample of the block in the
@@ -55,8 +58,9 @@ typedef struct VideoDSPContext {
* @param w width of the source buffer
* @param h height of the source buffer
*/
- void (*emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
- ptrdiff_t linesize, int block_w, int block_h,
+ void (*emulated_edge_mc)(uint8_t *dst, ptrdiff_t dst_stride,
+ const uint8_t *src, ptrdiff_t src_stride,
+ int block_w, int block_h,
int src_x, int src_y, int w, int h);
/**