--- libmpeg3-1.5.4.orig/Makefile +++ libmpeg3-1.5.4/Makefile @@ -1,8 +1,8 @@ CC = gcc NASM = nasm USE_MMX = 0 -USE_CSS = 1 -A52DIR := $(shell expr a52dec* ) +USE_CSS = 0 +A52DIR := /usr/include/a52dec @@ -13,35 +13,39 @@ endif -OBJDIR := $(shell uname --machine) +OBJDIR := $(shell dpkg --print-architecture) +ifeq ($(strip $(prefix)),) +PREFIX=/usr +else +PREFIX=$(prefix) +endif ifeq ($(OBJDIR), alpha) USE_MMX = 0 - ifneq ($(HAVE_CFLAGS), y) - CFLAGS := -O4 -arch ev67 -ieee -accept c99_keywords -gcc_messages - endif + # In which gcc could you use these flags? + #CFLAGS := -O4 -arch ev67 -mieee -accept c99_keywords -gcc_messages + ADD_CFLAGS := -O4 -mieee endif -ifeq ($(OBJDIR), i686) - USE_MMX = 1 - ifneq ($(HAVE_CFLAGS), y) - CFLAGS := -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/local/include - endif - CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +ifeq ($(OBJDIR), i386) + USE_MMX = 0 + ADD_CFLAGS := -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE endif ifeq ($(OBJDIR), x86_64) - ifneq ($(HAVE_CFLAGS), y) - CFLAGS := -O2 -fomit-frame-pointer -I/usr/local/include - endif - CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + ADD_CFLAGS := -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +endif +ifndef ADD_CFLAGS + # This is not a "supported" architecture. Fall on defaults. + ADD_CFLAGS := -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE endif +CFLAGS += $(ADD_CFLAGS) ifeq ($(USE_CSS), 1) @@ -61,8 +65,7 @@ CFLAGS += \ -I. \ - -I$(A52DIR)/include \ - -I$(A52DIR)/liba52 + -I$(A52DIR) #CFLAGS += -g @@ -74,7 +77,6 @@ - OBJS = \ $(OBJDIR)/audio/ac3.o \ $(OBJDIR)/audio/dct.o \ @@ -108,6 +110,9 @@ $(OBJDIR)/video/vlc.o \ $(OBJDIR)/workarounds.o +SOBJS = $(OBJS:.o=.lo) +.SUFFIXES: .lo + #OBJS = \ # $(OBJDIR)/audio/ac3.o \ # $(OBJDIR)/audio/bit_allocation.o \ @@ -127,42 +132,51 @@ $(OBJDIR)/audio \ $(OBJDIR)/video -include Makefile.a52 -DIRS += $(A52DIRS) +SHLIB=libmpeg3.so +SHLIB_FULLNAME=$(SHLIB).$(version) +SHLIB_SONAME=$(SHLIB).$(major) OUTPUT = $(OBJDIR)/libmpeg3.a +SHAREDOUTPUT = $(OBJDIR)/$(SHLIB_FULLNAME) UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mpeg3toc $(OBJDIR)/mpeg3cat #$(OBJDIR)/mpeg3split -LIBS = -lm -lpthread +LIBS = -lm -lpthread -la52 -$(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi ) +$(shell if ! test -d $(OBJDIR) ; then mkdir -p $(OBJDIR) ; fi ) $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) -$(shell echo $(A52CFLAGS) > $(OBJDIR)/a52_flags) $(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs) $(shell mkdir -p $(DIRS) ) -all: $(OUTPUT) $(UTILS) +all: $(OUTPUT) $(SHAREDOUTPUT) $(UTILS) $(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS) ar rcs $(OUTPUT) `cat $(OBJDIR)/objs` +$(SHAREDOUTPUT): $(SOBJS) + gcc -shared -fPIC -o $(SHAREDOUTPUT) \ + $(SOBJS) \ + -Wl,-soname -Wl,$(SHLIB_SONAME) $(LIBS) + ( cd $(OBJDIR); \ + ln -sf $(SHLIB_FULLNAME) $(SHLIB); \ + ln -sf $(SHLIB_FULLNAME) $(SHLIB_SONAME) \ + ) $(OBJDIR)/mpeg3dump: $(OUTPUT) mpeg3dump.c - $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3dump mpeg3dump.c $(OUTPUT) $(LIBS) + $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3dump mpeg3dump.c $(SHAREDOUTPUT) $(OBJDIR)/mpeg3toc: $(OUTPUT) mpeg3toc.c - $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3toc mpeg3toc.c $(OUTPUT) $(LIBS) + $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3toc mpeg3toc.c $(SHAREDOUTPUT) $(OBJDIR)/mpeg3cat: $(OUTPUT) mpeg3cat.c - $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3cat mpeg3cat.c $(OUTPUT) $(LIBS) + $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3cat mpeg3cat.c $(SHAREDOUTPUT) #$(OBJDIR)/mpeg3split: $(OUTPUT) # $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS) @@ -179,7 +193,17 @@ -ldl install: - cp $(UTILS) /usr/bin + install -d $(PREFIX)/bin + install -m 755 $(UTILS) $(PREFIX)/bin + + install -d $(PREFIX)/lib + cp -dp $(OUTPUT) $(SHAREDOUTPUT) $(OBJDIR)/$(SHLIB_SONAME) $(PREFIX)/lib + + install -d $(PREFIX)/include/audio + install -d $(PREFIX)/include/video + install -m 644 *.h $(PREFIX)/include + install -m 644 audio/*.h $(PREFIX)/include/audio + install -m 644 video/*.h $(PREFIX)/include/video clean: rm -rf $(OBJDIR) @@ -192,7 +216,9 @@ cat *.c *.h audio/*.c audio/*.h video/*.c video/*.h | wc $(OBJS): - $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o + $(CC) -c -D_REENTRANT `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o +$(SOBJS): + $(CC) -c -D_REENTRANT -fPIC `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.lo $(ASMOBJS): $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.S) -o $*.o $(NASMOBJS): --- libmpeg3-1.5.4.orig/audio/Makefile +++ libmpeg3-1.5.4/audio/Makefile @@ -18,7 +18,7 @@ all: $(OBJS) .c.o: - $(CC) -c `./c_flags` $*.c + $(CC) -c -fPIC `./c_flags` $*.c .s.o: $(CC) -f elf $*.s --- libmpeg3-1.5.4.orig/debian/README.Debian +++ libmpeg3-1.5.4/debian/README.Debian @@ -0,0 +1,12 @@ +libmpeg3 for Debian +------------------- + +ALL CSS CODE HAS BEEN REMOVED for distribution in Debian, since Debian is not +distributing CSS code at this time. The original tarball with CSS support +included is available from the authors' website at +http://heroines.sourceforge.net/libmpeg3.php3. If you replace the tarball that +Debian distributes with the tarball from this web site and define the symbol +HAVE_CSS, you should be able to build the package with CSS support. + + + -- David Martínez Moreno , Wed, 20 Mar 2002 14:05:10 +0100 --- libmpeg3-1.5.4.orig/debian/changelog +++ libmpeg3-1.5.4/debian/changelog @@ -0,0 +1,169 @@ +libmpeg3 (1.5.4-5.1ubuntu1) utopic; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - Makefile: Change parameter order in call to linker to avoid build errors + with -Wl,--as-needed. + + -- Logan Rosen Fri, 02 May 2014 12:28:55 -0400 + +libmpeg3 (1.5.4-5.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix stack overflow in read_toc. (Closes: #729275) + + -- Johannes Brandstätter Sat, 26 Apr 2014 21:13:35 +0200 + +libmpeg3 (1.5.4-5ubuntu1) oneiric; urgency=low + + * Makefile: Changed parameter order in call to linker to avoid build errors + with -Wl,--as-needed (LP: #770863) + + -- Sebastian Carneiro Wed, 06 Jul 2011 22:57:10 +0200 + +libmpeg3 (1.5.4-5) unstable; urgency=low + + * Fixed syntax in Makefile for compatibility with new make. Thanks, Daniel + Schepler (closes: #350689). + * Acknowledge NMU from Steve (closes: #287422). + * debian/control: Bumped Standards-Version to 3.6.2.2. + * debian/copyright: Updated FSF's address. + + -- David Martínez Moreno Fri, 3 Feb 2006 02:13:40 +0100 + +libmpeg3 (1.5.4-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Medium-urgency upload for RC bugfix. + * Fix up invalid lvalues for compatibility with the stricter gcc 4.0 + compiler (closes: #287422). + + -- Steve Langasek Fri, 5 Aug 2005 16:19:17 -0700 + +libmpeg3 (1.5.4-4) unstable; urgency=low + + * debian/rules: Added more severe dependencies for mpeg3-utils (closes: + #242617). + + -- David Martínez Moreno Sat, 10 Apr 2004 17:31:12 +0200 + +libmpeg3 (1.5.4-3) unstable; urgency=low + + * Added #define __USE_LARGEFILE64 in mpeg3private.h for finally resolving + the FTBFS in Alpha. + + -- David Martínez Moreno Wed, 7 Apr 2004 19:57:05 +0200 + +libmpeg3 (1.5.4-2) unstable; urgency=low + + * Newly forgot to compile objects for the shared library with fPIC. I did + read again the 10.2 chapter of the Debian Policy Manual. Good book. + Everyone should have a copy on their bed table (closes: #241696). + * Added SOBJS target to main Makefile in order to manage the desired effect, + also with a .SUFFIXES line for .lo files. + * Compiled library with -D_REENTRANT (Good 10.2 chapter)... + + -- David Martínez Moreno Tue, 6 Apr 2004 10:33:16 +0200 + +libmpeg3 (1.5.4-1) unstable; urgency=low + + * New upstream release (closes: #226699). + * Removed a52dec and mpeg2dec from the original tarball, as they are + included in Debian (and btw mpeg2dec isn't used at all in the build). + * debian/control: + - Added Build-Depends on liba52dec-dev. + - I'm stupid (again). I didn't corrected the description that a nice user + sent to me in #142146. Anyway, it is *in*, now. + - Bring libmpeg3 from the Pleistocene to modern times. Bumped debhelper + dependency to >= 4.0.0. Changed debian/compat accordingly. + - Bumped Standards-Version to 3.6.1. Some changes in DEB_BUILD_OPTIONS, + and that's all, folks. + - Finally remembered to move libmpeg3-dev from devel -> libdevel. + * Cleaned up some bad UTF-8 entries in changelog and control files. + * debian/rules: Added "version" and "major" variables for building the + shared library. + * Finally splitted the software in binary and library packages (closes: + #145758). + + -- David Martínez Moreno Mon, 22 Mar 2004 02:09:19 +0100 + +libmpeg3 (1.5-6) unstable; urgency=low + + * The "Fast surikato" release. + * debian/changelog, debian/control: Recoded into UTF-8, finally. + * I forgot to fix the -ieee Alpha gcc flag in the previous release. Fixed + (closes: #204021). Thanks to Guillem for his continuous mails and tireless + IRC queries... ;-) + * Added debian/compat (=3). Tightened thus dependency on debhelper >= 3.4.4. + + -- David Martínez Moreno Fri, 28 Nov 2003 12:45:08 +0100 + +libmpeg3 (1.5-5) unstable; urgency=low + + * The "Surikato release". + * Thanks to Guillem Jover for pushing hard for this release. + * Fixed finally the -fPIC issue (closes: #193993). + * Fixed many other things, like warnings, specific dependencies specified, + utilities finally dynamic-linked, and cleaned up the Makefile. Thanks + again, Guillem. + * Fixed the description (there's no MPEG-3 standard, really) (closes: + #142146). + + -- David Martínez Moreno Tue, 11 Nov 2003 19:47:41 +0100 + +libmpeg3 (1.5-4) unstable; urgency=low + + * Ooops...hppa build failed due to missing fPIC in the shared object + building...added. + + -- David Martínez Moreno Fri, 5 Apr 2002 10:26:51 +0200 + +libmpeg3 (1.5-3) unstable; urgency=medium + + * I don't know what happened. The header files are a complete mess. Oh, I + see...a typo, slipped in my modifications to the main Makefile; kindly + spotted by Klaus Ethgen (closes: #140945). Thanks, guy. :o) + * After thinking, changed back Architecture to any. I think it can't hurt + us. + * Cleaned a bit debian/rules. + + -- David Martínez Moreno Thu, 4 Apr 2002 17:38:56 +0200 + +libmpeg3 (1.5-2) unstable; urgency=high + + * The 'I was very busy with my vacations and forgot how to package' release. + * Priority set to high because the previous package simply didn't include + the shared library (ooops x 10). + * debian/rules: + - This package really ships libmpeg3.so.1.5.0 (closes: #140158). + - Cleaned some things I've left from Christian's diff (more to come). + - 'Debhelper'ized a lot more. + - Removed CFLAGS from here and patched the Makefile for using the + corresponding CFLAGS per architecture. This, with additional massaging + in the Alpha CFLAGS, finally allows building in Alpha (closes: #140473). + * debian/control: + - Removed nasm from Build-Depends because it's only needed for MMX support + (not set up in the Debian build). + - Changed Architectures field from 'any' to 'i386 alpha' (missed in + 1.5-1). + - Changed Description to reflect the inclusion of several utilities in the + package. + * Added some documentation in the -dev package. + * Now libmpeg3 honors DEB_BUILD_OPTIONS. + + -- David Martínez Moreno Sun, 31 Mar 2002 20:34:33 +0200 + +libmpeg3 (1.5-1) unstable; urgency=high + + * I need to package this because xmovie depends on it (and I was using the + unofficial packages from Christian Marillat). + * The priority is due to the fact that xmovie is in incoming since 10 Mar or + so, and its dependencies cannot be satisfied. + * Stripped all the CSS code in the original tarball, thus moving this into + main. + * I've used much of the work done by Joshua Haberman and Christian Marillat. + Thank you, guys. + * debian/rules: Used the one from Christian with little changes. I'd like to + change it completely to DHv3, but I want to release this as soon as + possible. + + -- David Martínez Moreno Fri, 22 Mar 2002 01:54:56 +0100 --- libmpeg3-1.5.4.orig/debian/compat +++ libmpeg3-1.5.4/debian/compat @@ -0,0 +1 @@ +4 --- libmpeg3-1.5.4.orig/debian/control +++ libmpeg3-1.5.4/debian/control @@ -0,0 +1,46 @@ +Source: libmpeg3 +Section: libs +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: David Martínez Moreno +Standards-Version: 3.6.2.2 +Build-Depends: debhelper (>= 4.0.0), liba52-dev + +Package: mpeg3-utils +Architecture: any +Section: utils +Depends: ${shlibs:Depends} +Description: MPEG streams decoding library + LibMPEG3 is a versatile and high-performance library capable + of decoding both audio and video from many different MPEG formats. + . + This package includes several utilities for working with MPEG2 streams. + +Package: libmpeg3-1 +Architecture: any +Section: libs +Depends: ${shlibs:Depends} +Description: MPEG streams decoding library + LibMPEG3 is a versatile and high-performance library capable + of decoding both audio and video from many different MPEG formats. + . + LibMPEG3 decodes several MPEG standards into uncompressed + data suitable for editing and playback. It currently decodes: + . + - MPEG-2 video + - MPEG-1 video + - mp3 audio + - mp2 audio + - ac3 audio + - MPEG-2 transport streams + - MPEG-2 program streams + - MPEG-1 program streams + - IFO files + +Package: libmpeg3-dev +Architecture: any +Section: libdevel +Depends: libmpeg3-1 (= ${Source-Version}) +Description: Headers and static libraries for libMPEG3 + Headers and static libraries for the libMPEG3 decoding + library. Refer to libmpeg3-1 package for description. --- libmpeg3-1.5.4.orig/debian/copyright +++ libmpeg3-1.5.4/debian/copyright @@ -0,0 +1,23 @@ +This package was first debianized by David Martínez on +Thu, 21 Mar 2002 10:21:03 +0100 + +It was downloaded from http://heroines.sourceforge.net/libmpeg3-1.5.4.tar.gz + +Upstream Author: Adam Williams + +Copyright: + +libmpeg3 is free software; you can redistribute it and/or modify it under the +terms of the GNU General Public License as published by the Free Software +Foundation; either version 2, or (at your option) any later version. + +libmpeg3 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 +GNU Make; see the file COPYING. If not, write to the Free Software Foundation, +Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- libmpeg3-1.5.4.orig/debian/libmpeg3-1.dirs +++ libmpeg3-1.5.4/debian/libmpeg3-1.dirs @@ -0,0 +1 @@ +usr/lib --- libmpeg3-1.5.4.orig/debian/libmpeg3-1.install +++ libmpeg3-1.5.4/debian/libmpeg3-1.install @@ -0,0 +1 @@ +usr/lib/*.so.* --- libmpeg3-1.5.4.orig/debian/libmpeg3-dev.dirs +++ libmpeg3-1.5.4/debian/libmpeg3-dev.dirs @@ -0,0 +1,4 @@ +usr/lib +usr/include +usr/include/audio +usr/include/video --- libmpeg3-1.5.4.orig/debian/libmpeg3-dev.docs +++ libmpeg3-1.5.4/debian/libmpeg3-dev.docs @@ -0,0 +1 @@ +docs/index.html --- libmpeg3-1.5.4.orig/debian/libmpeg3-dev.install +++ libmpeg3-1.5.4/debian/libmpeg3-dev.install @@ -0,0 +1,2 @@ +usr/include/* +usr/lib/*.a --- libmpeg3-1.5.4.orig/debian/mpeg3-utils.dirs +++ libmpeg3-1.5.4/debian/mpeg3-utils.dirs @@ -0,0 +1 @@ +/usr/bin --- libmpeg3-1.5.4.orig/debian/mpeg3-utils.install +++ libmpeg3-1.5.4/debian/mpeg3-utils.install @@ -0,0 +1 @@ +usr/bin --- libmpeg3-1.5.4.orig/debian/rules +++ libmpeg3-1.5.4/debian/rules @@ -0,0 +1,80 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +# Copyright 2002 David Martínez + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Honor DEB_BUILD_OPTIONS!!! +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -g -Wall +else +CFLAGS += -g +endif + + +# shared library versions +version=1.5.4 +major=1 + +export CFLAGS version major + +build: build-stamp +build-stamp: + dh_testdir + + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr + + dh_install --sourcedir=debian/tmp + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installman + dh_installchangelogs + +# Needed link for libmpeg3.so.1 -> libmpeg3.so.$(major) + dh_link -plibmpeg3-$(major) /usr/lib/libmpeg3.so.$(version) /usr/lib/libmpeg3.so.$(major) + +# Needed link for libmpeg3.so -> libmpeg3.so.$(major) + dh_link -plibmpeg3-dev /usr/lib/libmpeg3.so.$(version) /usr/lib/libmpeg3.so + + dh_link + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs -V + dh_installdeb + dh_shlibdeps -ldebian/libmpeg3-$(major)/usr/lib/ + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- libmpeg3-1.5.4.orig/libmpeg3.c +++ libmpeg3-1.5.4/libmpeg3.c @@ -277,7 +277,7 @@ // Titles while(buffer[position] == TITLE_PATH) { - char string[MPEG3_STRLEN]; + char string[MPEG3_STRLEN+1]; int string_len = 0; mpeg3_title_t *title; FILE *test_fd; @@ -289,7 +289,18 @@ strcpy(string, RENDERFARM_FS_PREFIX); string_len = vfs_len; } - while(buffer[position] != 0) string[string_len++] = buffer[position++]; + while(buffer[position] != 0) + { + if (string_len < MPEG3_STRLEN) + { + string[string_len++] = buffer[position++]; + } + else + { + fprintf(stderr, "read_toc: invalid string len\n"); + return 1; + } + } string[string_len++] = 0; position++; --- libmpeg3-1.5.4.orig/mpeg3private.h +++ libmpeg3-1.5.4/mpeg3private.h @@ -5,7 +5,10 @@ #include #include - +/* We need this define to access stat64 struct on Alpha */ +#ifndef __USE_LARGEFILE64 +#define __USE_LARGEFILE64 +#endif /* Constants */ --- libmpeg3-1.5.4.orig/video/Makefile +++ libmpeg3-1.5.4/video/Makefile @@ -19,7 +19,7 @@ all: $(OBJS) $(MMXOBJS2) .c.o: - $(CC) -c `./c_flags` $*.c + $(CC) -c -fPIC `./c_flags` $*.c .s.o: $(NASM) -f elf $*.s --- libmpeg3-1.5.4.orig/video/output.c +++ libmpeg3-1.5.4/video/output.c @@ -497,10 +497,11 @@ *data++ = 0; #define STORE_PIXEL_RGB565 \ - *((unsigned short*)data)++ = \ + *((unsigned short*)data) = \ ((CLIP(r_l) & 0xf8) << 8) | \ ((CLIP(g_l) & 0xfc) << 3) | \ - ((CLIP(b_l) & 0xf8) >> 3); + ((CLIP(b_l) & 0xf8) >> 3); \ + data = ((unsigned short*)data) + 1; #define STORE_PIXEL_RGB888 \ *data++ = CLIP(r_l); \