Merge branch 'uncool/dvbsi++' commit '6e0bc85a6c0'

This is the last commit before the "menu hints" started.
Needs buildfixing...

Conflicts:
	configure.ac
	src/daemonc/remotecontrol.cpp
	src/daemonc/remotecontrol.h
	src/driver/audiodec/basedec.cpp
	src/driver/fb_window.cpp
	src/driver/rcinput.cpp
	src/driver/volume.cpp
	src/global.h
	src/gui/channellist.cpp
	src/gui/eventlist.cpp
	src/gui/infoviewer.cpp
	src/gui/keybind_setup.cpp
	src/gui/miscsettings_menu.cpp
	src/gui/movieplayer.cpp
	src/gui/osd_setup.cpp
	src/gui/plugins.cpp
	src/gui/scan.cpp
	src/gui/scan_setup.cpp
	src/gui/streaminfo2.cpp
	src/gui/videosettings.cpp
	src/gui/widget/buttons.cpp
	src/neutrino.cpp
	src/sectionsd/dmx.cpp
	src/sectionsd/dmxapi.cpp
	src/sectionsd/sectionsd.cpp
	src/system/setting_helpers.cpp
	src/zapit/include/zapit/client/zapittypes.h
	src/zapit/include/zapit/frontend_c.h
	src/zapit/include/zapit/satconfig.h
	src/zapit/include/zapit/scan.h
	src/zapit/lib/zapitclient.cpp
	src/zapit/src/Makefile.am
	src/zapit/src/frontend.cpp
	src/zapit/src/getservices.cpp
	src/zapit/src/pmt.cpp
	src/zapit/src/scan.cpp
	src/zapit/src/sdt.cpp
	src/zapit/src/zapit.cpp
This commit is contained in:
Stefan Seyfried
2012-07-22 14:09:43 +02:00
354 changed files with 17604 additions and 32020 deletions

View File

@@ -1,11 +1,13 @@
AM_CXXFLAGS = -fno-rtti -fno-exceptions
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/zapit/include \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/lib/libconfigfile \
@FREETYPE_CFLAGS@ \
-I$(top_srcdir)/lib
@FREETYPE_CFLAGS@
if BOXTYPE_COOL
INCLUDES += -I$(top_srcdir)/lib/libcoolstream

View File

