Jump to content


Photo

X11 Server Core - Possible ?


  • Please log in to reply
11 replies to this topic

#1 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 09:23

Hi, Dev members.

I have a question, maybe a stupid question ;)

i need the X11-org on enigma2, is it possible ?
Can we install some package for that ?

Gr Speedy

Edited by Speedy1985, 10 September 2012 - 09:27.

 
Support: webchat.freenode.net #boblight-enigma2

Re: X11 Server Core - Possible ? #2 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 10 September 2012 - 09:38

enigma2 is an application, so x11 'on enigma2' is probably not what you mean.

And enigma2 opens/uses the framebuffer exclusively, so x11 'with enigma2' is also not going to work (given that your only option on an stb will be a framebuffer version of x11)

Re: X11 Server Core - Possible ? #3 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 10:09

enigma2 is an application, so x11 'on enigma2' is probably not what you mean.

And enigma2 opens/uses the framebuffer exclusively, so x11 'with enigma2' is also not going to work (given that your only option on an stb will be a framebuffer version of x11)


OK! Thanks.
Maybe you have a anwser on my other question.

I'am the builder of Boblight for enigma2, But i have one last problem. Syncing.
I grab a picture from the decodermemory but i want a sync from the box when it is ready. is that possible ?

On SD channels it's ok, but HD is not good. i get flickering, (I think uncomplete images)
This problem comes from the hdmi buffer i think.

The box is buffering the frames ?

I hope you can help me.

Some code to grab from dm800 en 500 et9000 etc...



// grab brcm7401 pic from decoder memory
unsigned char *memory = (unsigned char*) mmap(0, 100, PROT_READ, MAP_SHARED, mem_fd, 0x10100000); 
if (memory == MAP_FAILED) {
printf("[grabber] mmap failed\n");
return false;
}

unsigned char data[100];

unsigned int adr,adr2,ofs,ofs2,offset/*,vert_start,vert_end*/;

memcpy(data,memory,100);
//vert_start=data[0x1B]<<8|data[0x1A];
//vert_end=data[0x19]<<8|data[0x18];
stride=data[0x15]<<8|data[0x14];
ofs=(data[0x28]<<8|data[0x27])>>4;
ofs2=(data[0x2c]<<8|data[0x2b])>>4;
adr=(data[0x1f]<<24|data[0x1e]<<16|data[0x1d]<<8|data[0x1c])&0xFFFFFF00;
adr2=(data[0x23]<<24|data[0x22]<<16|data[0x21]<<8|data[0x20])&0xFFFFFF00;
offset=adr2-adr;

munmap(memory, 100);

// on dm800/dm500hd we have direct access to the decoder memory
  memory = (unsigned char*)mmap(0, offset + stride*(ofs2+64), PROT_READ, MAP_SHARED, mem_fd, adr);
  if (memory == MAP_FAILED) {
   printf("[grabber] mmap failed\n");
   return false;
  }

  //usleep(50000);  // we try to get a full picture, its not possible to get a sync from the decoder so we use a delay
	// and hope we get a good timing. dont ask me why, but every DM800 i tested so far produced a good
	// result with a 50ms delay

Attached Files


 
Support: webchat.freenode.net #boblight-enigma2

Re: X11 Server Core - Possible ? #4 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 10:17

See pics, what i mean

-pic1 Good!
-pic2 You see pic1 and pic3, this is the problem
-pic3 good.

Attached Files


 
Support: webchat.freenode.net #boblight-enigma2

Re: X11 Server Core - Possible ? #5 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 10 September 2012 - 10:41

When you grab from a running videodecoder, that's what is going to happen.
Especially when you try to go near the framerate.

your code summarizes the problem just fine I think:

//usleep(50000); // we try to get a full picture, its not possible to get a sync from the decoder so we use a delay
// and hope we get a good timing. dont ask me why, but every DM800 i tested so far produced a good
// result with a 50ms delay



Re: X11 Server Core - Possible ? #6 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 11:42

When you grab from a running videodecoder, that's what is going to happen.
Especially when you try to go near the framerate.

your code summarizes the problem just fine I think:


//usleep(50000); // we try to get a full picture, its not possible to get a sync from the decoder so we use a delay
// and hope we get a good timing. dont ask me why, but every DM800 i tested so far produced a good
// result with a 50ms delay


I have used that, then it would be better, but then the frames are to late in deamon.
Is there a other way to do this ?

gr Speedy

Edited by Speedy1985, 10 September 2012 - 11:43.

 
Support: webchat.freenode.net #boblight-enigma2

Re: X11 Server Core - Possible ? #7 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 10 September 2012 - 11:53

does the same thing happen with mem2mem dma as well?

Re: X11 Server Core - Possible ? #8 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 12:10

does the same thing happen with mem2mem dma as well?


MMMM... sorry ;) , What do you mean?

P.s are you dutch ??

Edited by Speedy1985, 10 September 2012 - 12:11.

 
Support: webchat.freenode.net #boblight-enigma2

Re: X11 Server Core - Possible ? #9 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 10 September 2012 - 12:16

well, if you look at the remainder of the grabber code, you see that some hardware does not allow direct access to the videodecoder memory.
mem2mem dma is used on those platforms to transfer the frame into memory.
You could use this aproach on all platforms of course, perhaps the dma controller would wait for the frame to be valid/complete (just guessing).

Re: X11 Server Core - Possible ? #10 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 12:30

well, if you look at the remainder of the grabber code, you see that some hardware does not allow direct access to the videodecoder memory.
mem2mem dma is used on those platforms to transfer the frame into memory.
You could use this aproach on all platforms of course, perhaps the dma controller would wait for the frame to be valid/complete (just guessing).


MM ok, thanks for the anwser i will try this. :)
kind regards Speedy
 
Support: webchat.freenode.net #boblight-enigma2

Re: X11 Server Core - Possible ? #11 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 10 September 2012 - 12:55

Would directly decoding the h264 stream be viable? Only problem then is syncing with the video decoder. With mpeg2 obtaining the average color for a 8x8 pixel block is not hard computationally, because it is stored directly in the stream.

Re: X11 Server Core - Possible ? #12 Speedy1985

  • Senior Member
  • 120 posts

+18
Neutral

Posted 10 September 2012 - 13:29

Would directly decoding the h264 stream be viable? Only problem then is syncing with the video decoder. With mpeg2 obtaining the average color for a 8x8 pixel block is not hard computationally, because it is stored directly in the stream.


Ok nice.:)
How i can do that, Can you explain that ?

Edited by Speedy1985, 10 September 2012 - 13:30.

 
Support: webchat.freenode.net #boblight-enigma2


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users