1 Reply Latest reply on Jul 30, 2017 11:10 AM by ravin.wang

    AMD Radeon Pro 560 does not support Content Protection for HEVC Main/Main10

    ravin.wang

      I have one MacBook Pro 2017, using the D3D codes, it is found:

      PROFILE_MPEG2_VLD/PROFILE_MPEG2_IDCT/PROFILE_H264_VLD_NOFGTPROFILE_H264_VLD_NOFGT/PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT/PROFILE_H264_VLD_STEREO_NOFGT/PROFILE_VC1_VLD HW decoder profile can support Content Protection, but it is very weird that PROFILE_HEVC_VLD_MAIN/PROFILE_HEVC_VLD_MAIN10 can't support it.

       

      Does AMD have advance plan to support it?

       

      Thanks.

        • Re: AMD Radeon Pro 560 does not support Content Protection for HEVC Main/Main10
          ravin.wang
          #include "stdafx.h"
          #include <Windows.h>
          #include <wrl/client.h>
          #include <tuple>
          using namespace Microsoft::WRL;
          #define VDEC_PROFILE_NAME(x) \
           (x == D3D11_DECODER_PROFILE_MPEG2_MOCOMP?"PROFILE_MPEG2_MOCOMP":(\
           (x == D3D11_DECODER_PROFILE_MPEG2_IDCT?"PROFILE_MPEG2_IDCT":(\
           (x == D3D11_DECODER_PROFILE_MPEG2_VLD?"PROFILE_MPEG2_VLD":(\
           (x == D3D11_DECODER_PROFILE_MPEG1_VLD?"PROFILE_MPEG1_VLD":(\
           (x == D3D11_DECODER_PROFILE_MPEG2and1_VLD?"PROFILE_MPEG2and1_VLD":(\
           (x == D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT?"PROFILE_H264_MOCOMP_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_H264_MOCOMP_FGT?"PROFILE_H264_MOCOMP_FGT":(\
           (x == D3D11_DECODER_PROFILE_H264_IDCT_NOFGT?"PROFILE_H264_IDCT_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_H264_IDCT_FGT?"PROFILE_H264_IDCT_FGT":(\
           (x == D3D11_DECODER_PROFILE_H264_VLD_NOFGT?"PROFILE_H264_VLD_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_H264_VLD_FGT?"PROFILE_H264_VLD_FGT":(\
           (x == D3D11_DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT?"PROFILE_H264_VLD_WITHFMOASO_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT?"PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT?"PROFILE_H264_VLD_STEREO_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT?"PROFILE_H264_VLD_MULTIVIEW_NOFGT":(\
           (x == D3D11_DECODER_PROFILE_WMV8_POSTPROC?"PROFILE_WMV8_POSTPROC":(\
           (x == D3D11_DECODER_PROFILE_WMV8_MOCOMP?"PROFILE_WMV8_MOCOMP":(\
           (x == D3D11_DECODER_PROFILE_WMV9_POSTPROC?"PROFILE_WMV9_POSTPROC":(\
           (x == D3D11_DECODER_PROFILE_WMV9_MOCOMP?"PROFILE_WMV9_MOCOMP":(\
           (x == D3D11_DECODER_PROFILE_WMV9_IDCT?"PROFILE_WMV9_IDCT":(\
           (x == D3D11_DECODER_PROFILE_VC1_POSTPROC?"PROFILE_VC1_POSTPROC":(\
           (x == D3D11_DECODER_PROFILE_VC1_MOCOMP?"PROFILE_VC1_MOCOMP":(\
           (x == D3D11_DECODER_PROFILE_VC1_IDCT?"PROFILE_VC1_IDCT":(\
           (x == D3D11_DECODER_PROFILE_VC1_VLD?"PROFILE_VC1_VLD":(\
           (x == D3D11_DECODER_PROFILE_VC1_D2010?"PROFILE_VC1_D2010":(\
           (x == D3D11_DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE?"PROFILE_MPEG4PT2_VLD_SIMPLE":(\
           (x == D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC?"PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC":(\
           (x == D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC?"PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC":(\
           (x == D3D11_DECODER_PROFILE_HEVC_VLD_MAIN?"PROFILE_HEVC_VLD_MAIN":(\
           (x == D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10?"PROFILE_HEVC_VLD_MAIN10":(\
           (x == D3D11_DECODER_PROFILE_VP9_VLD_PROFILE0?"PROFILE_VP9_VLD_PROFILE0":(\
           (x == D3D11_DECODER_PROFILE_VP9_VLD_10BIT_PROFILE2?"PROFILE_VP9_VLD_10BIT_PROFILE2":(\
           (x == D3D11_DECODER_PROFILE_VP8_VLD?"PROFILE_VP8_VLD":"Unknown")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
          int main()
          {
           HRESULT hr = S_OK;
           ComPtr<ID3D11Device> spD3D11Device;
           D3D_FEATURE_LEVEL FeatureLevel;
           static const D3D_FEATURE_LEVEL levels[] =
           {
            D3D_FEATURE_LEVEL_11_1,
            D3D_FEATURE_LEVEL_10_0,
           };
          UINT flags = D3D11_CREATE_DEVICE_VIDEO_SUPPORT | D3D11_CREATE_DEVICE_BGRA_SUPPORT | D3D11_CREATE_DEVICE_DEBUG;
          if (SUCCEEDED(D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr,
                  flags, levels, ARRAYSIZE(levels), D3D11_SDK_VERSION, &spD3D11Device, &FeatureLevel,nullptr)))
           {
            ComPtr<ID3D11VideoDevice> spVideoDevice;
            if (SUCCEEDED(spD3D11Device.As(&spVideoDevice)))
                 {
            UINT nProfileCount = spVideoDevice->GetVideoDecoderProfileCount();
            for (UINT idxProfile = 0; idxProfile < spVideoDevice->GetVideoDecoderProfileCount(); idxProfile++)
            {
              GUID guidProfile = GUID_NULL;
              if (SUCCEEDED(spVideoDevice->GetVideoDecoderProfile(idxProfile, &guidProfile)))
              {
              D3D11_VIDEO_CONTENT_PROTECTION_CAPS cp_caps;
              if (FAILED(hr = spVideoDevice->GetContentProtectionCaps(&D3D11_CRYPTO_TYPE_AES128_CTR, &guidProfile, &cp_caps)))
                printf("Failed to get content protection caps for profile %s, hr: 0X%X\n", VDEC_PROFILE_NAME(guidProfile), hr);
              else
                printf("Get content protection caps for profile %s successfully\n", VDEC_PROFILE_NAME(guidProfile));
              }
            }
            }
           }
          }
          
          
          
          
          
          
          
          
          
          
          

           

          Output:

          Get content protection caps for profile PROFILE_MPEG2_VLD successfully

          Get content protection caps for profile PROFILE_MPEG2_IDCT successfully

          Get content protection caps for profile PROFILE_H264_VLD_NOFGT successfully

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Get content protection caps for profile Unknown successfully

          Failed to get content protection caps for profile PROFILE_HEVC_VLD_MAIN, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Get content protection caps for profile PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT successfully

          Get content protection caps for profile PROFILE_H264_VLD_STEREO_NOFGT successfully

          Get content protection caps for profile PROFILE_VC1_VLD successfully

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Get content protection caps for profile PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC successfully

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile PROFILE_HEVC_VLD_MAIN10, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057

          Failed to get content protection caps for profile Unknown, hr: 0X80070057