W3D_SetDrawRegionTexture() is not implemented and moreover is removed in the latest versions of the main library and drivers. Calling it due to an outdated interface definition is probably not a great idea.
perhaps a swap out is in order or how they say "wrapper"
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~ 1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x 3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
Awesome. Thanks for that. I see from the code that the U and V planes are interleaved. I wasn't aware of this. That's not how the official format is specified. Fortunately, this isn't going to be a problem, as the plane alignment requirements remain the same.
Hans
It's done that way in the Radeon 2xx driver because it appears to have been some commonly used format (e.g. Y on top, U/V side-by-side below) and I didn't want to differ. As far as the Picasso96 API is concerned it's just 3 pointers with three BytesPerRow values, this gives freedom in driver development so you can physically arrange them any way you want and it will work since the applications will simply use the three pointers and use the three bytesPerRow values to get to other rows.
>the U and V planes are interleaved >you can physically arrange them any way you want
Yes I agree. But desinterleaving them on the fly allow to obtain 3 rectangular textures a big one with Y a small with U a small with V so allowing to use hardware filtering/resizing as Y values are now sequential (same for U same for V)
COBRA wrote: ... As far as the Picasso96 API is concerned it's just 3 pointers with three BytesPerRow values, this gives freedom in driver development so you can physically arrange them any way you want and it will work since the applications will simply use the three pointers and use the three bytesPerRow values to get to other rows.
So, how do you get the three pointers, etc.? M3x's example doesn't show that.
When decoding video the decoder gives the bitmap in planar format (Y, U and V planes separately). Originally we only had overlay using interleaved YUV422 format so I would convert the planar format to interleaved format in software and transfer it to videomem. It's not an issue to convert the format, but the interleaved YUV422 uses 16 bits per pixel (U/V is shared only for pairs of pixels) while most video codecs are 12 bits per pixel (U/V is shared by groups of 4 pixels, 2x2 areas) so when we implemented YUV420P planar mode it gave a significant performance increase due to the fact that less data had to be transferred to video memory, not because data did not have to be interleaved.
However with planar formats you could have a further speed increase by using DMA hardware to transfer the data. This would not be possible with interleaved formats because DMA hardware can't rearrange planar data to interleaved data.
m3x's example uses the interleaved YUV422 format, not the planar YUV420 format. I have a test application which generates a YUV420P test bitmap (colour gradient thing) and outputs it on overlay, do you want that? If you need one that displays an actual image, I can make that but you have to wait for it.
m3x's example uses the interleaved YUV422 format, not the planar YUV420 format. I have a test application which generates a YUV420P test bitmap (colour gradient thing) and outputs it on overlay, do you want that? If you need one that displays an actual image, I can make that but you have to wait for it.
YUV422 is only the first example. M3x also posted a YUV420P example in post #30 of this thread. However, his example hard-codes the format to what th R2xx driver uses.
The source code to your YUV420P test app would be useful. It doesn't have to be an actual image, so long as there is enough detail that it's obvious if something is wrong.
OK, sent you an E-Mail with the test code I found on my hard drive but to be honest I didn't have time to check it maybe it's the same as m3x's one, will look at it tonight after work and if it's not doing it the correct way I'll make some test code for you based on the dvplayer code.
OK, sent you an E-Mail with the test code I found on my hard drive but to be honest I didn't have time to check it maybe it's the same as m3x's one, will look at it tonight after work and if it's not doing it the correct way I'll make some test code for you based on the dvplayer code.
Thanks. I just had a look at it, and it's different from m3x's. Most importantly, it shows how to get the pointers to each plane in the bitmap.
Within the next few hours AMD will be publishing open-source driver code that exposes their Unified Video Decoder (UVD) engine on modern Radeon HD graphics cards
@mr2 Let's hope they release the required documentation for it aswell. If so, i'd be very interested in helping for a bounty to get this. It would mean that even the sam460 would playback fullhd video.
Within the next few hours AMD will be publishing open-source driver code that exposes their Unified Video Decoder (UVD) engine on modern Radeon HD graphics cards
Yes, that will absolutely be useful, provided that there are other developers who are willing to work on all the bits that we'll need. Driver support is just a small part of what's needed. We need an AmigaOS version of VDPAU (Video Decode and Presentation API for Unix), and avcodec needs to be updated to use it too.
BTW, is there an easier way to grab the patches than copying and pasting from the linked to DRI mailing list archives?
Hans
P.S. Implementing all that is needed for HW video decoding is quite an undertaking, so expect it to take a long while.
Yes, that will absolutely be useful, provided that there are other developers who are willing to work on all the bits that we'll need. Driver support is just a small part of what's needed. We need an AmigaOS version of ....
Great! The only way to speed things up (by community) is to donate some cash, IMO. Does anyone smart enough want to divide this complicated task to the stages? Is Amigabounty still around?
Would you be interested in setting up a team for this task? I see cobra seems to have good knowledge, and maybe salass00 and andy. And you could set up a request for a sum of money for it. Im certain people would donate for such a task. As videon is important for many people. Just my thoughts running here.