@@ -169,7 +169,7 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
struct jpeg_decompress_struct *ciptr;
struct r_crw_jpeg_error_mgr emgr;
unsigned char *bp;
int px,py,c,x=*xp;
int px/*,py*/,c,x=*xp;
FILE *fh;
JSAMPLE *lb;
@@ -204,7 +204,7 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
jpeg_start_decompress(ciptr);
px=ciptr->output_width; py=ciptr->output_height;
px=ciptr->output_width; //py=ciptr->output_height;
c=ciptr->output_components;
@@ -234,7 +234,7 @@ int fh_crw_getsize(const char *filename,int *x,int *y, int wanted_width, int wan
struct jpeg_decompress_struct *ciptr;
struct r_crw_jpeg_error_mgr emgr;
int px,py,c;
int px,py/*,c*/;
FILE *fh;
ciptr=&cinfo;
@@ -271,7 +271,7 @@ int fh_crw_getsize(const char *filename,int *x,int *y, int wanted_width, int wan
jpeg_start_decompress(ciptr);
px=ciptr->output_width; py=ciptr->output_height;
c=ciptr->output_components;
// c=ciptr->output_components;
*x=px; *y=py;
// jpeg_finish_decompress(ciptr);
jpeg_destroy_decompress(ciptr);

View File

@@ -6,6 +6,7 @@
#ifdef FBV_SUPPORT_GIF
#include "pictureviewer.h"
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -47,7 +48,7 @@ inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,Col
}
int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
{
int px,py,i,ibxs;
int px,py,i/*,ibxs*/;
int j;
unsigned char *fbptr;
unsigned char *lb;
@@ -79,7 +80,7 @@ int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
cmap=(gft->Image.ColorMap ? gft->Image.ColorMap : gft->SColorMap);
cmaps=cmap->ColorCount;
ibxs=ibxs*3;
// ibxs=ibxs*3;
fbptr=*buffer;
if(!(gft->Image.Interlace))
{

View File

@@ -234,7 +234,7 @@ int fh_jpeg_getsize(const char *filename,int *x,int *y, int wanted_width, int wa
struct jpeg_decompress_struct *ciptr;
struct r_jpeg_error_mgr emgr;
int px,py,c;
int px,py/*,c*/;
FILE *fh;
ciptr=&cinfo;
if(!(fh=fopen(filename,"rb"))) return(FH_ERROR_FILE);
@@ -269,7 +269,7 @@ int fh_jpeg_getsize(const char *filename,int *x,int *y, int wanted_width, int wa
jpeg_start_decompress(ciptr);
px=ciptr->output_width; py=ciptr->output_height;
c=ciptr->output_components;
// c=ciptr->output_components;
#if 1
if(!g_settings.picviewer_decode_server_ip.empty())
{

View File

@@ -1,155 +0,0 @@
/*
Neutrino-GUI - DBoxII-Project
Copyright (C) 2005 Zwen
Kommentar:
This is an implementation of the floyd steinberg error diffusion algorithm
adapted for 24bit to 15bit color reduction.
For a description of the base alorithm see e.g.:
http://www.informatik.fh-muenchen.de/~schieder/graphik-01-02/slide0264.html
License: GPL
This program 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 of the License, or
(at your option) any later version.
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.
*/
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include "pictureviewer.h"
void c32_15(unsigned char r, unsigned char g , unsigned char b , unsigned char* d)
{
*d = ((r >> 1) & 0x7C) | (g >> 6);
*(d+1) = ((g << 2) & 0xE0) | (b >> 3);
}
#define FS_CALC_ERROR_COMMON(color, index) \
p1 = p2 = (p_src[index] + (this_line_error_##color[ix]>>4)); \
if(p1>255)p1=255; if(p1<0)p1=0; \
color = (p1 & 0xF8) | 0x4; \
error = p2 - color; \
#define FS_CALC_ERROR_RIGHT(color, index) \
FS_CALC_ERROR_COMMON(color,index) \
this_line_error_##color[ix+1] += (error * 7); \
next_line_error_##color[ix-1] += (error * 3); \
next_line_error_##color[ix] += (error * 5); \
next_line_error_##color[ix+1] += error;
#define FS_CALC_ERROR_LEFT(color, index) \
FS_CALC_ERROR_COMMON(color,index) \
this_line_error_##color[ix-1] += (error * 7); \
next_line_error_##color[ix+1] += (error * 3); \
next_line_error_##color[ix] += (error * 5); \
next_line_error_##color[ix-1] += error;
unsigned char * make15color_errdiff(unsigned char * src,int width, int height)
{
int odd_line=1;
int ix,iy, error, p1, p2;
unsigned char r,g,b;
unsigned char *p_src, *p_dst;
unsigned char *dst = (unsigned char*) malloc(width*height*2);
int *this_line_error_r;
int *this_line_error_g;
int *this_line_error_b;
int *next_line_error_r;
int *next_line_error_g;
int *next_line_error_b;
int *save_error;
int *error1_r = (int*) malloc((width+2)*sizeof(int));
int *error1_g = (int*) malloc((width+2)*sizeof(int));
int *error1_b = (int*) malloc((width+2)*sizeof(int));
int *error2_r = (int*) malloc((width+2)*sizeof(int));
int *error2_g = (int*) malloc((width+2)*sizeof(int));
int *error2_b = (int*) malloc((width+2)*sizeof(int));
dbout("Start error diffusion\n");
this_line_error_r = error1_r;
this_line_error_g = error1_g;
this_line_error_b = error1_b;
next_line_error_r = error2_r;
next_line_error_g = error2_g;
next_line_error_b = error2_b;
memset (this_line_error_r, 0 , (width+2) * sizeof(int));
memset (this_line_error_g, 0 , (width+2) * sizeof(int));
memset (this_line_error_b, 0 , (width+2) * sizeof(int));
memset (next_line_error_r, 0 , (width+2) * sizeof(int));
memset (next_line_error_g, 0 , (width+2) * sizeof(int));
memset (next_line_error_b, 0 , (width+2) * sizeof(int));
p_src = src;
p_dst = dst;
for(iy=0 ; iy < height ; iy++)
{
save_error = this_line_error_r;
this_line_error_r = next_line_error_r;
next_line_error_r = save_error;
save_error = this_line_error_g;
this_line_error_g = next_line_error_g;
next_line_error_g = save_error;
save_error = this_line_error_b;
this_line_error_b = next_line_error_b;
next_line_error_b = save_error;
memset (next_line_error_r, 0 , (width+2) * sizeof(int));
memset (next_line_error_g, 0 , (width+2) * sizeof(int));
memset (next_line_error_b, 0 , (width+2) * sizeof(int));
if(odd_line)
{
for(ix=1 ; ix <= width ; ix++)
{
FS_CALC_ERROR_RIGHT(r,0);
FS_CALC_ERROR_RIGHT(g,1);
FS_CALC_ERROR_RIGHT(b,2);
c32_15(r,g,b,p_dst);
p_src+=3;
p_dst+=2;
}
odd_line=0;
}
else
{
p_src+=(width-1)*3;
p_dst+=(width-1)*2;
for(ix=width ; ix >= 1 ; ix--)
{
FS_CALC_ERROR_LEFT(r,0);
FS_CALC_ERROR_LEFT(g,1);
FS_CALC_ERROR_LEFT(b,2);
c32_15(r,g,b,p_dst);
p_src-=3;
p_dst-=2;
}
p_src+=width*3;
p_dst+=width*2;
odd_line=1;
}
}
free(error1_r);
free(error1_g);
free(error1_b);
free(error2_r);
free(error2_g);
free(error2_b);
dbout("End error diffusion\n");
return dst;
}

View File

@@ -5,7 +5,7 @@
#include "pv_config.h"
#include "driver/framebuffer.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -111,10 +111,10 @@ bool CPictureViewer::DecodeImage (const std::string & name, bool showBusySign, b
return true;
}
#endif
int x, y, xs, ys, imx, imy;
int x, y, imx, imy;
xs = CFrameBuffer::getInstance()->getScreenWidth(true);
ys = CFrameBuffer::getInstance()->getScreenHeight(true);
// int xs = CFrameBuffer::getInstance()->getScreenWidth(true);
// int ys = CFrameBuffer::getInstance()->getScreenHeight(true);
// Show red block for "next ready" in view state
if (showBusySign)
@@ -589,7 +589,7 @@ fb_pixel_t * CPictureViewer::int_getImage(const std::string & name, int *width,
if (buffer == NULL)
{
printf("%s: Error: malloc\n", mode_str.c_str());
return false;
return 0;
}
#ifdef FBV_SUPPORT_PNG
if ((name.find(".png") == (name.length() - 4)) && (fh_png_id(name.c_str())))

View File

@@ -1,77 +0,0 @@
#include <cstdlib>
#include <cstring>
#include "pictureviewer.h"
unsigned char * simple_resize(unsigned char * orgin,int ox,int oy,int dx,int dy)
{
unsigned char *cr,*p,*l;
int i,j,k,ip;
cr=(unsigned char*) malloc(dx*dy*3);
if(cr==NULL)
{
printf("Error: malloc\n");
return(orgin);
}
l=cr;
for(j=0;j<dy;j++,l+=dx*3)
{
p=orgin+(j*oy/dy*ox*3);
for(i=0,k=0;i<dx;i++,k+=3)
{
ip=i*ox/dx*3;
memmove(l+k, p+ip, 3);
}
}
free(orgin);
return(cr);
}
unsigned char * color_average_resize(unsigned char * orgin,int ox,int oy,int dx,int dy)
{
/* dbout("color_average_resize{\n");*/
unsigned char *cr,*p,*q;
int i,j,k,l,ya,yb;
int sq,r,g,b;
cr=(unsigned char*) malloc(dx*dy*3);
if(cr==NULL)
{
printf("Error: malloc\n");
/* dbout("color_average_resize}\n"); */
return(orgin);
}
p=cr;
int xa_v[dx];
for(i=0;i<dx;i++)
xa_v[i] = i*ox/dx;
int xb_v[dx+1];
for(i=0;i<dx;i++)
{
xb_v[i]= (i+1)*ox/dx;
if(xb_v[i]>=ox)
xb_v[i]=ox-1;
}
for(j=0;j<dy;j++)
{
ya= j*oy/dy;
yb= (j+1)*oy/dy; if(yb>=oy) yb=oy-1;
for(i=0;i<dx;i++,p+=3)
{
for(l=ya,r=0,g=0,b=0,sq=0;l<=yb;l++)
{
q=orgin+((l*ox+xa_v[i])*3);
for(k=xa_v[i];k<=xb_v[i];k++,q+=3,sq++)
{
r+=q[0]; g+=q[1]; b+=q[2];
}
}
p[0]=r/sq; p[1]=g/sq; p[2]=b/sq;
}
}
free(orgin);
/* dbout("color_average_resize}\n"); */
return(cr);
}