91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 26.97MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-16
  • 語言: 其他
  • 標簽: cuvid??

資源簡介

英偉達 最新的Video_Codec_SDK_9.0.20 sdk 不用去官網,還要注冊麻煩

資源截圖

代碼片段和文件信息

/*
*?Copyright?2017-2018?NVIDIA?Corporation.??All?rights?reserved.
*
*?Please?refer?to?the?NVIDIA?end?user?license?agreement?(EULA)?associated
*?with?this?source?code?for?terms?and?conditions?that?govern?your?use?of
*?this?software.?Any?use?reproduction?disclosure?or?distribution?of
*?this?software?and?related?documentation?outside?the?terms?of?the?EULA
*?is?strictly?prohibited.
*
*/

#include?
#include?
#include?
#include?
#include?“NvDecoder/NvDecoder.h“
#include?“../Utils/NvCodecUtils.h“
#include?“../Utils/FFmpegDemuxer.h“

simplelogger::Logger?*logger?=?simplelogger::LoggerFactory::CreateConsoleLogger();


void?ConvertSemiplanarToPlanar(uint8_t?*pHostframe?int?nWidth?int?nHeight?int?nBitDepth)?{
????if?(nBitDepth?==?8)?{
????????//?nv12->iyuv
????????YuvConverter?converter8(nWidth?nHeight);
????????converter8.UVInterleavedToPlanar(pHostframe);
????}?else?{
????????//?p016->yuv420p16
????????YuvConverter?converter16(nWidth?nHeight);
????????converter16.UVInterleavedToPlanar((uint16_t?*)pHostframe);
????}
}

void?DecodeMediaFile(CUcontext?cuContext?const?char?*szInFilePath?const?char?*szOutFilePath?bool?bOutPlanar
????const?Rect?&cropRect?const?Dim?&resizeDim)
{
????std::ofstream?fpOut(szOutFilePath?std::ios::out?|?std::ios::binary);
????if?(!fpOut)
????{
????????std::ostringstream?err;
????????err?<????????throw?std::invalid_argument(err.str());
????}

????FFmpegDemuxer?demuxer(szInFilePath);
????NvDecoder?dec(cuContext?demuxer.GetWidth()?demuxer.GetHeight()?false?FFmpeg2NvCodecId(demuxer.GetVideoCodec())?NULL?false?false?&cropRect?&resizeDim);

????int?nVideoBytes?=?0?nframeReturned?=?0?nframe?=?0;
????uint8_t?*pVideo?=?NULL?**ppframe;
????bool?bDecodeOutSemiPlanar?=?false;
????do?{
????????demuxer.Demux(&pVideo?&nVideoBytes);
????????dec.Decode(pVideo?nVideoBytes?&ppframe?&nframeReturned);
????????if?(!nframe?&&?nframeReturned)
????????????LOG(INFO)?<????????
????????bDecodeOutSemiPlanar?=?(dec.GetOutputFormat()?==?cudaVideoSurfaceFormat_NV12)?||?(dec.GetOutputFormat()?==?cudaVideoSurfaceFormat_P016);
????????
????????for?(int?i?=?0;?i?ameReturned;?i++)?{
????????????if?(bOutPlanar?&&?bDecodeOutSemiPlanar)?{
????????????????ConvertSemiplanarToPlanar(ppframe[i]?dec.GetWidth()?dec.GetHeight()?dec.GetBitDepth());
????????????}
????????????fpOut.write(reinterpret_cast(ppframe[i])?dec.GetframeSize());
????????}
????????nframe?+=?nframeReturned;
????}?while?(nVideoBytes);

????std::vector??aszDecodeOutFormat?=?{?“NV12“?“P016“?“YUV444“?“YUV444P16“?};
????if?(bOutPlanar)?{
????????aszDecodeOutFormat[0]?=?“iyuv“;???aszDecodeOutFormat[1]?=?“yuv420p16“;
????}
????std::cout?<ame?decoded:?“?<ame?<????????????<

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\
?????文件?????????654??2019-02-19?15:07??Video_Codec_SDK_9.0.20\deprecation_notices.txt
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\doc\
?????文件??????570429??2019-02-19?15:07??Video_Codec_SDK_9.0.20\doc\NVDEC_Application_Note.pdf
?????文件??????694895??2019-02-19?15:07??Video_Codec_SDK_9.0.20\doc\NVDEC_VideoDecoder_API_ProgGuide.pdf
?????文件??????657175??2019-02-19?15:07??Video_Codec_SDK_9.0.20\doc\NVENC_Application_Note.pdf
?????文件??????874733??2019-02-19?15:07??Video_Codec_SDK_9.0.20\doc\NVENC_VideoEncoder_API_ProgGuide.pdf
?????文件??????709164??2019-02-19?15:07??Video_Codec_SDK_9.0.20\doc\Using_FFmpeg_with_NVIDIA_GPU_Hardware_Acceleration.pdf
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\include\
?????文件???????51590??2019-02-19?15:07??Video_Codec_SDK_9.0.20\include\cuviddec.h
?????文件???????23258??2019-02-19?15:07??Video_Codec_SDK_9.0.20\include\nvcuvid.h
?????文件??????211108??2019-02-19?15:07??Video_Codec_SDK_9.0.20\include\nvEncodeAPI.h
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Lib\
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Lib\linux\
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Lib\linux\stubs\
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Lib\linux\stubs\x86_64\
?????文件????????3528??2019-02-19?15:07??Video_Codec_SDK_9.0.20\Lib\linux\stubs\x86_64\libnvcuvid.so
?????文件????????1480??2019-02-19?15:07??Video_Codec_SDK_9.0.20\Lib\linux\stubs\x86_64\libnvidia-encode.so
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Lib\Win32\
?????文件????????9000??2019-02-19?15:07??Video_Codec_SDK_9.0.20\Lib\Win32\nvcuvid.lib
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Lib\x64\
?????文件????????8152??2019-02-19?15:07??Video_Codec_SDK_9.0.20\Lib\x64\nvcuvid.lib
?????文件??????404812??2019-02-19?15:07??Video_Codec_SDK_9.0.20\LicenseAgreement.pdf
?????文件????????7886??2019-02-19?15:07??Video_Codec_SDK_9.0.20\NOTICES.txt
?????文件????????3786??2019-02-19?15:07??Video_Codec_SDK_9.0.20\ReadMe.txt
?????文件????????2258??2019-02-19?15:07??Video_Codec_SDK_9.0.20\Release_notes.txt
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Samples\
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Samples\AppDecode\
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Samples\AppDecode\AppDec\
?????目錄???????????0??2019-02-19?15:12??Video_Codec_SDK_9.0.20\Samples\AppDecode\AppDecD3D\
?????文件????????4608??2019-02-19?15:07??Video_Codec_SDK_9.0.20\Samples\AppDecode\AppDecD3D\AppDecD3D.cpp
............此處省略245個文件信息

評論

共有 條評論