GPU assisted video decoding in XBMC, like motion compensation, idct, and deblocking?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Lightbulb  GPU assisted video decoding in XBMC, like motion compensation, idct, and deblocking?
Post: #1
i've been salivating over the prospects of watching some hdtv streams on xbmc. i haven't been able to find out much about them on the forums (except that everyone seems to be having problems playing them) so i did a little experimenting this afternoon and i don't think the xbox has enough cpu to play them. i'm posting to see if someone will confirm my fears that this is true.

i found a win32 binary of mplayer to test with. i played a few recorded hd streams i have to confirm that mplayer would decode them properly without any tuning. these are 1920x1080 interlaced with ac3 audio streams, using *.ts and *.trp file extensions. all the streams played fine on my 2.6 ghz p4, utilizing between 30-40% cpu (ouch, not expected).

i tried streaming them to the xbox using ccxstream, but the results were poor. i was getting about 7-8 fps while the dropped frames ballooned. thinking perhaps the network was adding some latency, i copied the files local to the xbox. same results, though.

so, is the xbox incapable of playing these hd streams due to hardware limitations? i find this difficult to accept because some games (only a few i think) actually support 1080i as a game resolution. how can the xbox both render, and then raster those frames at 30 fps? this is surely more work than simply decoding the video stream at 30 fps.

are there any optimizations possible to mplayer that might leverage the gpu to offload some of the work (assuming there are none now and the cpu is doing everything alone)? i'm not sure if xbmc mplayer has been optimized for use with the nvidia gpu, but i'm reasonably certain that all nvidia gpus since gf2 have hardware support for all atsc formats.

any thoughts?
find quote
Anomaly Offline
Senior Member
Posts: 280
Joined: Nov 2003
Reputation: 0
Post: #2
not really appropriate to compare it with games. games offload rendering tasks to the gpu for drawing objects, lighting and such. with movies, the cpu is needed to decompress the video/audio and (i guess) pass the result to the gpu. that's why it bites the big one on the 700mhz xbox.

i'm not saying that it can't be done mind you, but my 2.53ghz + geforce 400mx machine was just managing 23fps on that robot sample clip...
find quote
Butcher Offline
Retired Developer
Posts: 761
Joined: Dec 2003
Reputation: 0
Post: #3
the xbox has quite limited cpu resources. it's something i ran into with the mod player - anything over about 16 tracks would saturate the cpu while software mixing.
to get really good performance out of it, we'd have to write the decoders into pixel shaders (possible but hard) to take advantage of the gpu's huge amount of float point processing power.

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.


