OS X Know video card number
#1
Hello,

I was thinking of creating a pull request to patch for some nvidia cards(Nvidia GeForce 320M, etc) the problem that exists of a white lines on screen on hardware decoded video. But before that the problem here is that i don't know if there is an object that tells this piece of info. And what will it be the best way of setting this patch for several video cards.

Basically i want to write something like this:

Code:
CStdString rendervendor = g_Windowing.GetRenderVendor();
    rendervendor.MakeLower();
   if (rendervendor.find("nvidia") != std::string::npos)
{
    // Nvidia gpu's are all powerful and work the way god intended
    m_decode_async = true;
    if(videocardId == toPathId)
    {
        m_use_cvBufferRef = false;
    }
    else
    {
        m_use_cvBufferRef = true;
    }
}
else if (rendervendor.find("intel") != std::string::npos)
{
    // Intel gpu are borked when using cvBufferRef
    m_decode_async = true;
    m_use_cvBufferRef = false;
}
else
{
    // ATI gpu's are borked when using async decode
    m_decode_async = false;
    m_use_cvBufferRef = true;
}

Is it possible?
Reply
#2
If you like, put a dmg (with your changes applied) somewhere and I will test it on mac mini 2009 with Nvidia 9400.

I was trying to do it with 12.2pre but had no luck building.
My skins:

Amber
Quartz

Reply
#3
(2013-04-18, 19:27)LordAnubis3 Wrote: Hello,

I was thinking of creating a pull request to patch for some nvidia cards(Nvidia GeForce 320M, etc) the problem that exists of a white lines on screen on hardware decoded video. But before that the problem here is that i don't know if there is an object that tells this piece of info. And what will it be the best way of setting this patch for several video cards.

Basically i want to write something like this:

Code:
CStdString rendervendor = g_Windowing.GetRenderVendor();
    rendervendor.MakeLower();
   if (rendervendor.find("nvidia") != std::string::npos)
{
    // Nvidia gpu's are all powerful and work the way god intended
    m_decode_async = true;
    if(videocardId == toPathId)
    {
        m_use_cvBufferRef = false;
    }
    else
    {
        m_use_cvBufferRef = true;
    }
}
else if (rendervendor.find("intel") != std::string::npos)
{
    // Intel gpu are borked when using cvBufferRef
    m_decode_async = true;
    m_use_cvBufferRef = false;
}
else
{
    // ATI gpu's are borked when using async decode
    m_decode_async = false;
    m_use_cvBufferRef = true;
}

Is it possible?

I guess you would need to know the vendor string of those video cards (we print those in the log file) and add another rendervendor.find("320m") (example - i don't know the right strings!) instead of "videocardId == toPathId" (where i don't get what thos should be).
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
Hello,

@pecinko

I only have at the moment the master branch locally synced on my macbook pro.When i'm off work i could build it,this will good enough for your test?Otherwise i have to setup the build env for frodo branch and will take a little longer.

@memphis

First i will try build and try with card pecinko before making any pull request. Do you agree?
Reply
#5
Sure - though i'm not the maintainer of that code - so once the PR is up a different approach might come into mind by other devs.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
(2013-04-19, 11:45)LordAnubis3 Wrote: I only have at the moment the master branch locally synced on my macbook pro.When i'm off work i could build it,this will good enough for your test?Otherwise i have to setup the build env for frodo branch and will take a little longer.

I'm OK with either version but since 12.2 pre is out of the door and this is a fix that should go in, it would be better IMHO to test against 12.2.
My skins:

Amber
Quartz

Reply
#7
(2013-04-19, 13:27)pecinko Wrote:
(2013-04-19, 11:45)LordAnubis3 Wrote: I only have at the moment the master branch locally synced on my macbook pro.When i'm off work i could build it,this will good enough for your test?Otherwise i have to setup the build env for frodo branch and will take a little longer.

I'm OK with either version but since 12.2 pre is out of the door and this is a fix that should go in, it would be better IMHO to test against 12.2.

Ok for that i only need to get the Frodo Branch? I'm not sure on how to do that?
When i went to lunch I had the opportunity to leave a build of the master branch running , later i will leave the link here and then you could try it against your Nvidia 9400. When i get the chance i will try to build 12.2 version(the build process is different and i haven't write the script for the Frodo version).
Reply
#8
(2013-04-19, 13:45)LordAnubis3 Wrote:
(2013-04-19, 13:27)pecinko Wrote:
(2013-04-19, 11:45)LordAnubis3 Wrote: I only have at the moment the master branch locally synced on my macbook pro.When i'm off work i could build it,this will good enough for your test?Otherwise i have to setup the build env for frodo branch and will take a little longer.

I'm OK with either version but since 12.2 pre is out of the door and this is a fix that should go in, it would be better IMHO to test against 12.2.

Ok for that i only need to get the Frodo Branch? I'm not sure on how to do that?
When i went to lunch I had the opportunity to leave a build of the master branch running , later i will leave the link here and then you could try it against your Nvidia 9400. When i get the chance i will try to build 12.2 version(the build process is different and i haven't write the script for the Frodo version).

pecinko
here you go. This is a build from master. try with this one please. then,please, give me feedback. what i did was only change to false the value of m_use_cvBufferRef to false.;
Reply
#9
Thanks for the link.

I have tested this on my Mini and I can confirm it really does get rid of white line(s).
My skins:

Amber
Quartz

Reply

Logout Mark Read Team Forum Stats Members Help
Know video card number0