mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
Merge branch 'master' into pu/fb-setmode
Fix merge conflict
This commit is contained in:
@@ -519,7 +519,7 @@ AC_ARG_WITH(boxmodel,
|
|||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([unsupported value $withval for --with-boxmodel])
|
AC_MSG_ERROR([unsupported value $withval for --with-boxmodel])
|
||||||
;;
|
;;
|
||||||
esac], [BOXMODEL="hd1"]
|
esac], [test "$BOXTYPE" = "coolstream" && BOXMODEL="hd1" || true]
|
||||||
[if test "$BOXTYPE" = "dreambox" -o "$BOXTYPE" = "ipbox" && test -z "$BOXMODEL"; then
|
[if test "$BOXTYPE" = "dreambox" -o "$BOXTYPE" = "ipbox" && test -z "$BOXMODEL"; then
|
||||||
AC_MSG_ERROR([Dreambox/IPBox needs --with-boxmodel])
|
AC_MSG_ERROR([Dreambox/IPBox needs --with-boxmodel])
|
||||||
fi])
|
fi])
|
||||||
|
@@ -131,6 +131,8 @@ class CFbAccelCSHD2
|
|||||||
int scaleFont(int size);
|
int scaleFont(int size);
|
||||||
bool fullHdAvailable();
|
bool fullHdAvailable();
|
||||||
void setOsdResolutions();
|
void setOsdResolutions();
|
||||||
|
uint32_t getWidth4FB_HW_ACC(const uint32_t x, const uint32_t w, const bool max=true);
|
||||||
|
bool needAlign4Blit() { return true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
class CFbAccelGLFB
|
class CFbAccelGLFB
|
||||||
|
@@ -299,3 +299,20 @@ bool CFbAccelCSHD2::fullHdAvailable()
|
|||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* align for hw blit */
|
||||||
|
uint32_t CFbAccelCSHD2::getWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max)
|
||||||
|
{
|
||||||
|
uint32_t ret = _w;
|
||||||
|
if ((_x + ret) >= xRes)
|
||||||
|
ret = xRes-_x-1;
|
||||||
|
if (ret%4 == 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
int add = (max) ? 3 : 0;
|
||||||
|
ret = ((ret + add) / 4) * 4;
|
||||||
|
if ((_x + ret) >= xRes)
|
||||||
|
ret -= 4;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@@ -48,7 +48,6 @@
|
|||||||
#include <gui/color.h>
|
#include <gui/color.h>
|
||||||
#include <gui/pictureviewer.h>
|
#include <gui/pictureviewer.h>
|
||||||
#include <system/debug.h>
|
#include <system/debug.h>
|
||||||
#include <system/helpers.h>
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <video.h>
|
#include <video.h>
|
||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
@@ -527,7 +526,7 @@ fb_pixel_t* CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, co
|
|||||||
|
|
||||||
#ifdef BOXMODEL_CS_HD2
|
#ifdef BOXMODEL_CS_HD2
|
||||||
if (_dx%4 != 0) {
|
if (_dx%4 != 0) {
|
||||||
w_align = GetWidth4FB_HW_ACC(x, _dx, true);
|
w_align = getWidth4FB_HW_ACC(x, _dx, true);
|
||||||
if (w_align < _dx)
|
if (w_align < _dx)
|
||||||
_dx = w_align;
|
_dx = w_align;
|
||||||
offs_align = w_align - _dx;
|
offs_align = w_align - _dx;
|
||||||
@@ -1783,3 +1782,8 @@ bool CFrameBuffer::_checkFbArea(int _x, int _y, int _dx, int _dy, bool prev)
|
|||||||
void CFrameBuffer::mark(int , int , int , int )
|
void CFrameBuffer::mark(int , int , int , int )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t CFrameBuffer::getWidth4FB_HW_ACC(const uint32_t /*x*/, const uint32_t w, const bool /*max*/)
|
||||||
|
{
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
@@ -191,10 +191,10 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
|
|
||||||
bool getActive() const; // is framebuffer active?
|
bool getActive() const; // is framebuffer active?
|
||||||
void setActive(bool enable); // is framebuffer active?
|
void setActive(bool enable); // is framebuffer active?
|
||||||
#ifdef BOXMODEL_CS_HD1
|
virtual void setupGXA() { return; }; // reinitialize stuff
|
||||||
virtual void setupGXA() {};
|
virtual void add_gxa_sync_marker() { return; };
|
||||||
virtual void add_gxa_sync_marker() {};
|
virtual bool needAlign4Blit() { return false; };
|
||||||
#endif
|
virtual uint32_t getWidth4FB_HW_ACC(const uint32_t x, const uint32_t w, const bool max=true);
|
||||||
|
|
||||||
void setTransparency( int tr = 0 );
|
void setTransparency( int tr = 0 );
|
||||||
virtual void setBlendMode(uint8_t mode = 1);
|
virtual void setBlendMode(uint8_t mode = 1);
|
||||||
@@ -274,7 +274,7 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
|
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
|
||||||
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
|
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
|
||||||
virtual void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
virtual void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
virtual void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
|
|
||||||
virtual void mark(int x, int y, int dx, int dy);
|
virtual void mark(int x, int y, int dx, int dy);
|
||||||
virtual int scaleFont(int size) { return size; };
|
virtual int scaleFont(int size) { return size; };
|
||||||
|
@@ -33,7 +33,6 @@
|
|||||||
#include "cc_item_picture.h"
|
#include "cc_item_picture.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <system/debug.h>
|
#include <system/debug.h>
|
||||||
#include <system/helpers.h>
|
|
||||||
#include <driver/pictureviewer/pictureviewer.h>
|
#include <driver/pictureviewer/pictureviewer.h>
|
||||||
|
|
||||||
extern CPictureViewer * g_PicViewer;
|
extern CPictureViewer * g_PicViewer;
|
||||||
@@ -222,10 +221,9 @@ void CComponentsPicture::initCCItem()
|
|||||||
{
|
{
|
||||||
float h_ratio = float(height)*100/(float)dy;
|
float h_ratio = float(height)*100/(float)dy;
|
||||||
width = int(h_ratio*(float)dx/100);
|
width = int(h_ratio*(float)dx/100);
|
||||||
#ifdef BOXMODEL_CS_HD2
|
if (frameBuffer->needAlign4Blit() &&
|
||||||
if (do_scale && (width > 10 || height > 10))
|
do_scale && (width > 10 || height > 10))
|
||||||
width = GetWidth4FB_HW_ACC(x+fr_thickness, width-2*fr_thickness)+2*fr_thickness;
|
width = frameBuffer->getWidth4FB_HW_ACC(x+fr_thickness, width-2*fr_thickness)+2*fr_thickness;
|
||||||
#endif
|
|
||||||
keep_dx_aspect = false;
|
keep_dx_aspect = false;
|
||||||
}
|
}
|
||||||
if (keep_dy_aspect && dx)
|
if (keep_dy_aspect && dx)
|
||||||
|
@@ -2448,7 +2448,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data)
|
|||||||
|
|
||||||
int xoff = (double) sub->rects[i]->x * xc;
|
int xoff = (double) sub->rects[i]->x * xc;
|
||||||
int yoff = (double) sub->rects[i]->y * yc;
|
int yoff = (double) sub->rects[i]->y * yc;
|
||||||
int nw = GetWidth4FB_HW_ACC(xoff, (double) sub->rects[i]->w * xc);
|
int nw = frameBuffer->getWidth4FB_HW_ACC(xoff, (double) sub->rects[i]->w * xc);
|
||||||
int nh = (double) sub->rects[i]->h * yc;
|
int nh = (double) sub->rects[i]->h * yc;
|
||||||
|
|
||||||
printf("Draw: #%d at %d,%d size %dx%d colors %d (x=%d y=%d w=%d h=%d) \n", i+1,
|
printf("Draw: #%d at %d,%d size %dx%d colors %d (x=%d y=%d w=%d h=%d) \n", i+1,
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <driver/fontrenderer.h>
|
#include <driver/fontrenderer.h>
|
||||||
#include <driver/framebuffer.h>
|
//#include <driver/framebuffer.h>
|
||||||
#include <system/helpers.h>
|
#include <system/helpers.h>
|
||||||
#include <gui/update_ext.h>
|
#include <gui/update_ext.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -1113,6 +1113,7 @@ bool split_config_string(const std::string &str, std::map<std::string,std::strin
|
|||||||
return !smap.empty();
|
return !smap.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* align for hw blit */
|
/* align for hw blit */
|
||||||
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max)
|
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max)
|
||||||
{
|
{
|
||||||
@@ -1132,6 +1133,7 @@ uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> split(const std::string &s, char delim)
|
std::vector<std::string> split(const std::string &s, char delim)
|
||||||
{
|
{
|
||||||
|
@@ -116,7 +116,9 @@ class CFileHelpers
|
|||||||
static uint64_t getDirSize(const std::string& dir){return getDirSize(dir.c_str());};
|
static uint64_t getDirSize(const std::string& dir){return getDirSize(dir.c_str());};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max=true);
|
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max=true);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __cplusplus < 201103L
|
#if __cplusplus < 201103L
|
||||||
std::string to_string(int);
|
std::string to_string(int);
|
||||||
|
Reference in New Issue
Block a user