[Image: badge.gif]
find quote
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Post: #4
(gamester17 @ mar. 02 2004,18:47 Wrote:related discussion with link to samples => http://www.xboxmediaplayer.de/cgi-bin....&t=2027
i want to make sure that everyone understands the differences between the hd-wmv9 streams and the hd transport streams (*.ts and *.trp) discussed in this and several other threads.

while the hd-wmv9 files have been encoded with windows media codecs, i'm not sure how the trp files have been encoded. i'm looking into the situation, but it seem as if these are streams captured from pc-based hd pci cards, like myhd. while atsc prescribes mpeg-2 as the compression format for hdtv, it's anyone's guess what happens after stream is captured by the hd pci card. they may in fact remain mpeg-2 format, but i can't be certain. the files also appear much larger than hd-wmv9 files, indicating lower compression rates. i've seen some full length movies as large as 14 gb!

however, both videolan and mplayer play them right out of the box.
find quote
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Post: #5
(anomaly @ mar. 02 2004,09:11 Wrote:not really appropriate to compare it with games. games offload rendering tasks to the gpu for drawing objects, lighting and such. with movies, the cpu is needed to decompress the video/audio and (i guess) pass the result to the gpu. that's why it bites the big one on the 700mhz xbox.

i'm not saying that it can't be done mind you, but my 2.53ghz + geforce 400mx machine was just managing 23fps on that robot sample clip...
that was actually part of my question. after some digging, i found mention of a feature dubbed "hdvp". it appears that even the geforce2 gts included hardware support for decoding all atsc material.

hdvp whitepaper:

nvidia hdtv support
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #6
(toecutter @ mar. 02 2004,21:03 Wrote:i want to make sure that everyone understands the differences between the hd-wmv9 streams and the hd transport streams (*.ts and *.trp) discussed in this and several other threads.

while the hd-wmv9 files have been encoded with windows media codecs, i'm not sure how the trp files have been encoded. i'm looking into the situation, but it seem as if these are streams captured from pc-based hd pci cards, like myhd. while atsc prescribes mpeg-2 as the compression format for hdtv, it's anyone's guess what happens after stream is captured by the hd pci card. they may in fact remain mpeg-2 format, but i can't be certain. the files also appear much larger than hd-wmv9 files, indicating lower compression rates. i've seen some full length movies as large as 14 gb!

however, both videolan and mplayer play them right out of the box.
i pretty sure *.ts, *.trp and *.ty are all encoded in mpeg-ts (mpeg transport stream, a variation of mpeg-2, designed for streaming).
yes, mplayer does support mpeg-ts, and so does xbmc, it was however broken in the cvs, frodo fixed this last night Smile

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.
find quote
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Post: #7
holy sh*t !

so xbmc and xbox can play the hd streams?

with cvs builds 24 hours behind (due to mirror) when can we expect the fix to be included in the cvs?

great job, frodo !!!! (you too for sheparding the topic, gamester...)

:lol:
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,230
Joined: Oct 2003
Reputation: 177
Post: #8
yes, xbmc should be able to play hd streams. how well it plays the streams is a different story.

butcher (not frodo) was the one who implemented the pixel shader code to do the hardware yv12->rgb conversion.

whether that means that hd streams will now play quick enough is debatable. mpeg2/4 based streams still need a lot of cpu to decode them, and i suspect that for large (1080p) streams the cpu will still be too slow. 720p might be ok now, however. i'll give some a go tonight.

just don't get your hopes up too much!

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.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Sad   
Post: #9
hardware accelerated mpeg-2/ts decoding could maybe be done (assisted that is) with the xbox (nvidia) gpu video processor? Confused

...i can't answer if it's even possible (maybe butcher, jmarshall, monkeyhappy or frodo can?) but here is what i found out (link)

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.
find quote
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Post: #10
well done on assembling the extra hdvp info, gamester. i'm surprised nothing was mentioned in the xdk. although it's conceivable that ms never considered a "media center" application for xbox! i strongly suspect the xbox mc extender is half-hearted answer to xbmc. the xbmc devs should be flattered.

i just installed the latest cvs build of xbmc and the results weren't as good as i had hoped. please, don't take that the wrong way, devs. i understand the monumental task you've under taken and very much appreciate the hard work that goes into these builds. in time i anticipate we'll have beautiful hd mpeg decoding for our xboxes.

for now, mpeg2 decoding appears a little sideways. cvs 4-3-2004 (checkout date), which i understand includes the hardware yv12>rgb conversion according to the docs, plays the vast majority of my mpeg2 files play very "choppily" (is that a word?). i noticed that even the menu screen has what look like interlacing issues. the screen flickers noticeably when in 480p. cvs 1-3-2004 (checkout date) didn't exhibit this behavior, so i assume that the addition of hardware conversion may be the culprit. my mpeg2 files are dvd rips in iso format, both local and ccxstreamed.

anyone else experiencing any issues with mpeg2 files in the new build?
find quote
Butcher Offline
Retired Developer
Posts: 761
Joined: Dec 2003
Reputation: 0
Post: #11
it may be that the cpu can't decode the mpeg stream fast enough.

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.


[Image: badge.gif]
find quote
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Post: #12
(butcher @ mar. 09 2004,17:23 Wrote:it may be that the cpu can't decode the mpeg stream fast enough.
do you know if any of the devs have looked into/discussed the use of the geforce4mx's ability to decode hd material in hardware?

apparently the feature is there, although i'm far from certain on how it's implemented (because, well, i'm not a dev!Wink.

gamester posted some info on this earlier, but i'm not sure how much, if any, attention it got from the dev group.
find quote
Butcher Offline
Retired Developer
Posts: 761
Joined: Dec 2003
Reputation: 0
Post: #13
xbox isn't actually running a gf4 mx btw. [Image: tounge.gif]

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.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #14
(toecutter @ mar. 09 2004,22:45 Wrote:do you know if any of the devs have looked into/discussed the use of the geforce4mx's ability to decode hd material in hardware?
(butcher @ mar. 10 2004,01:47 Wrote:xbox isn't actually running a gf4 mx btw. [Image: tounge.gif]
i think toecutter meant hdvp which geforce2 gpu has (and i hope xbox has too, don't know how to confirm). rfe (link)

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.
find quote
ToeCutter Offline
Member
Posts: 79
Joined: Feb 2004
Reputation: 0
Post: #15
fyi:

i read up on the friendtech mod. it seems that a few reviewers had problems with mpeg2 files. it seems the dvd and mpeg2 decoders for xbox uses the cpu clock cycles to sync the av streams?

would this affect xbmc?

has anyone tried running xbmc on a friendtech modded xbox?
find quote
Post Reply