aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-26 15:36:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-26 15:36:27 +0100
commit2d15e0c01dfd36270508a37004b1ef778198dd0c (patch)
tree535f5f31138ed3e46c1dccb7887ac39661e7b168
parentb4f64c58fc80585b9dc46f6ac6e385b2d55260a7 (diff)
parent92ba965103d3884609730ba9bf293772dc78a9ef (diff)
downloadffmpeg-2d15e0c01dfd36270508a37004b1ef778198dd0c.tar.gz
Merge commit '92ba965103d3884609730ba9bf293772dc78a9ef'
* commit '92ba965103d3884609730ba9bf293772dc78a9ef': dsputil: Move draw_edges and clear_block* out of dsputil_template Conflicts: libavcodec/dsputil.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dsputil.c38
-rw-r--r--libavcodec/dsputil_template.c40
2 files changed, 38 insertions, 40 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index b1239a5995..cfa8b768c6 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2550,6 +2550,44 @@ static void ff_jref_idct1_add(uint8_t *dest, int line_size, int16_t *block)
dest[0] = av_clip_uint8(dest[0] + ((block[0] + 4)>>3));
}
+/* draw the edges of width 'w' of an image of size width, height */
+// FIXME: Check that this is OK for MPEG-4 interlaced.
+static void draw_edges_8_c(uint8_t *buf, int wrap, int width, int height,
+ int w, int h, int sides)
+{
+ uint8_t *ptr = buf, *last_line;
+ int i;
+
+ /* left and right */
+ for (i = 0; i < height; i++) {
+ memset(ptr - w, ptr[0], w);
+ memset(ptr + width, ptr[width - 1], w);
+ ptr += wrap;
+ }
+
+ /* top and bottom + corners */
+ buf -= w;
+ last_line = buf + (height - 1) * wrap;
+ if (sides & EDGE_TOP)
+ for (i = 0; i < h; i++)
+ // top
+ memcpy(buf - (i + 1) * wrap, buf, width + w + w);
+ if (sides & EDGE_BOTTOM)
+ for (i = 0; i < h; i++)
+ // bottom
+ memcpy(last_line + (i + 1) * wrap, last_line, width + w + w);
+}
+
+static void clear_block_8_c(int16_t *block)
+{
+ memset(block, 0, sizeof(int16_t) * 64);
+}
+
+static void clear_blocks_8_c(int16_t *blocks)
+{
+ memset(blocks, 0, sizeof(int16_t) * 6 * 64);
+}
+
/* init static data */
av_cold void ff_dsputil_static_init(void)
{
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c
index bcb7db7e21..95d966e721 100644
--- a/libavcodec/dsputil_template.c
+++ b/libavcodec/dsputil_template.c
@@ -27,46 +27,6 @@
* DSP utils
*/
-#include "pixels.h"
-
-/* draw the edges of width 'w' of an image of size width, height */
-// FIXME: Check that this is OK for MPEG-4 interlaced.
-static void draw_edges_8_c(uint8_t *buf, int wrap, int width, int height,
- int w, int h, int sides)
-{
- uint8_t *ptr = buf, *last_line;
- int i;
-
- /* left and right */
- for (i = 0; i < height; i++) {
- memset(ptr - w, ptr[0], w);
- memset(ptr + width, ptr[width - 1], w);
- ptr += wrap;
- }
-
- /* top and bottom + corners */
- buf -= w;
- last_line = buf + (height - 1) * wrap;
- if (sides & EDGE_TOP)
- for (i = 0; i < h; i++)
- // top
- memcpy(buf - (i + 1) * wrap, buf, width + w + w);
- if (sides & EDGE_BOTTOM)
- for (i = 0; i < h; i++)
- // bottom
- memcpy(last_line + (i + 1) * wrap, last_line, width + w + w);
-}
-
-static void clear_block_8_c(int16_t *block)
-{
- memset(block, 0, sizeof(int16_t) * 64);
-}
-
-static void clear_blocks_8_c(int16_t *blocks)
-{
- memset(blocks, 0, sizeof(int16_t) * 6 * 64);
-}
-
#define PIXOP2(OPNAME, OP) \
static inline void OPNAME ## _no_rnd_pixels8_l2_8(uint8_t *dst, \
const uint8_t *src1, \