Hi Klaus,
On Fri, Nov 15, 2013 at 04:47:10PM +0100, Klaus Schmidinger wrote:
>>#2 0x0810e3d2 in cPixmapMemory::DrawRectangle (this=0x6d3fe78,
>>Rect=..., Color=2566914048) at osd.c:1333
>>1333 cRect r = Rect.Intersected(DrawPort().Size());
>>
>>As far as I can tell, the entirely uninitialized cRect is being passed
>>as the Rect parameter to cPixmapMemory::DrawRectangle().
>>Unfortunately, gdb cannot show me the stack above that. It would seem
>>to me that cSkinLCARSDisplayMenu::Clear() is passing uninitialized
>>bounds to cOsd::DrawRectangle(), which will lead to funny values like
>>this:
>>
>>(gdb) p *this
>>$31 = {point = {x = 1418239204, y = 0}, size = {width = -1379480940,
>>height = 201}, static Null = {point = {x = 0, y = 0}, size = {width =
>>0, height = 0}, static Null = <same as static member of an already
>>seen type>}}
>
>The constructor of cRect makes sure that all members are initialized to zero.
>I'm afraid I can't think of a way there could be an uninitialized cRect.
Sorry, I used a bit sloppy language. cRect appears to be initialized,
but with uninitialized values. You know, Valgrind does not complain when
you copy uninitialized data around. It only complains when you are
comparing uninitialized data or passing uninitialized data to a system
call. The Valgrind V-bits are tracking which bits are uninitialized.
The cRect constructor is not at fault. I tried this twice, but both
times gdb would only show me the 3 topmost stack frames, claiming that
the rest of the stack is corrupted. Valgrind did show more (quoting from
my previous message):
==3601== by 0x810AA0B: cOsd::DrawRectangle(int, int, int, int,
unsigned int) (osd.c:1922)
==3601== by 0x8130482: cSkinLCARSDisplayMenu::Clear()
(skinlcars.c:1463)
I could obviously not verify this (due to gdb claiming that the stack is
corrupted), but I suspect that the parameters that are being passed are
uninitialized:
void cSkinLCARSDisplayMenu::Clear(void)
{
textScroller.Reset();
osd->DrawRectangle(xi00, yi00, xi03 - 1, yi01 - 1, Theme.Color(clrBackground));
}
AFAICT, it is invoking this code in cOsd::DrawRectangle():
pixmaps[0]->DrawRectangle(cRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1), Color);
This in turn should be invoking this constructor:
cRect(int X, int Y, int Width, int Height): point(X, Y), size(Width, Height) {}
cSkinLCARSDisplayMenu::cSkinLCARSDisplayMenu() is not initializing any
of the members xi00, yi00, xi03, yi01.
>Is there a reproducible set of actions that causes this to happen?
Yes. Hit Play (to start playing the last played recording), Pause, Menu,
Recordings while using the LCARS skin. The first 2 or 3 keypresses ought
to be optional. I had to stop the video playback with the 2 first
keypresses, because the softdevice framerate is measured in seconds per
frame when running under Valgrind :)
Best regards,
Marko
===================================================================
RCS file: /cvsroot/softdevice/softdevice/SoftOsd.c,v
retrieving revision 1.37
@@ -25,7 +25,6 @@
//#define SCALEDEBV(out...) printf(out)
//#define SCALEDEBH(out...) printf(out)
-
#ifndef OSDDEB
#define OSDDEB(out...)
#endif
@@ -55,16 +54,17 @@
#define COLOR_64BIT(x) ( ((x)<<32) | (x) )
#define ALPHA_VALUE(x) ( (x) << 24 )
-// the same constants for MMX mode
+//#undef USE_MMX
+//#undef USE_MMX2
+
+#ifdef USE_MMX2
static uint64_t transparent_thr= COLOR_64BIT(ALPHA_VALUE(TRANSPARENT_THRESHOLD>>1));
static uint64_t opacity_thr= COLOR_64BIT(ALPHA_VALUE(OPACITY_THRESHOLD>>1));
static uint64_t pseudo_transparent = COLOR_64BIT(COLOR_KEY);
+#endif // USE_MMX2
int cSoftOsd::colorkey;
-//#undef USE_MMX
-//#undef USE_MMX2
-
#undef SPLAT_U16
#ifdef USE_MMX2
#define SPLAT_U16(X) " pshufw $0b0, " X ", " X " \n"
@@ -77,69 +77,59 @@ int cSoftOsd::colorkey;
*/
#if VDRVERSNUM >= 10509
cSoftOsd::cSoftOsd(cVideoOut *VideoOut, int X, int Y, uint level)
- : cOsd(X, Y, level),active(false),close(false) {
+ : cOsd(X, Y, level), shown(false) {
#else
cSoftOsd::cSoftOsd(cVideoOut *VideoOut, int X, int Y)
- : cOsd(X, Y),active(false),close(false) {
+ : cOsd(X, Y), shown(false) {
#endif
OSDDEB("cSoftOsd constructor\n");
OutputConvert=&cSoftOsd::ARGB_to_ARGB32;
bitmap_Format=PF_None; // forces a clear after first SetMode
- OSD_Bitmap=new uint32_t[OSD_STRIDE*(OSD_HEIGHT+4)];
+ OSD_Bitmap=new tColor[OSD_STRIDE*(OSD_HEIGHT+4)];
videoOut = VideoOut;
xPan = yPan = 0;
- shown = false;
- voutMutex.Lock();
videoOut->OpenOSD();
colorkey=videoOut->GetOSDColorkey();
+#ifdef USE_MMX2
pseudo_transparent=(uint64_t)colorkey | ((uint64_t) colorkey)<<32;
+#endif // USE_MMX2
- xOfs=X;yOfs=Y;
ScreenOsdWidth=ScreenOsdHeight=0;
int Depth=16; bool HasAlpha=false; bool AlphaInversed=false;
bool IsYUV=false;
videoOut->AdjustOSDMode();
videoOut->GetOSDMode(Depth,HasAlpha,AlphaInversed,IsYUV);
SetMode(Depth,HasAlpha,AlphaInversed,IsYUV);
- voutMutex.Unlock();
};
/*--------------------------------------------------------------------------*/
void cSoftOsd::Clear() {
OSDDEB("Clear\n");
- uint32_t blank=0x00000000; //COLOR_KEY;
+#if VDRVERSNUM >= 10509
+ if (!cOsd::Active()) return;
+#endif
+ tColor blank=tColor(COLOR_KEY);
ConvertPalette((tColor *)&blank,(tColor *)&blank,1);
register uint32_t fill=blank;
- for (int i=OSD_STRIDE*(OSD_HEIGHT+2)-1; i!=0; i--)
- OSD_Bitmap[i]=fill;
- OSD_Bitmap[0]=fill;
- // no dirty lines, everything has to be redrawn anyway
- memset(dirty_lines,false,sizeof(dirty_lines));
+ if (fill == (fill & 0xff) * 0x1010101) {
+ memset(OSD_Bitmap, fill,
+ OSD_STRIDE*(OSD_HEIGHT+4) * sizeof *OSD_Bitmap);
+ } else {
+ register tColor *b=OSD_Bitmap;
+ register const tColor *const e=b + OSD_STRIDE*(OSD_HEIGHT+4);
+ while (b < e) *b++=fill;
+ }
+
+ memset(dirty_lines,true,sizeof(dirty_lines));
}
/* --------------------------------------------------------------------------*/
cSoftOsd::~cSoftOsd() {
OSDDEB("cSoftOsd destructor\n");
- close=true;
- active=false;
Cancel(3);
- if (videoOut
-#if VDRVERSNUM >= 10509
- && cOsd::Active()
-#endif
- ) {
- voutMutex.Lock();
- videoOut->CloseOSD();
-#ifdef HAVE_YAEPGPATCH
- if (vidWin.bpp!=0)
- videoOut->SetVidWin(0,0,0,0,0);
-#endif
- videoOut=0;
- voutMutex.Unlock();
- }
delete[] OSD_Bitmap;
}
@@ -148,10 +138,6 @@ eOsdError cSoftOsd::SetAreas(const tArea
{
if (shown) {
Clear();
-#if VDRVERSNUM >= 10509
- if (cOsd::Active())
-#endif
- videoOut->ClearOSD();
shown = false;
}
return cOsd::SetAreas(Areas, NumAreas);
@@ -176,22 +162,25 @@ void cSoftOsd::SetActive(bool On)
/* -------------------------------------------------------------------------*/
void cSoftOsd::Action() {
OSDDEB("OSD thread started\n");
- active=true;
- while(active && videoOut && !close) {
+
+ voutMutex.Lock();
+
+ while (Running() && videoOut) {
int newOsdWidth;
int newOsdHeight;
int newXPan, newYPan;
- voutMutex.Lock();
if (!videoOut
#if VDRVERSNUM >= 10509
|| !cOsd::Active()
#endif
- ) {
+ ) {
+sleep:
voutMutex.Unlock();
usleep(17000);
+ voutMutex.Lock();
continue;
- };
+ }
videoOut->AdjustOSDMode();
videoOut->GetOSDDimension(newOsdWidth,newOsdHeight,newXPan,newYPan);
@@ -216,14 +205,22 @@ void cSoftOsd::Action() {
ScreenOsdHeight!=newOsdHeight ||
modeChanged ) {
OSDDEB("Resolution or mode changed!\n");
- if (modeChanged)
- videoOut->ClearOSD();
OsdCommit();
}
- voutMutex.Unlock();
- usleep(17000);
+ goto sleep;
}
+
+ if (
+#if VDRVERSNUM >= 10509
+ cOsd::Active()
+#else
+ true
+#endif
+ ) {
+ if (videoOut) videoOut->ClearOSD();
+ }
+ voutMutex.Unlock();
OSDDEB("OSD thread ended\n");
}
@@ -373,9 +370,7 @@ void cSoftOsd::Flush(void) {
pthread_yield();
#endif
- if (!active && !close)
- Start();
-
+ Start();
shown = true;
}
@@ -385,8 +380,16 @@ bool cSoftOsd::FlushBitmaps(bool OnlyDir
bool OSD_changed=false;
OSDDEB("FlushBitmaps (OnlyDirty: %d)\n",OnlyDirty);
- for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) {
- OSD_changed |= DrawConvertBitmap(Bitmap,OnlyDirty);
+ if (IsTrueColor()) {
+ LOCK_PIXMAPS;
+ while (cPixmapMemory *pm = RenderPixmaps()) {
+ OSD_changed |= DrawConvertPixmap(pm);
+ delete pm;
+ }
+ } else {
+ for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) {
+ OSD_changed |= DrawConvertBitmap(Bitmap,OnlyDirty);
+ }
}
return OSD_changed;
};
@@ -435,7 +438,7 @@ bool cSoftOsd::DrawConvertBitmap(cBitmap
cMutexLock dirty(&dirty_Mutex);
OSDDEB("DrawConvertBitmap %p, OnlyDirty %d\n",bitmap,OnlyDirty);
- if ( !bitmap->Dirty(x1,y1,x2,y2) && OnlyDirty)
+ if (OnlyDirty && !bitmap->Dirty(x1,y1,x2,y2))
return false;
if (!OnlyDirty) {
@@ -458,14 +461,14 @@ bool cSoftOsd::DrawConvertBitmap(cBitmap
y2++;
x2++;
- y2= yOfs+y2+bitmap->Y0() > OSD_HEIGHT ?
- OSD_HEIGHT-bitmap->Y0()-yOfs : y2;
- x2= xOfs+x2+bitmap->X0() > OSD_WIDTH ?
- OSD_WIDTH-bitmap->X0()-xOfs : x2;
+ y2= Top()+y2+bitmap->Y0() > OSD_HEIGHT ?
+ OSD_HEIGHT-bitmap->Y0()-Top() : y2;
+ x2= Left()+x2+bitmap->X0() > OSD_WIDTH ?
+ OSD_WIDTH-bitmap->X0()-Left() : x2;
- int bitmap_yOfs=yOfs+bitmap->Y0()+Y_OFFSET;
+ int bitmap_yOfs=Top()+bitmap->Y0();
uint32_t *OSD_pointer=&OSD_Bitmap[(bitmap_yOfs+y1)*OSD_STRIDE+
- xOfs+bitmap->X0()+x1+X_OFFSET];
+ Left()+bitmap->X0()+x1];
int missing_line_length=OSD_STRIDE-(x2-x1);
bool *dirty_line=&dirty_lines[bitmap_yOfs+y1];
@@ -480,6 +483,42 @@ bool cSoftOsd::DrawConvertBitmap(cBitmap
return true;
};
+bool cSoftOsd::DrawConvertPixmap(cPixmapMemory *pm)
+{
+ int x1,x2,y1,y2;
+ const tColor *src=reinterpret_cast<const tColor*>(pm->Data());
+ OSDDEB("DrawConvertPixmap %p\n",pm);
+
+ x1=Left();
+ y1=Top();
+
+ x1+=pm->ViewPort().X();
+ x2=x1 + pm->ViewPort().Width();
+ y1+=pm->ViewPort().Y();
+ y2=y1 + pm->ViewPort().Height();
+ src+=pm->DrawPort().X() + pm->DrawPort().Y() * pm->DrawPort().Width();
+
+ OSDDEB("drawing pixmap %p from (%d,%d) to (%d,%d)\n",
+ pm,x1,y1,x2,y2);
+
+ if (y1 > OSD_HEIGHT) y1=OSD_HEIGHT;
+ if (x1 > OSD_WIDTH) x1=OSD_WIDTH;
+ if (y2 > OSD_HEIGHT) y2=OSD_HEIGHT;
+ if (x2 > OSD_WIDTH) x2=OSD_WIDTH;
+
+ cMutexLock dirty(&dirty_Mutex);
+
+ tColor *dst=&OSD_Bitmap[y1*OSD_STRIDE+x1];
+
+ for (int y=y1; y<y2; dirty_lines[y++] = true) {
+ memcpy(dst, src, (x2 - x1) * sizeof(tColor));
+ src += pm->DrawPort().Width();
+ dst += OSD_STRIDE;
+ }
+
+ return y1 != y2;
+}
+
/*----------------------------------------------------------------------*/
void cSoftOsd::ARGB_to_AYUV(uint32_t * dest, color * pixmap, int Pixel) {
===================================================================
RCS file: /cvsroot/softdevice/softdevice/SoftOsd.h,v
retrieving revision 1.21
@@ -17,11 +17,11 @@
#include <vdr/thread.h>
// osd some constants and macros
-#define OPACITY_THRESHOLD 0x9FLL
-#define TRANSPARENT_THRESHOLD 0x1FLL
+#define OPACITY_THRESHOLD 0x1FLL
+#define TRANSPARENT_THRESHOLD 0x0FLL
#define COLOR_KEY 0x00000000LL
-#if VDRVERSNUM <= 10707
+#if 1//VDRVERSNUM <= 10707
#define OSD_WIDTH 720
#define OSD_HEIGHT 576
@@ -35,18 +35,11 @@
#endif
-#define IS_BACKGROUND(a) (((a) < OPACITY_THRESHOLD) && ((a) > TRANSPARENT_THRESHOLD))
+#define IS_BACKGROUND(a) (((a) < OPACITY_THRESHOLD) && ((a) >= TRANSPARENT_THRESHOLD))
#define IS_TRANSPARENT(a) ((a) < TRANSPARENT_THRESHOLD)
-#define IS_OPAQUE(a) ((a) > OPACITY_THRESHOLD)
#include "video.h"
-#define X_OFFSET 0
-#define Y_OFFSET 0
-
-
-#define COLOR_RGB16(r,g,b) (((b >> 3)& 0x1F) | ((g & 0xF8) << 2)| ((r & 0xF8)<<10) )
-
#define GET_A(x) ((x) >> 24 & 0xFF)
#define GET_R(x) ((x) >> 16 & 0xFF)
#define GET_G(x) ((x) >> 8 & 0xFF)
@@ -56,31 +49,23 @@
#define SET_R(x) ((x) << 16 & 0x00FF0000)
#define SET_G(x) ((x) << 8 & 0x0000FF00)
#define SET_B(x) ((x) << 0 & 0x000000FF)
-/*
-struct color {
- unsigned char b;
- unsigned char g;
- unsigned char r;
- unsigned char a;
-};
-*/
-typedef uint32_t color;
+
+typedef tColor color;
class cVideoOut;
/* ---------------------------------------------------------------------------
*/
-class cSoftOsd : public cOsd,cThread {
+class cSoftOsd : public cOsd, cThread {
private:
cMutex voutMutex; // lock all operations on videoOut!
cVideoOut *videoOut;
protected:
static int colorkey;
- int xOfs, yOfs;
int xPan, yPan;
- uint32_t *OSD_Bitmap;
bool dirty_lines[OSD_HEIGHT+10];
cMutex dirty_Mutex;
+ tColor* OSD_Bitmap;
void (*OutputConvert)(uint8_t * dest, color * pixmap, int Pixel, int odd);
enum PixFormat {
@@ -96,8 +81,6 @@ protected:
void ConvertPalette(tColor *dest_palette, const tColor *orig_palette,
int maxColors);
- bool active;
- bool close;
bool shown;
int ScreenOsdWidth;
int ScreenOsdHeight;
@@ -126,6 +109,7 @@ protected:
bool FlushBitmaps(bool OnlyDirty);
bool DrawConvertBitmap(cBitmap *Bitmap, bool OnlyDirty);
+ bool DrawConvertPixmap(cPixmapMemory* pm);
void OsdCommit(bool forced = false);
// may only be called if the caller holds voutMutex
===================================================================
RCS file: /cvsroot/softdevice/softdevice/VideoFilter.c,v
retrieving revision 1.11
@@ -286,7 +286,7 @@ void cImageConvert::Filter(sPicBuffer *&
#ifdef USE_SWSCALE
sws_scale(img_convert_ctx, avpic_src.data, avpic_src.linesize,
0, orig->height, avpic_dest.data, avpic_dest.linesize);
-#else
+#elif 0
if (img_convert(&avpic_dest,PIX_FMT_YUV420P,
&avpic_src, orig->format,
orig->width, orig->height) < 0) {
@@ -295,6 +295,9 @@ void cImageConvert::Filter(sPicBuffer *&
"[softdevice] error, libavcodec img_convert failure\n");
return;
}
+#else
+ dest = orig;
+ return;
#endif
CopyPicBufferContext(dest,orig);
}
===================================================================
RCS file: /cvsroot/softdevice/softdevice/configure,v
retrieving revision 1.50
@@ -218,7 +218,7 @@ if test "${use_pkgconfig}" = "yes" ; the
if test "${ffmpeg_use_path}" = "no" ; then
echo "try to use pkg-config." >> config.log
-ffmpeg_l1="libavformat libavcodec"
+ffmpeg_l1="libavformat libavcodec libavutil zlib"
pkg-config --libs libpostproc >> config.log 2>&1 && { ffmpeg_l1="$ffmpeg_l1 libpostproc";libpostproc="yes"; }
===================================================================
RCS file: /cvsroot/softdevice/softdevice/i18n.c,v
retrieving revision 1.25
@@ -7,6 +7,7 @@
*/
#include "i18n.h"
+#if 0
const tI18nPhrase Phrases[] = {
{ "Softdevice", // 1
@@ -1343,3 +1344,4 @@ const tI18nPhrase Phrases[] = {
},
{ NULL }
};
+#endif
===================================================================
RCS file: /cvsroot/softdevice/softdevice/i18n.h,v
retrieving revision 1.1.1.1
@@ -11,6 +11,4 @@
#include <vdr/i18n.h>
-extern const tI18nPhrase Phrases[];
-
#endif //_I18N__H
===================================================================
RCS file: /cvsroot/softdevice/softdevice/mpeg2decoder.c,v
retrieving revision 1.90
@@ -162,7 +162,7 @@ cStreamDecoder::cStreamDecoder(AVCodecCo
#if HAS_ERROR_RECOGNITION
context->error_recognition=1;
#else
- context->error_resilience=1;
+ context->error_concealment=1;
#endif
CMDDEB("Neuer StreamDecoder Pid: %d context %p type %d\n",
getpid(),context,context->codec_type );
===================================================================
RCS file: /cvsroot/softdevice/softdevice/shm-common.h,v
retrieving revision 1.9
@@ -81,14 +81,14 @@ struct ShmCtlBlock {
int setup_shmid;
};
-inline void sem_wait_lock(int semid, int idx, int flag=0)
+inline void sem_wait_lock(int semid, unsigned short idx, short int flag=0)
{
struct sembuf sem_op = { idx, -1, flag };
semop(semid, &sem_op,1);
};
-inline void sem_sig_unlock(int semid, int idx,int flag=0)
+inline void sem_sig_unlock(int semid, unsigned short idx, short int flag=0)
{
struct sembuf sem_op = { idx, 1, flag };
===================================================================
RCS file: /cvsroot/softdevice/softdevice/softdevice.c,v
retrieving revision 1.99
@@ -1306,7 +1306,7 @@ bool cPluginSoftDevice::Service(const ch
bool cPluginSoftDevice::Start(void)
{
// Start any background activities the plugin shall perform.
- RegisterI18n(Phrases);
+ I18nRegister("softdevice");
return true;
}
===================================================================
RCS file: /cvsroot/softdevice/softdevice/sync-timer.h,v
retrieving revision 1.5
@@ -39,7 +39,7 @@ class cSigTimer : public cRelTimer {
bool got_signal;
public:
- cSigTimer() : cRelTimer()
+ cSigTimer() : cRelTimer(), got_signal(false)
{
pthread_mutex_init(&mutex, NULL);
pthread_cond_init(&cond, NULL);
===================================================================
RCS file: /cvsroot/softdevice/softdevice/video-dfb.c,v
retrieving revision 1.86
@@ -183,7 +183,19 @@ static DFBEnumerationResult EnumVideoMod
/* ---------------------------------------------------------------------------
*/
cDFBVideoOut::cDFBVideoOut(cSetupStore *setupStore, cSetupSoftlog *softlog)
- : cVideoOut(setupStore, softlog)
+ : cVideoOut(setupStore, softlog),
+ osdLayer(0),videoLayer(0),scrDsc(),osdDsc(),vidDsc(),
+ osdLayerDescription(),videoLayerDescription(),osdLayerConfiguration(),
+ osdSurface(0),videoSurface(0),scrSurface(0),
+ pixelformat(),dfbRemote(0),events(0),
+ deinterlace(false),alphablend(false),
+ useStretchBlit(false),useSetSourceRectangle(false),
+ osdClrBack(false),isVIAUnichrome(false),
+ clearAlpha(0),
+ clearBackCount(2), // by default for double buffering
+ clearBackground(0),
+ prevOsdMode(setupStore->osdMode),videoLayerLevel(1),
+ dirtyLines(0),tmpOsdSurface(0)
{
tLayerSelectItem *layerInfo;
@@ -195,16 +207,9 @@ cDFBVideoOut::cDFBVideoOut(cSetupStore *
swidth = fwidth = 720;
sheight = fheight = 576;
- tmpOsdSurface = NULL;
screenPixelAspect = -1;
currentPixelFormat = setupStore->pixelFormat;
- prevOsdMode = setupStore->osdMode;
setupStore->osdMode = 0;
- isVIAUnichrome = false;
- clearAlpha = 0x00;
- clearBackground = 0;
- clearBackCount = 2; // by default for double buffering;
- videoLayerLevel = 1;
OSDpresent = false;
if(setupStore->viaTv)
@@ -1054,7 +1059,7 @@ void cDFBVideoOut::SetParams()
videoSurface->Release();
}
if (setupStore->useMGAtv) {
- vidDsc.caps = DFB_ADD_SURFACE_CAPS(vidDsc.caps, DSCAPS_INTERLACED);
+ DFB_ADD_SURFACE_CAPS(vidDsc.caps, DSCAPS_INTERLACED);
}
videoSurface=dfb->CreateSurface(vidDsc);
@@ -1120,16 +1125,15 @@ void cDFBVideoOut::Pause(void)
/* ----------------------------------------------------------------------------
*/
-void cDFBVideoOut::OpenOSD ()
+void cDFBVideoOut::ClearOSD()
{
- IDirectFBSurface *tmpSurface;
-
if (!videoInitialized)
return;
- cVideoOut::OpenOSD();
try
{
+ IDirectFBSurface *tmpSurface;
+
tmpSurface = (useStretchBlit) ? osdSurface : scrSurface;
tmpSurface->Clear(0,0,0,clearAlpha);
tmpSurface->Flip();
@@ -1138,7 +1142,7 @@ void cDFBVideoOut::OpenOSD ()
catch (DFBException *ex)
{
softlog->Log(SOFT_LOG_ERROR, 0,
- "[dfb] OpenOSD: action=%s, result=%s\n",
+ "[dfb] ClearOSD: action=%s, result=%s\n",
ex->GetAction(), ex->GetResult());
delete ex;
}
@@ -1221,14 +1225,14 @@ void cDFBVideoOut::CommitUnlockOsdSurfac
int maxy=0;
tmpOsdSurface->SetBlittingFlags(DSBLIT_NOFX);
do {
- while (!dirtyLines[miny] && miny < Yres)
+ while (miny < Yres && !dirtyLines[miny])
miny++;
if (miny >= Yres)
break;
maxy=miny;
- while (dirtyLines[maxy] && maxy < Yres)
+ while (maxy < Yres && dirtyLines[maxy])
maxy++;
osdsrc.x = 0;
@@ -1289,39 +1293,8 @@ bool cDFBVideoOut::IsSoftOSDMode()
*/
void cDFBVideoOut::CloseOSD()
{
- IDirectFBSurface *tmpSurface;
-
- if (!videoInitialized)
- return;
-
+ ClearOSD();
cVideoOut::CloseOSD();
- tmpSurface = (useStretchBlit) ? osdSurface : scrSurface;
- try
- {
- if (useStretchBlit)
- {
- OSDpresent = false;
- clearBackground = clearBackCount;
- tmpSurface->Clear(COLORKEY,clearAlpha); //clear and
- }
- else
- {
- tmpSurface->Clear(COLORKEY,clearAlpha); //clear and
- tmpSurface->Flip(); // Flip the field
- if (!isVIAUnichrome)
- {
- tmpSurface->Clear(COLORKEY,clearAlpha); //clear and
- tmpSurface->Flip(); // Flip the field
- }
- }
- }
- catch (DFBException *ex)
- {
- softlog->Log(SOFT_LOG_ERROR, 0,
- "[dfb] CloseOSD: action=%s, result=%s\n",
- ex->GetAction(), ex->GetResult());
- delete ex;
- }
}
/* ---------------------------------------------------------------------------
===================================================================
RCS file: /cvsroot/softdevice/softdevice/video-dfb.h,v
retrieving revision 1.30
@@ -74,7 +74,7 @@ class cDFBVideoOut : public cVideoOut {
bool *dirtyLines;
IDirectFBSurface *tmpOsdSurface;
- virtual void OpenOSD();
+ virtual void ClearOSD();
virtual void GetOSDMode(int &Depth, bool &HasAlpha, bool &AlphaInversed,
bool &IsYUV);
virtual void GetOSDDimension(int &OsdWidth,int &OsdHeight,
===================================================================
RCS file: /cvsroot/softdevice/softdevice/video-shm.c,v
retrieving revision 1.20
@@ -238,7 +238,7 @@ void cShmVideoOut::CheckShmIDs() {
case PIX_FMT_YUV422:
SHMDEB("new format YUV422\n");
privBuf.pixel[0]=curr_pict+ctl->offset0;
- privBuf.pixel[1]=privBuf.pixel[1]=NULL;
+ privBuf.pixel[1]=privBuf.pixel[2]=NULL;
privBuf.stride[0]=ctl->stride0;
privBuf.stride[1]=privBuf.stride[2]=0;
break;
===================================================================
RCS file: /cvsroot/softdevice/softdevice/video.c,v
retrieving revision 1.80
@@ -53,6 +53,9 @@ cVideoOut::cVideoOut(cSetupStore *setupS
freezeMode=false;
videoInitialized = false;
oldPicture = NULL;
+ zoomCenterX = zoomCenterY = 0;
+ expandTopBottom = expandLeftRight = 0;
+ frametime = 0;
hurryUp = 0;
delay = 0;
@@ -65,6 +68,7 @@ cVideoOut::cVideoOut(cSetupStore *setupS
offsetClampHigh = 2;
offsetUse = 1;
useAverage4Drop = false;
+ current_osdMode = OSDMODE_PSEUDO;
for (int i = 0; i < SETUP_VIDEOASPECTNAMES_COUNT; ++i)
parValues [i] = 1.0;
===================================================================
RCS file: /cvsroot/softdevice/softdevice/video.h,v
retrieving revision 1.60
@@ -28,7 +28,7 @@
#define DV_FORMAT_NORMAL 1
#define DV_FORMAT_WIDE 2
-#if VDRVERSNUM <= 10707
+#if 1//VDRVERSNUM <= 10707
#define OSD_FULL_WIDTH 736
#define OSD_FULL_HEIGHT 576