AMF icon indicating copy to clipboard operation
AMF copied to clipboard

Video Encode API: BFrames not supported on RX 4xx?

Open Xaymar opened this issue 10 years ago • 24 comments

10:41:06.215: [AMF Encoder]  Type | Acc.Type | Max Bitrate | Stream # | Max Profile | Max Level | BFrames | Ref. Frames | Layer # | FSM | Instance #   
10:41:06.215: [AMF Encoder]   AVC | Hardware |   100000000 |       16 |         100 |        52 |      No |    1 -   16 |       1 |  No |          1  
10:41:06.215: [AMF Encoder]   SVC | Hardware |   100000000 |       16 |         100 |        51 |      No |    1 -   16 |       3 |  No |          1 

I get this result when querying the AMF Encoder for capabilities. The RX 480 has a newer VCE (sub-)generation, shouldn't it support BFrames like the R9 380/R9 285?
This is the output when I select the R9 285 (using the older SDK).

10:41:06.215: [AMF Encoder]  Type | Acc.Type | Max Bitrate | Stream # | Max Profile | Max Level | BFrames | Ref. Frames | Layer # | FSM | Instance # 
10:41:06.215: [AMF Encoder]   AVC | Hardware |  1000000000 |       16 |         100 |        51 |     Yes |    1 -   16 |       1 |  No |          1 
10:41:06.215: [AMF Encoder]   SVC | Hardware |  1000000000 |       16 |         100 |        42 |     Yes |    1 -   16 |       3 |  No |          1 

Xaymar avatar Aug 20 '16 08:08 Xaymar

Yes, R9 480 does not support B-frames. You can try new SDK on both HW for consistency.

MikhailAMD avatar Aug 20 '16 19:08 MikhailAMD

I think you meant RX480, if so how is this possible?

kytos22 avatar Aug 20 '16 20:08 kytos22

Yes, HW change.

MikhailAMD avatar Aug 20 '16 20:08 MikhailAMD

Does that mean that Vega and Polaris will not support B-Frame encoding, lowering recording quality? That seems like a strange upgrade from VCE 3.0, are you sure it isn't temporarily disabled until the driver side libraries are ready?

Xaymar avatar Aug 20 '16 22:08 Xaymar

Not totally related, but Polaris definitely supports B-Frames when encoding H.265. Encoding some now.

Roph avatar Aug 21 '16 16:08 Roph

@Roph Using the AMF SDK or Media Foundation implementation?

Xaymar avatar Aug 21 '16 16:08 Xaymar

Using a very early development transcoder. I believe the developer used the new SDK.

Roph avatar Aug 21 '16 23:08 Roph

AMD_Robert just said it may be a mistake: https://www.reddit.com/r/Amd/comments/4y10gr/today_we_released_a_new_version_of_the_amd_media/d6qb71o

kytos22 avatar Aug 22 '16 11:08 kytos22

AMD does not support B-frames for HEVC and H264 on this chip yet.

MikhailAMD avatar Aug 22 '16 22:08 MikhailAMD

Are you sure about that? Using an early test build transcoder I'm able to specify B-frames from 0-3 using HEVC on VCE:

so7tnwb

You can find test transcodes/discussion here: http://forum.videohelp.com/threads/380081-AMD-Polaris-(Radeon-RX-4xx)-H265-Encoding-Samples

I'm not able to check for the presence of actual B-frames in the resulting HEVC video; MediaInfo is the most verbose tool I know of and that doesn't specify.

Roph avatar Aug 23 '16 01:08 Roph

@Roph: If I read your thread right, you have access to a private repository for the SDK? Does that mean that whatever is currently forcing BFrame support to off is version-specific for the SDK?

I've seen many log files for the RX 4xx series now and the capability reporting always shows BFrames as "Not Supported".

Xaymar avatar Aug 23 '16 01:08 Xaymar

Not to the SDK, a developer of VCE-enabled video transcoding software put together an untested new build for me using the new SDK with H265 support. He doesn't have a polaris GPU to test on yet.

It definitely works and produces good (for a GPU) quality HEVC, I can't confirm if it's actually using B-Frames though.

Roph avatar Aug 23 '16 02:08 Roph

But... the SDK doesn't have H265 support yet. Unless he is using the Media Foundation encoder, then it would make sense. (Still impressive speeds for media foundation)

Xaymar avatar Aug 23 '16 02:08 Xaymar

StreamEye can show you if it encodes b-frames or not but it seems not to work on roph's files for some reason even after remux to mkv

nwgat avatar Aug 23 '16 05:08 nwgat

They probably used HEVC encoder MFT. HEVC Encoder AMF was not published yet. But the MFT is built on AMF :)

MikhailAMD avatar Aug 23 '16 14:08 MikhailAMD

@Tukan40 HEVC Encoder is already in the driver side, all it took me to use it was to create the correct component.

Xaymar avatar Aug 23 '16 14:08 Xaymar

Keep in mind that there is no B-frames there. It is a bug in app or MFT reports wrong capabilities.

MikhailAMD avatar Aug 23 '16 14:08 MikhailAMD

Well, I stepped further into the encoder sent by @Roph to me and it indeed seems to be MFT. I have not found a single reference to amfrt32.dll or amfrt64.dll or any wrappers for the c++ classes. So, yes, it's most likely Windows Media Foundation fucking up again.

Xaymar avatar Aug 23 '16 14:08 Xaymar

Yes and no. The MFT is not calling AMF runtime but is built from the same source base. Though, for now one still needs to go through Media Foundation APIs to call it.

MikhailAMD avatar Aug 23 '16 14:08 MikhailAMD

So to clarify @MikhailAMD, is this a software/driver issue or a hardware one? You said AMD doesn't support B-frames on this chip yet, which seems to imply the former. Earlier though you say the chip itself doesn't support them. A little confused.

Roph avatar Sep 28 '16 11:09 Roph