bluecherrydvr / linux Goto Github PK
View Code? Open in Web Editor NEWThis project forked from torvalds/linux
Linux kernel source tree
License: Other
This project forked from torvalds/linux
Linux kernel source tree
License: Other
tw5864 driver was submitted for review and inclusion into mainline kernel. Got a bunch of things to fix. Need to work on that and resubmit.
One of #ffmpeg IRC guys, jkqxz, agreed to consult me regarding correctness of stream (decoding errors and such). Need to provide him with latest samples of problematic videos for analysis.
When our kernel .deb package is installed on a host where previous our kernel package is already installed, there's such error which fails the installations:
trying to overwrite '/etc/modules-load.d/tw5864.conf'
So user must remove previous package to install new one.
dkms solo driver panic
kernel BUG at /build/buildd/linux-3.2.0/drivers/media/video/videobuf-dma-sg.c:525!
invalid opcode: 0000 SMP
On customer's installation (Mr. Luna) some cameras which are said to provide good picture previously, have noisy picture. No idea how to improve that. Maybe we could analyze decoding errors if there are any.
Set constraint_set1_flag even though spec doesn't say it, because the output does conform to constrained baseline profile and setting it can only improve compatibility.
(From consultant)
The problem with that particular stream is that you haven't added emulation prevention bytes to escape zeroes, so the decoder is getting confused by occasional sequences that look like start codes. For that stream, there are several glitches in the first 1000 frames, and I was able to manually add the emulation prevention bytes to make it decode without problems.
So, I think that in your driver, in the function:
static void tw5864_handle_frame(struct tw5864_h264_frame *frame)
rather than the stright copy with:
memcpy(dst, frame->vlc.addr + skip_bytes, frame_len);
you want something like:
size_t i, j;
int zero_run;
u8 *src;
...
src = frame->vlc.addr + skip_bytes;
zero_run = 0;
for (i = j = 0; i < frame_len; i++) {
if (zero_run < 2) {
if (src[i] == 0)
++zero_run;
else
zero_run = 0;
} else {
if ((src[i] & ~0x03) == 0) {
dst[j++] = 0x03;
zero_run = src[i] == 0;
}
dst[j++] = src[i];
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.