From f9f803d9d4f7bd4887cd6ad9feb41caa6bf5591f Mon Sep 17 00:00:00 2001 From: jusjoken Date: Sun, 24 Sep 2017 13:52:02 -0500 Subject: [PATCH] Updates for 9.1.7 including changelog [ci release] changes included to build imageLoader and swscale dll's on windows --- CHANGELOG.md | 3 +- build/builddll.sh | 27 ++++++++ installer/wix/SageTVSetup/PreBuild.bat | 10 ++- .../wix/SageTVSetup/Resource/SageTVTheme.wxl | 1 + .../wix/SageTVSetup/Resource/SageTVTheme.xml | 2 + .../wix/SageTVSetup/SageTVVersionInclude.wxi | 4 +- native/include/version.h | 4 +- .../SageTV-LGPL/imageload/Makefile.win | 11 ++-- third_party/SageTV-LGPL/imageload/swscale.c | 66 +++++++++---------- 9 files changed, 82 insertions(+), 46 deletions(-) create mode 100644 build/builddll.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c4f9799..27c21a2d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Version 9.1.7 (?) +## Version 9.1.7 (2017-09-24) * Fix: add support for 2nd tuner of Hauppauge WinTV-dualHD usb tuner stick (Windows). * Changes in the STV set 2017081201 for the next SageTV release v9.1.7.0: * malore menus: Removed random misc adjectives after show titles; only display misc textafter the title if it is a star rating. @@ -13,6 +13,7 @@ * Configuration Wizard playback testing/configuration menu uses the "Default" decoder settings instead of SageTV MPEG decoders. * Detailed Setup -> Customize: renamed extra option to mark channels in guide with non-Zap2it channel IDs to refer to non-Tribune IDs. * Changed Zap2it text to Tribune elsewhere in the STV, since the EPG data fo the old built-in and new SD EPG data both ultimately come from Tribune. +* Fix: resolved 'Grey-scale channel logos are green and half-width' for Windows releases (was fixed for linux in 9.0.8.423 and newer) ## Version 9.1.6 (2017-08-10) * Fix: Various fixes and cleanup on Linux Firewire and DVB. diff --git a/build/builddll.sh b/build/builddll.sh new file mode 100644 index 000000000..749eee146 --- /dev/null +++ b/build/builddll.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +cd ../buildwin +mkdir dll +cd dll + +# build the image library dependencies +cd ../../third_party/codecs/giflib +./configure --with-pic || { echo "Build failed, exiting."; exit 1; } +make # Building utils has an issue. Skip error check. || { echo "Build failed, exiting."; exit 1; } + +cd ../jpeg-6b +./configure CFLAGS=-fPIC || { echo "Build failed, exiting."; exit 1; } +make + +cd ../libpng +./configure --with-pic || { echo "Build failed, exiting."; exit 1; } +make + +cd ../tiff +./configure --with-pic || { echo "Build failed, exiting."; exit 1; } +make + +cd ../../../buildwin/dll + +make -C ../../third_party/SageTV-LGPL/imageload -f Makefile.win || { echo "Build failed, exiting."; exit 1; } +cp ../../third_party/SageTV-LGPL/imageload/*.dll . \ No newline at end of file diff --git a/installer/wix/SageTVSetup/PreBuild.bat b/installer/wix/SageTVSetup/PreBuild.bat index 06a139240..a43bc1b50 100644 --- a/installer/wix/SageTVSetup/PreBuild.bat +++ b/installer/wix/SageTVSetup/PreBuild.bat @@ -87,6 +87,10 @@ if errorlevel 1 goto CopyFailure xcopy "%_supportDir%\SupportBinaries" "%_targetDir%" /i /q /e if errorlevel 1 goto CopyFailure +@REM Copy the imageloader and swscale Binaries - from buildwin\dll +xcopy "%_projectDir%..\..\..\buildwin\dll\*.dll" "%_targetDir%\SageTV" /i /q /e +if errorlevel 1 goto CopyFailure + @REM Copy the elf build files - these for now are stored in this location from a ZIP xcopy "%_supportDir%\elf" "%_targetDir%\SageTV" /i /q /e if errorlevel 1 goto CopyFailure @@ -104,9 +108,11 @@ goto PreBuildSuccess echo Starting pre-build processing for %_configName% @REM Copy the Support Binaries - these are ones where I could not find source -xcopy "%_supportDir%\SupportBinaries\SageTV\ImageLoader.dll" "%_targetDir%\Placeshifter\" /q xcopy "%_supportDir%\SupportBinaries\SageTV\pthreadGC2.dll" "%_targetDir%\Placeshifter\" /q -xcopy "%_supportDir%\SupportBinaries\SageTV\swscale.dll" "%_targetDir%\Placeshifter\" /q +if errorlevel 1 goto CopyFailure + +@REM Copy the imageloader and swscale Binaries - from buildwin\dll +xcopy "%_projectDir%..\..\..\buildwin\dll\*.dll" "%_targetDir%\Placeshifter" /i /q /e if errorlevel 1 goto CopyFailure @REM Copy the thirdparty license diff --git a/installer/wix/SageTVSetup/Resource/SageTVTheme.wxl b/installer/wix/SageTVSetup/Resource/SageTVTheme.wxl index 2de8a3db6..8c5818ffd 100644 --- a/installer/wix/SageTVSetup/Resource/SageTVTheme.wxl +++ b/installer/wix/SageTVSetup/Resource/SageTVTheme.wxl @@ -6,6 +6,7 @@ Setup will install [WixBundleName] on your computer. Click Install to continue, Options to set the install directory or Close to exit. Version [WixBundleVersion] Installer ([SageInstallerVersion]) + Install Folder ([InstallFolder]) Are you sure you want to cancel? Previous version Setup Help diff --git a/installer/wix/SageTVSetup/Resource/SageTVTheme.xml b/installer/wix/SageTVSetup/Resource/SageTVTheme.xml index 4ab77b701..26a9f74e9 100644 --- a/installer/wix/SageTVSetup/Resource/SageTVTheme.xml +++ b/installer/wix/SageTVSetup/Resource/SageTVTheme.xml @@ -24,6 +24,8 @@ #(loc.InstallLicenseLinkText) #(loc.InstallVersion) #(loc.InstallAcceptCheckbox) + - use Options to change + #(loc.InstallFolder) #(loc.InstallerVersion) diff --git a/installer/wix/SageTVSetup/SageTVVersionInclude.wxi b/installer/wix/SageTVSetup/SageTVVersionInclude.wxi index 8521420bb..b7c09dc65 100644 --- a/installer/wix/SageTVSetup/SageTVVersionInclude.wxi +++ b/installer/wix/SageTVSetup/SageTVVersionInclude.wxi @@ -1,9 +1,9 @@ - + - + diff --git a/native/include/version.h b/native/include/version.h index f3cd2fa1f..ed5cfc664 100644 --- a/native/include/version.h +++ b/native/include/version.h @@ -1,10 +1,10 @@ -/* Created by InstallerBuild.ps1 script 12-Aug-2017 09:35 */ +/* Created by InstallerBuild.ps1 script 24-Sep-2017 13:39 */ #define STRINGIZE2(s) #s #define STRINGIZE(s) STRINGIZE2(s) #define VERSION_MAJOR 9 #define VERSION_MINOR 1 -#define VERSION_REVISION 6 +#define VERSION_REVISION 7 #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION #define VER_FILE_VERSION_STR STRINGIZE(VERSION_MAJOR) \ diff --git a/third_party/SageTV-LGPL/imageload/Makefile.win b/third_party/SageTV-LGPL/imageload/Makefile.win index 82f7dd1f4..d3e7dd411 100755 --- a/third_party/SageTV-LGPL/imageload/Makefile.win +++ b/third_party/SageTV-LGPL/imageload/Makefile.win @@ -1,21 +1,20 @@ CC=gcc -#CFLAGS = -c -D_JNI_IMPLEMENTATION -IC:\\jdk1.4\\include -IC:\\jdk1.4\\include\\win32 -CFLAGS = -c -O2 -s -D_JNI_IMPLEMENTATION -I/mingw/include -IC:\\jdk1.4\\include -IC:\\jdk1.4\\include\\win32 -I/usr/local/include -DJava_sage_media_image_ImageLoader_createThumbnail=_Java_sage_media_image_ImageLoader_createThumbnail -DJava_sage_media_image_ImageLoader_loadScaledImageFromFile=_Java_sage_media_image_ImageLoader_loadScaledImageFromFile -DJava_sage_media_image_ImageLoader_freeImage0=_Java_sage_media_image_ImageLoader_freeImage0 -DJava_sage_media_image_ImageLoader_compressImageToFile=_Java_sage_media_image_ImageLoader_compressImageToFile -DJava_sage_media_image_ImageLoader_loadImageDimensionsFromFile=_Java_sage_media_image_ImageLoader_loadImageDimensionsFromFile -DJava_sage_media_image_ImageLoader_scaleRawImage=_Java_sage_media_image_ImageLoader_scaleRawImage +CFLAGS = -c -O2 -s -D_JNI_IMPLEMENTATION -I/mingw/include -IC:\\jdk1.4\\include -IC:\\jdk1.4\\include\\win32 -I/usr/local/include -I../../../native/include -I../../codecs/giflib/lib -DJava_sage_media_image_ImageLoader_createThumbnail=_Java_sage_media_image_ImageLoader_createThumbnail -DJava_sage_media_image_ImageLoader_loadScaledImageFromFile=_Java_sage_media_image_ImageLoader_loadScaledImageFromFile -DJava_sage_media_image_ImageLoader_freeImage0=_Java_sage_media_image_ImageLoader_freeImage0 -DJava_sage_media_image_ImageLoader_compressImageToFile=_Java_sage_media_image_ImageLoader_compressImageToFile -DJava_sage_media_image_ImageLoader_loadImageDimensionsFromFile=_Java_sage_media_image_ImageLoader_loadImageDimensionsFromFile -DJava_sage_media_image_ImageLoader_scaleRawImage=_Java_sage_media_image_ImageLoader_scaleRawImage OBJFILES=imageload.o sage_media_image_ImageLoader.o all: swscale.dll ImageLoader.dll swscale.dll: swscale.o - $(CC) -shared -W1 -o swscale.dll swscale.o -L/mingw/lib -L/usr/local/lib + $(CC) -shared -W -o swscale.dll swscale.o -L/mingw/lib -L/usr/local/lib ImageLoader.dll: $(OBJFILES) - $(CC) -shared -W1 -o ImageLoader.dll $(OBJFILES) -L/mingw/lib -ljpeg -lregif -lpng -lz -L/usr/local/lib -ltiff -L. -lswscale + $(CC) -s -static-libgcc -shared -W -o ImageLoader.dll $(OBJFILES) ../../codecs/giflib/lib/.libs/libgif.a ../../codecs/libpng/.libs/libpng12.a ../../codecs/jpeg-6b/libjpeg.a -lz ../../codecs/tiff/libtiff/.libs/libtiff.a -L. -lswscale imagetest: test.o $(OBJFILES) - $(CC) -o imagetest $(OBJFILES) -L/mingw/lib -ljpeg -lregif -lpng -lz -L/usr/local/lib -ltiff -L. -lswscale + $(CC) -s -static-libgcc test.c -o imagetest.exe $(OBJFILES) ../../codecs/giflib/lib/.libs/libgif.a ../../codecs/libpng/.libs/libpng12.a ../../codecs/jpeg-6b/libjpeg.a -lz ../../codecs/tiff/libtiff/.libs/libtiff.a -L. -lswscale swscale.o: swscale_template.c clean: - rm -f *.o imagetest ImageLoader.dll *.c~ *.h~ swscale.dll + rm -f *.o imagetest ImageLoader.dll *.c~ *.h~ swscale.dll \ No newline at end of file diff --git a/third_party/SageTV-LGPL/imageload/swscale.c b/third_party/SageTV-LGPL/imageload/swscale.c index 49044bd61..533f5b5d5 100644 --- a/third_party/SageTV-LGPL/imageload/swscale.c +++ b/third_party/SageTV-LGPL/imageload/swscale.c @@ -25,7 +25,7 @@ supported Input formats: YV12, I420/IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8/Y800, YVU9/IF09 supported output formats: YV12, I420/IYUV, YUY2, UYVY, {BGR,RGB}{1,4,8,15,16,24,32}, Y8/Y800, YVU9/IF09 {BGR,RGB}{1,4,8,15,16} support dithering - + unscaled special converters (YV12=I420=IYUV, Y800=Y8) YV12 -> {BGR,RGB}{1,4,8,15,16,24,32} x -> x @@ -37,7 +37,7 @@ BGR15 -> BGR16 */ -/* +/* tested special converters (most are tested actually but i didnt write it down ...) YV12 -> BGR16 YV12 -> YV12 @@ -188,7 +188,7 @@ static const uint64_t w1111 attribute_used __attribute__((aligned(8))) = 0 // clipping helper table for C implementations: static unsigned char clip_table[768]; - + const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={ { 1, 3, 1, 3, 1, 3, 1, 3, }, { 2, 0, 2, 0, 2, 0, 2, 0, }, @@ -232,7 +232,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ { 7, 172, 48, 213, 3, 168, 45, 210, }, }; -inline void rgb24to32(const uint8_t *src,uint8_t *dst,long src_size) +static inline void rgb24to32(const uint8_t *src,uint8_t *dst,long src_size) { uint8_t *dest = dst; const uint8_t *s = src; @@ -256,7 +256,7 @@ inline void rgb24to32(const uint8_t *src,uint8_t *dst,long src_size) } } -inline void rgb32to24(const uint8_t *src,uint8_t *dst,long src_size) +static inline void rgb32to24(const uint8_t *src,uint8_t *dst,long src_size) { uint8_t *dest = dst; const uint8_t *s = src; @@ -280,7 +280,7 @@ inline void rgb32to24(const uint8_t *src,uint8_t *dst,long src_size) } } -inline void rgb24tobgr24(const uint8_t *src, uint8_t *dst, long src_size) +static inline void rgb24tobgr24(const uint8_t *src, uint8_t *dst, long src_size) { unsigned i; for(i=0; i> 2; for(i=0; i255) V=255;\ else if(V<0) V=0;\ } - + #define YSCALE_YUV_2_RGBX_C(type) \ YSCALE_YUV_2_PACKEDX_C(type)\ r = c->table_rV[V];\ @@ -594,7 +594,7 @@ static double getSplineCoeff(double a, double b, double c, double d, double dist { // printf("%f %f %f %f %f\n", a,b,c,d,dist); if(dist<=1.0) return ((d*dist + c)*dist + b)*dist +a; - else return getSplineCoeff( 0.0, + else return getSplineCoeff( 0.0, b+ 2.0*c + 3.0*d, c + 3.0*d, -b- 3.0*c - 6.0*d, @@ -635,7 +635,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF int xDstInSrc; filterSize= 1; filter= av_malloc(dstW*sizeof(double)*filterSize); - + xDstInSrc= xInc/2 - 0x8000; for(i=0; i srcW-2) + if(filterSize > srcW-2) { filterSize=srcW-2; if (filterSize == 0) @@ -721,7 +721,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF double B= param[0] != SWS_PARAM_DEFAULT ? param[0] : 0.0; double C= param[1] != SWS_PARAM_DEFAULT ? param[1] : 0.6; - if(d<1.0) + if(d<1.0) coeff = (12-9*B-6*C)*d*d*d + (-18+12*B+6*C)*d*d + 6-2*B; else if(d<2.0) coeff = (-B-6*C)*d*d*d + (6*B+30*C)*d*d + (-12*B-48*C)*d +8*B+24*C; @@ -737,7 +737,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF else if(flags & SWS_X) { double A= param[0] != SWS_PARAM_DEFAULT ? param[0] : 1.0; - + if(d<1.0) coeff = cos(d*PI); else @@ -764,7 +764,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF } else if(flags & SWS_LANCZOS) { - double p= param[0] != SWS_PARAM_DEFAULT ? param[0] : 3.0; + double p= param[0] != SWS_PARAM_DEFAULT ? param[0] : 3.0; coeff = d ? sin(d*PI)*sin(d*PI/p)/(d*d*PI*PI/p) : 1.0; if(d>p) coeff=0; } @@ -905,7 +905,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF } } av_free(filter2); filter2=NULL; - + //FIXME try to align filterpos if possible @@ -965,7 +965,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF error = v - intV; } } - + (*filterPos)[dstW]= (*filterPos)[dstW-1]; // the MMX scaler will read over the end for(i=0; i<*outFilterSize; i++) { @@ -987,7 +987,7 @@ static void globalInit(void){ } static SwsFunc getSwsFunc(int flags){ - + return swScale_C; } @@ -1008,7 +1008,7 @@ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src, int srcStride, int srcSli switch(srcId | (dstId<<4)){ case 0x68: conv= rgb32to24; break; case 0x86: conv= rgb24to32; break; - default: MSG_ERR("swScaler: internal error %s -> %s converter\n", + default: MSG_ERR("swScaler: internal error %s -> %s converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); break; } }else if( (isBGR(srcFormat) && isRGB(dstFormat)) @@ -1018,11 +1018,11 @@ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src, int srcStride, int srcSli case 0x68: conv= rgb32tobgr24; break; case 0x86: conv= rgb24tobgr32; break; case 0x88: conv= rgb32tobgr32; break; - default: MSG_ERR("swScaler: internal error %s -> %s converter\n", + default: MSG_ERR("swScaler: internal error %s -> %s converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); break; } }else{ - MSG_ERR("swScaler: internal error %s -> %s converter\n", + MSG_ERR("swScaler: internal error %s -> %s converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); } @@ -1040,7 +1040,7 @@ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src, int srcStride, int srcSli srcPtr+= srcStride; dstPtr+= dstStride; } - } + } return srcSliceH; } @@ -1062,8 +1062,8 @@ static int simpleCopy(SwsContext *c, uint8_t* src, int srcStride, int srcSliceY, dstPtr+= dstStride; } return srcSliceH; - - + + /* if(dstStride==srcStride && srcStride > 0) memcpy(dst + dstStride*srcSliceY, src, srcSliceH*dstStride); else @@ -1074,7 +1074,7 @@ static int simpleCopy(SwsContext *c, uint8_t* src, int srcStride, int srcSliceY, int length=0; /* universal length finder */ -/* while(length+c->srcW <= FFABS(dstStride) +/* while(length+c->srcW <= FFABS(dstStride) && length+c->srcW <= FFABS(srcStride)) length+= c->srcW; ASSERT(length!=0); @@ -1113,12 +1113,12 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH int srcRange, dstRange; flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC); - + if(clip_table[512] != 255) globalInit(); unscaled = (srcW == dstW && srcH == dstH); - if(!isSupportedIn(srcFormat)) + if(!isSupportedIn(srcFormat)) { MSG_ERR("swScaler: %s is not supported as input format\n", sws_format_name(srcFormat)); return NULL; @@ -1132,7 +1132,7 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH /* sanity check */ if(srcW<4 || srcH<1 || dstW<8 || dstH<1) //FIXME check if these are enough and try to lowwer them after fixing the relevant parts of the code { - MSG_ERR("swScaler: %dx%d -> %dx%d is invalid scaling dimension\n", + MSG_ERR("swScaler: %dx%d -> %dx%d is invalid scaling dimension\n", srcW, srcH, dstW, dstH); return NULL; } @@ -1191,7 +1191,7 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH if(c->swScale){ if(flags&SWS_PRINT_INFO) - MSG_INFO("SwScaler: using unscaled %s -> %s special converter\n", + MSG_INFO("SwScaler: using unscaled %s -> %s special converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); return c; } @@ -1283,10 +1283,10 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH MSG_INFO("\nSwScaler: ehh flags invalid?! "); if(dstFormat==PIX_FMT_BGR555 || dstFormat==PIX_FMT_BGR565) - MSG_INFO("from %s to%s %s ", + MSG_INFO("from %s to%s %s ", sws_format_name(srcFormat), dither, sws_format_name(dstFormat)); else - MSG_INFO("from %s to %s ", + MSG_INFO("from %s to %s ", sws_format_name(srcFormat), sws_format_name(dstFormat)); MSG_INFO("using C\n");