summaryrefslogtreecommitdiffstats
path: root/libass/x86
diff options
context:
space:
mode:
authorDr.Smile <vabnick@gmail.com>2015-06-26 02:14:21 +0300
committerDr.Smile <vabnick@gmail.com>2015-06-26 02:14:21 +0300
commit38a175cad5a894467cb7187ad0187db1ae3f89ff (patch)
treea7262be6620f31c2f0d8df26218c6160c5354f56 /libass/x86
parent88f1fd37fe5785851f069e3dc6939f1ab905f4bc (diff)
downloadlibass-38a175cad5a894467cb7187ad0187db1ae3f89ff.tar.bz2
libass-38a175cad5a894467cb7187ad0187db1ae3f89ff.tar.xz
Switch to virtual function table
Use one pointer to table of functions instead of scattered bunch of function pointers. Different versions of these tables can be constructed in compile time. Also, bitmap memory alignment now depends only on SSE2/AVX2 support and is constant for every width. That simplifies code without noticeable performance penalty.
Diffstat (limited to 'libass/x86')
-rw-r--r--libass/x86/be_blur.h30
-rw-r--r--libass/x86/blend_bitmaps.h56
-rw-r--r--libass/x86/rasterizer.h56
3 files changed, 0 insertions, 142 deletions
diff --git a/libass/x86/be_blur.h b/libass/x86/be_blur.h
deleted file mode 100644
index 2f53ec91..00000000
--- a/libass/x86/be_blur.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2013 Rodger Combs <rcombs@rcombs.me>
- *
- * This file is part of libass.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef INTEL_BE_BLUR_H
-#define INTEL_BE_BLUR_H
-
-void ass_be_blur_sse2( uint8_t *buf, intptr_t width,
- intptr_t height, intptr_t stride,
- uint16_t *tmp);
-
-void ass_be_blur_avx2( uint8_t *buf, intptr_t width,
- intptr_t height, intptr_t stride,
- uint16_t *tmp);
-
-#endif
diff --git a/libass/x86/blend_bitmaps.h b/libass/x86/blend_bitmaps.h
deleted file mode 100644
index 30058ede..00000000
--- a/libass/x86/blend_bitmaps.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2013 Rodger Combs <rcombs@rcombs.me>
- *
- * This file is part of libass.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef INTEL_BLEND_BITMAPS_H
-#define INTEL_BLEND_BITMAPS_H
-
-void ass_add_bitmaps_avx2( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src, intptr_t src_stride,
- intptr_t height, intptr_t width );
-
-void ass_add_bitmaps_sse2( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src, intptr_t src_stride,
- intptr_t height, intptr_t width );
-
-void ass_add_bitmaps_x86( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src, intptr_t src_stride,
- intptr_t height, intptr_t width );
-
-void ass_sub_bitmaps_avx2( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src, intptr_t src_stride,
- intptr_t height, intptr_t width );
-
-void ass_sub_bitmaps_sse2( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src, intptr_t src_stride,
- intptr_t height, intptr_t width );
-
-void ass_sub_bitmaps_x86( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src, intptr_t src_stride,
- intptr_t height, intptr_t width );
-
-void ass_mul_bitmaps_avx2( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src1, intptr_t src1_stride,
- uint8_t *src2, intptr_t src2_stride,
- intptr_t width, intptr_t height );
-
-void ass_mul_bitmaps_sse2( uint8_t *dst, intptr_t dst_stride,
- uint8_t *src1, intptr_t src1_stride,
- uint8_t *src2, intptr_t src2_stride,
- intptr_t width, intptr_t height );
-
-#endif
diff --git a/libass/x86/rasterizer.h b/libass/x86/rasterizer.h
deleted file mode 100644
index 47d72d45..00000000
--- a/libass/x86/rasterizer.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2014 Vabishchevich Nikolay <vabnick@gmail.com>
- *
- * This file is part of libass.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef X86_RASTERIZER_H
-#define X86_RASTERIZER_H
-
-#include <stddef.h>
-#include <stdint.h>
-
-
-struct segment;
-
-void ass_fill_solid_tile16_sse2(uint8_t *buf, ptrdiff_t stride, int set);
-void ass_fill_solid_tile32_sse2(uint8_t *buf, ptrdiff_t stride, int set);
-void ass_fill_halfplane_tile16_sse2(uint8_t *buf, ptrdiff_t stride,
- int32_t a, int32_t b, int64_t c, int32_t scale);
-void ass_fill_halfplane_tile32_sse2(uint8_t *buf, ptrdiff_t stride,
- int32_t a, int32_t b, int64_t c, int32_t scale);
-void ass_fill_generic_tile16_sse2(uint8_t *buf, ptrdiff_t stride,
- const struct segment *line, size_t n_lines,
- int winding);
-void ass_fill_generic_tile32_sse2(uint8_t *buf, ptrdiff_t stride,
- const struct segment *line, size_t n_lines,
- int winding);
-
-void ass_fill_solid_tile16_avx2(uint8_t *buf, ptrdiff_t stride, int set);
-void ass_fill_solid_tile32_avx2(uint8_t *buf, ptrdiff_t stride, int set);
-void ass_fill_halfplane_tile16_avx2(uint8_t *buf, ptrdiff_t stride,
- int32_t a, int32_t b, int64_t c, int32_t scale);
-void ass_fill_halfplane_tile32_avx2(uint8_t *buf, ptrdiff_t stride,
- int32_t a, int32_t b, int64_t c, int32_t scale);
-void ass_fill_generic_tile16_avx2(uint8_t *buf, ptrdiff_t stride,
- const struct segment *line, size_t n_lines,
- int winding);
-void ass_fill_generic_tile32_avx2(uint8_t *buf, ptrdiff_t stride,
- const struct segment *line, size_t n_lines,
- int winding);
-
-
-#endif /* X86_RASTERIZER_H */
-