Projector pixel alignment compensation
A lot of projectors have some sort of issue with alignment of the red green and blue pixel components, especially as they age. It occurs to me that this could be compensated for in software by adjusting the alignment of the R,G and B channels in the data sent to the projector.

For example, with my AX200 the red channel is currently displaying about one pixel to the left, and the blue channel is displaying about one pixel to the right. If the red channel in the data sent to the projector was shifted one pixel right, and the blue one pixel left then I'd have a properly aligned image.

Now obviously the fact that my alignment pretty much matches the pixel boundaries would make it easier to fix in my case, but it seems likely to me that with sub-pixel interpolation you could apply the same principle for sub-pixel offsets.

I'm guessing this could probably be done *relatively* easily in a pixel shader?

Any thoughts?
Relatively easily I suspect yes. Feel free to give it a crack. I'm not sure whether or not such a patch would be useful or not to the majority of users, but if it's clean then it will certainly be considered for inclusion.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

I wouldn't really know where to start unfortunately. I've been programming for years but web applications nothing like this.

Am I right in thinking I'd need to write it in GLSL? I could look into that, but I'm afraid working out how to integrate it into XBMC is probably beyond me...
Wow great idea, how has nobody thought of this before?! This would really be great for projector owners, as color shift has typically been a "live with it" problem from what I've read. My projector has a pretty significant color shift as well (common problem I guess) and it'd really be exceptional to be able to fix it in software.

Like you, slight, I wouldn't have the first clue where to start unfortunately. Could somebody maybe give us some guidance please? Subjects to read up on, where in the XBMC code to poke around, etc? I understand that perhaps not enough users use projectors to warrant a dev looking into the feature but I'd be thankful if somebody could help point me in the right places so I could see if I can hack it in on my own :0)
OK I taught myself some OpenGL and poked around enough in the XBMC code that I've got this working for GLSL (Advanced) shaders while playing movies. It allows you to shift R, G, and/or B on both x and y axis by using advancedsettings.xml. I have no clue how to implement it in ARB and I'm not going to bother learning so I think it'll just be a GLSL-only thing :0)

I also have no idea how to implement it into the rest of XBMC (other than just video playback). The video playback part already had shaders implemented so I was able to just add onto them, but it looks like I'm going to have to read & understand an awful lot more of the XBMC code before I'll be able to figure out where to add a shader to the core XBMC renderer.

Unless/until I figure the rest out and get a patch accepted into the trunk (which I guess would be after 9.04 even if I figured the rest out tomorrow) you'll have to just PM me if you want a build with this feature.

Probably the best thing to do now is post the patch on trac, that way the developers can review the code and suggest how best to generalize it. Your forum login should work on trac.

Once your talking their language (code) they tend to be really helpful!
That's brilliant news, thanks for working on it! If you want to send me the patch I'll try doing a build with it to help with testing as soon as I can (just got back from holiday so a bit swamped with work right now Wink. Also if you post it to the XBMC Trac maybe you could pop a link in here.


I tried making a patch the night I coded it and TortoiseSVN complained about line endings and refused to do anything... I'll try to figure out what its problem is and generate a patch tonight. I'll post here and on trac when I do.
Besides i don't own a projector anymore i have to say the idea alone is amazing. I still can't stop laughing at people who think a 100$ china mediaplayerbox is the end of all dreams Wink

fix broken hardware with software ... how amazing is that Smile
Any idea if this will work with the nVidia VDPAU acceleration by the way?
no it wont
That's a shame, though I can live with it personally as I'm only using 720p content so don't need VDPAU.

Would it be possible to implement something like this for VDPAU though? I have no concept of how the pipeline for processing works so no idea if it could be done in post-processing.
possibly, but not while the code sits in the csc/scaling shader. i guess you could run a shader after we are fed the texture from the gpu, i dont know tbh

Patch is there. If somebody could let me know how to test the bob deinterlacing shader I will add it there too.
Oops, didn't receive a notification you'd posted again for some reason. I'll try this out asap and reply on trac.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Projector pixel alignment compensation00