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.
Posted 10 September 2012 - 09:23
Edited by Speedy1985, 10 September 2012 - 09:27.
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)
// 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
Posted 10 September 2012 - 10:17
Posted 10 September 2012 - 10:41
//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
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
Edited by Speedy1985, 10 September 2012 - 11:43.
Posted 10 September 2012 - 12:10
does the same thing happen with mem2mem dma as well?
Edited by Speedy1985, 10 September 2012 - 12:11.
Posted 10 September 2012 - 12:16
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).
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.
Edited by Speedy1985, 10 September 2012 - 13:30.
0 members, 0 guests, 0 anonymous users