summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/alphablend.c
authorharlekin <harlekin>2002-09-24 20:26:17 (UTC)
committer harlekin <harlekin>2002-09-24 20:26:17 (UTC)
commit7a04855af4e042152a47e90192dc4c2c20858e8c (patch) (side-by-side diff)
treecca4567d71b8210dc8905804cebc203b71fc4958 /noncore/multimedia/opieplayer2/alphablend.c
parent02074fb65c5e879ef1d28e52cf4e1ec4a6727599 (diff)
downloadopie-7a04855af4e042152a47e90192dc4c2c20858e8c.zip
opie-7a04855af4e042152a47e90192dc4c2c20858e8c.tar.gz
opie-7a04855af4e042152a47e90192dc4c2c20858e8c.tar.bz2
adapted to the new api
Diffstat (limited to 'noncore/multimedia/opieplayer2/alphablend.c') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/alphablend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/alphablend.c b/noncore/multimedia/opieplayer2/alphablend.c
index 57f6013..cdd7b28 100644
--- a/noncore/multimedia/opieplayer2/alphablend.c
+++ b/noncore/multimedia/opieplayer2/alphablend.c
@@ -16,48 +16,50 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* The author may be reached as <dent@linuxvideo.org>
*
*------------------------------------------------------------
*
*/
/*
#define LOG_BLEND_YUV
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
+#include <xine.h>
+#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include "alphablend.h"
#define BLEND_COLOR(dst, src, mask, o) ((((src&mask)*o + ((dst&mask)*(0x0f-o)))/0xf) & mask)
#define BLEND_BYTE(dst, src, o) (((src)*o + ((dst)*(0xf-o)))/0xf)
static void mem_blend16(uint16_t *mem, uint16_t clr, uint8_t o, int len) {
uint16_t *limit = mem + len;
while (mem < limit) {
*mem =
BLEND_COLOR(*mem, clr, 0xf800, o) |
BLEND_COLOR(*mem, clr, 0x07e0, o) |
BLEND_COLOR(*mem, clr, 0x001f, o);
mem++;
}
}
static void mem_blend24(uint8_t *mem, uint8_t r, uint8_t g, uint8_t b,
uint8_t o, int len) {
uint8_t *limit = mem + len*3;
while (mem < limit) {
*mem = BLEND_BYTE(*mem, r, o);