Commit c69f18e0 by 吕文玲-腾讯

Initial commit

parent a10ee9b0

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1340
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicYUVDll", "BasicYUVDll\BasicYUVDll.vcxproj", "{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Debug|x64.ActiveCfg = Debug|x64
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Debug|x64.Build.0 = Debug|x64
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Debug|x86.ActiveCfg = Debug|Win32
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Debug|x86.Build.0 = Debug|Win32
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Release|x64.ActiveCfg = Release|x64
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Release|x64.Build.0 = Release|x64
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Release|x86.ActiveCfg = Release|Win32
{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E9943D10-DF43-4165-B647-A8BA4A1BF7C2}
EndGlobalSection
EndGlobal
#include "pch.h"
#include "BasicYUVDll.h"
extern "C" BASICYUVDLL_EXPORTS_API void HelloWorld()
{
return void BASICYUVDLL_EXPORTS_API();
}
PSCALEHANDLE BASICYUVDLL_EXPORTS_API CreateScaleProject()
{
ScaleClass* scalePro = new ScaleClass();
return scalePro;
}
BOOL BASICYUVDLL_EXPORTS_API DestroyScaleProject(PSCALEHANDLE project)
{
ScaleClass* scalePro = (ScaleClass*)project;
if (scalePro)
{
delete scalePro;
return TRUE;
}
return TRUE;
}
BOOL BASICYUVDLL_EXPORTS_API YuvToPng(PSCALEHANDLE project, const void * yuv, int srcw, int srch, int length, int dstw, int dsth, char * path)
{
ScaleClass* scalePro = (ScaleClass*)project;
if (!scalePro)
{
return FALSE;
}
return scalePro->Yuv420ToPNG(yuv,srcw,srch,length,dstw,dsth,path);
}
BOOL BASICYUVDLL_EXPORTS_API YuvToRGB(PSCALEHANDLE project, const void * yuv, int srcw, int srch, int length, int dstw, int dsth, void * dst)
{
ScaleClass* scalePro = (ScaleClass*)project;
if (!scalePro)
{
return FALSE;
}
return scalePro->Yuv420ToRGB(yuv, srcw, srch, length, dstw, dsth, dst);
}
#pragma once
#ifdef BASICYUVDLL_EXPORTS // 这里将 "DLL1_EXPORTS" 替换为上一步中记录的字符串
#define BASICYUVDLL_EXPORTS_API __declspec(dllexport) // 这里将 "DLL1_API" 中的 "DLL1" 替换为上一步中记录的字符串的 "_EXPORT" 之前的部分(此处即为 "DLL1")
#else
#define BASICYUVDLL_EXPORTS_API __declspec(dllimport) // 同上
#endif
typedef void* PSCALEHANDLE;
//BASICYUVDLL_EXPORTS
extern "C" PSCALEHANDLE BASICYUVDLL_EXPORTS_API CreateScaleProject();
extern "C" BOOL BASICYUVDLL_EXPORTS_API DestroyScaleProject(PSCALEHANDLE project);
extern "C" BOOL BASICYUVDLL_EXPORTS_API YuvToPng(PSCALEHANDLE project,const void* yuv,int srcw,int srch,int length,int dstw, int dsth, char *path);
extern "C" BOOL BASICYUVDLL_EXPORTS_API YuvToRGB(PSCALEHANDLE project, const void* yuv, int srcw, int srch, int length, int dstw, int dsth, void *dst);
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{6FF3DA53-A83A-40D6-B3DF-D55061FFF806}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>BasicYUVDll</RootNamespace>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;BASICYUVDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;BASICYUVDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>D:\CodeWorkspace\FfmpegTest\BasicYUVDll\Extra\ffmpeg\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>D:\CodeWorkspace\FfmpegTest\BasicYUVDll\Extra\ffmpeg\Lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;BASICYUVDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;BASICYUVDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>D:\CodeWorkspace\FfmpegTest\BasicYUVDll\Extra\ffmpeg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>D:\CodeWorkspace\FfmpegTest\BasicYUVDll\Extra\ffmpeg\Lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>avcodec.lib;avdevice.lib;avfilter.lib;avformat.lib;avutil.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="BasicYUVDll.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="ScaleClass.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BasicYUVDll.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="ScaleClass.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="pch.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="BasicYUVDll.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="ScaleClass.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="BasicYUVDll.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="ScaleClass.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
d:\codeworkspace\ffmpegtest\basicyuvdll\debug\basicyuvdll.lib
d:\codeworkspace\ffmpegtest\basicyuvdll\debug\basicyuvdll.exp
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.pch
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\vc141.pdb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\vc141.idb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\pch.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\dllmain.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\debug\basicyuvdll.ilk
d:\codeworkspace\ffmpegtest\basicyuvdll\debug\basicyuvdll.dll
d:\codeworkspace\ffmpegtest\basicyuvdll\debug\basicyuvdll.pdb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\basicyuvdll.write.1u.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\cl.command.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\cl.read.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\cl.write.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\link.command.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\link.read.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\debug\basicyuvdll.tlog\link.write.1.tlog
 pch.cpp
ScaleClass.cpp
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\scaleclass.h(6): fatal error C1083: 无法打开包括文件: “libswscale/swscale.h”: No such file or directory
BasicYUVDll.cpp
dllmain.cpp
正在生成代码...
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.19041.0
Debug|Win32|D:\CodeWorkspace\FfmpegTest\BasicYUVDll\|
#include "pch.h"
#include "ScaleClass.h"
ScaleClass::ScaleClass()
{
}
BOOL ScaleClass::Yuv420ToPNG(const void * yuv, int srcw, int srch, int length,int dstw,int dsth,char * path)
{
SwsContext *img_convert_ctx = NULL;
const AVPixelFormat srcPixelFormat = AV_PIX_FMT_YUV420P;
const AVPixelFormat dstPixelFormat = AV_PIX_FMT_RGB24;
uint8_t *src_data[4];
int src_linesize[4];
uint8_t *dst_data[4];
int dst_linesize[4];
//1. 获得指定像素格式的AVPixFmtDescriptor结构体
const AVPixFmtDescriptor * pSrcPixFmtDes = av_pix_fmt_desc_get(srcPixelFormat);
//2. 获得指定像素格式每个像素占用的比特数bpp(Bit Per Pixel)
int srcBpp = av_get_bits_per_pixel(pSrcPixFmtDes);
const AVPixFmtDescriptor * pDstPixFmtDes = av_pix_fmt_desc_get(dstPixelFormat);
int dstBpp = av_get_bits_per_pixel(pDstPixFmtDes);
//3. 根据宽高,像素格式分配buffer大小
if (av_image_alloc(src_data, src_linesize, srcw, srch, srcPixelFormat, 1) < 0) {
return FALSE;
}
if (av_image_alloc(dst_data, dst_linesize, dstw, dsth, dstPixelFormat, 1) < 0) {
return FALSE;
}
img_convert_ctx = sws_getContext(srcw, srch, srcPixelFormat,
dstw, dsth, dstPixelFormat,
SWS_BICUBIC, NULL, NULL, NULL);
//4. 为SwsContext结构体分配内存。
//img_convert_ctx = sws_alloc_context();
////Show AVOption
////av_opt_show2(img_convert_ctx, stdout, AV_OPT_FLAG_VIDEO_PARAM, 0);
////图像拉伸 SWS_BICUBIC性能比较好;SWS_FAST_BILINEAR在性能和速度之间有一个比好好的平衡。
////const int rescale_method = SWS_BICUBIC;
////5. 设置值
//av_opt_set_int(img_convert_ctx, "sws_flags", SWS_BICUBIC | SWS_PRINT_INFO, 0);
//av_opt_set_int(img_convert_ctx, "srcw", srcw, 0);
//av_opt_set_int(img_convert_ctx, "srch", srch, 0);
//av_opt_set_int(img_convert_ctx, "src_format", srcPixelFormat, 0);
////'0' for MPEG (Y:0-235);'1' for JPEG (Y:0-255)
//av_opt_set_int(img_convert_ctx, "src_range", 1, 0);
//av_opt_set_int(img_convert_ctx, "dstw", dstw, 0);
//av_opt_set_int(img_convert_ctx, "dsth", dsth, 0);
//av_opt_set_int(img_convert_ctx, "dst_format", dstPixelFormat, 0);
//av_opt_set_int(img_convert_ctx, "dst_range", 1, 0);
//sws_init_context(img_convert_ctx, NULL, NULL);//对SwsContext中的各种变量进行赋值
uint8_t *temp_buffer = (uint8_t *)yuv;
memcpy(src_data[0], temp_buffer, srcw*srch); //Y
memcpy(src_data[1], temp_buffer + srcw * srch, srcw * srch / 4); //U
memcpy(src_data[2], temp_buffer + srcw * srch * 5 / 4, srcw*srch / 4); //V
sws_scale(img_convert_ctx, src_data, src_linesize, 0, srch, dst_data, dst_linesize);//转换像素
//printf("Finish process frame %5d\n", frame_idx);
//保存
/*FILE* outFile;
fopen_s(&outFile, path, "wb");
fwrite(dst_data[0], 1, dstw * dsth * 3, outFile);
fclose(outFile);*/
SaveRgbFile(dst_data[0], path, dstw * dsth * 3);
sws_freeContext(img_convert_ctx);
//free(temp_buffer);
av_freep(&src_data[0]);
av_freep(&dst_data[0]);
return TRUE;
}
BOOL ScaleClass::Yuv420ToRGB(const void * yuv, int srcw, int srch, int length, int dstw, int dsth,void* dst)
{
SwsContext *img_convert_ctx = NULL;
const AVPixelFormat srcPixelFormat = AV_PIX_FMT_YUV420P;
const AVPixelFormat dstPixelFormat = AV_PIX_FMT_BGR24;
uint8_t *src_data[4];
int src_linesize[4];
uint8_t *dst_data[4];
int dst_linesize[4];
try {
//1. 获得指定像素格式的AVPixFmtDescriptor结构体
const AVPixFmtDescriptor * pSrcPixFmtDes = av_pix_fmt_desc_get(srcPixelFormat);
//2. 获得指定像素格式每个像素占用的比特数bpp(Bit Per Pixel)
int srcBpp = av_get_bits_per_pixel(pSrcPixFmtDes);
const AVPixFmtDescriptor * pDstPixFmtDes = av_pix_fmt_desc_get(dstPixelFormat);
int dstBpp = av_get_bits_per_pixel(pDstPixFmtDes);
//3. 根据宽高,像素格式分配buffer大小
if (av_image_alloc(src_data, src_linesize, srcw, srch, srcPixelFormat, 1) < 0) {
return FALSE;
}
if (av_image_alloc(dst_data, dst_linesize, dstw, dsth, dstPixelFormat, 1) < 0) {
return FALSE;
}
//4. 为SwsContext结构体分配内存并赋值
img_convert_ctx = sws_getContext(srcw, srch, srcPixelFormat,
dstw, dsth, dstPixelFormat,
SWS_BICUBIC, NULL, NULL, NULL);
uint8_t *temp_buffer = (uint8_t *)yuv;
memcpy(src_data[0], temp_buffer, srcw*srch); //Y
memcpy(src_data[1], temp_buffer + srcw * srch, srcw * srch / 4); //U
memcpy(src_data[2], temp_buffer + srcw * srch * 5 / 4, srcw*srch / 4); //V
//5. 转换像素
sws_scale(img_convert_ctx, src_data, src_linesize, 0, srch, dst_data, dst_linesize);
memcpy(dst, dst_data[0], dstw * dsth * 3);
sws_freeContext(img_convert_ctx);
av_freep(&src_data[0]);
av_freep(&dst_data[0]);
return TRUE;
}
catch (...)
{
return FALSE;
throw;
}
}
int ScaleClass::SaveRgbFile(const void * data, char * path, int length)
{
if (data == nullptr) return -1;
FILE* outFile;
fopen_s(&outFile, path, "wb");
fwrite(data, 1, length, outFile);
fclose(outFile);
return 0;
}
#pragma once
#include <stdio.h>
extern "C"
{
#ifdef _cplusplus
#define __STDC_CONSTANT_MACROS
#endif
}
extern "C"
{
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
};
class ScaleClass
{
public:
ScaleClass();
BOOL Yuv420ToPNG(const void * yuv, int srcw, int srch, int length, int dstw, int dsth, char * path);
BOOL Yuv420ToRGB(const void * yuv, int srcw, int srch, int length, int dstw, int dsth,void *dst);
private:
int SaveRgbFile(const void* data,char * path,int length);
};
// dllmain.cpp : 定义 DLL 应用程序的入口点。
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#pragma once
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
// Windows 头文件
#include <windows.h>
// pch.cpp: 与预编译标头对应的源文件
#include "pch.h"
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
// pch.h: 这是预编译标头文件。
// 下方列出的文件仅编译一次,提高了将来生成的生成性能。
// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。
// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。
// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。
#ifndef PCH_H
#define PCH_H
// 添加要在此处预编译的标头
#include "framework.h"
#include "ScaleClass.h"
#endif //PCH_H
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\debug\basicyuvdll.lib
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\debug\basicyuvdll.exp
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.pch
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\vc141.pdb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\vc141.idb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\pch.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\scaleclass.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\dllmain.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\debug\basicyuvdll.ilk
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\debug\basicyuvdll.dll
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\debug\basicyuvdll.pdb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\basicyuvdll.write.1u.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\cl.command.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\cl.read.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\cl.write.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\link.command.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\link.read.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\debug\basicyuvdll.tlog\link.write.1.tlog
 pch.cpp
BasicYUVDll.cpp
dllmain.cpp
ScaleClass.cpp
正在生成代码...
正在创建库 D:\CodeWorkspace\FfmpegTest\BasicYUVDll\x64\Debug\BasicYUVDll.lib 和对象 D:\CodeWorkspace\FfmpegTest\BasicYUVDll\x64\Debug\BasicYUVDll.exp
BasicYUVDll.vcxproj -> D:\CodeWorkspace\FfmpegTest\BasicYUVDll\x64\Debug\BasicYUVDll.dll
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.19041.0
Debug|x64|D:\CodeWorkspace\FfmpegTest\BasicYUVDll\|
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\release\basicyuvdll.lib
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\release\basicyuvdll.exp
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\release\basicyuvdll.ipdb
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\release\basicyuvdll.iobj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.pch
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\vc141.pdb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\pch.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\scaleclass.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\dllmain.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.obj
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\release\basicyuvdll.dll
d:\codeworkspace\ffmpegtest\basicyuvdll\x64\release\basicyuvdll.pdb
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\basicyuvdll.write.1u.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\cl.command.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\cl.read.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\cl.write.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\link.command.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\link.read.1.tlog
d:\codeworkspace\ffmpegtest\basicyuvdll\basicyuvdll\x64\release\basicyuvdll.tlog\link.write.1.tlog
 pch.cpp
BasicYUVDll.cpp
dllmain.cpp
ScaleClass.cpp
正在创建库 D:\CodeWorkspace\FfmpegTest\BasicYUVDll\x64\Release\BasicYUVDll.lib 和对象 D:\CodeWorkspace\FfmpegTest\BasicYUVDll\x64\Release\BasicYUVDll.exp
正在生成代码
All 10 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
BasicYUVDll.vcxproj -> D:\CodeWorkspace\FfmpegTest\BasicYUVDll\x64\Release\BasicYUVDll.dll
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.19041.0
Release|x64|D:\CodeWorkspace\FfmpegTest\BasicYUVDll\|
K 25
svn:wc:ra_dav:version-url
V 59
/svn/dev_panlinear1980/!svn/ver/1606/common/codec/inc/DNxHD
END
AvidHDCodecSDKdll.h
K 25
svn:wc:ra_dav:version-url
V 79
/svn/dev_panlinear1980/!svn/ver/1606/common/codec/inc/DNxHD/AvidHDCodecSDKdll.h
END
AvidDNXIDs.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1606/common/codec/inc/DNxHD/AvidDNXIDs.h
END
AvidDNXCodecParams.h
K 25
svn:wc:ra_dav:version-url
V 80
/svn/dev_panlinear1980/!svn/ver/1606/common/codec/inc/DNxHD/AvidDNXCodecParams.h
END
AvidHDCodecSDK.h
K 25
svn:wc:ra_dav:version-url
V 76
/svn/dev_panlinear1980/!svn/ver/1606/common/codec/inc/DNxHD/AvidHDCodecSDK.h
END
10
dir
2512
http://soft-desktop:18080/svn/dev_panlinear1980/common/codec/inc/DNxHD
http://soft-desktop:18080/svn/dev_panlinear1980
2014-03-27T05:39:03.620175Z
1606
gaozhanjun
f6e9b7a2-83e5-46f1-a154-58e556d148d2
AvidHDCodecSDKdll.h
file
2016-01-05T09:11:39.265612Z
b6f226aaa2422bcaa431463c1fb579c5
2014-03-27T05:39:03.620175Z
1606
gaozhanjun
571
AvidDNXIDs.h
file
2016-01-05T09:11:39.265612Z
16980be354bd280299925311c9b962ea
2014-03-27T05:39:03.620175Z
1606
gaozhanjun
1827
AvidDNXCodecParams.h
file
2016-01-05T09:11:39.266612Z
5c6d6f6bd47afdeb45e509b9a6963edc
2014-03-27T05:39:03.620175Z
1606
gaozhanjun
7922
AvidHDCodecSDK.h
file
2016-01-05T09:11:39.266612Z
58c6b767ae2c3ffc066b82aef6980ed9
2014-03-27T05:39:03.620175Z
1606
gaozhanjun
9287
/** Enums for uncompressed data format parameters.
* \file AvidDNXCodecParams.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
#ifndef AVIDCODECPARAMS_H
#define AVIDCODECPARAMS_H
/**
Defines the colors space of the Uncompressed Data Format.
*/
namespace dnx_types
{
enum DF_ColorSpace_t
{
CS_INVALID = 0x0 ///<Default value
,CS_RGB = 0x2 ///<RGB colorspace
,CS_YCbCr_709 = 0x8 ///<ITU 709 standard colorspace
};
/**
The uncompressed Color Component Order.
*/
enum DF_ColorComponentOrder_t
{
CCO_INVALID = 0x0000 ///<Default value
,CCO_YCbYCr_NoA = 0x0001 ///<Y0CbY1Cr
,CCO_CbYCrY_NoA = 0x0002 ///<CbY0CrY1
,CCO_ARGB_Interleaved = 0x0004 ///<ARGB
,CCO_BGRA_Interleaved = 0x0008 ///<BGRA
};
/**
Indicates the type of chroma subsampling.
*/
enum DF_ChromaSubSampling_t
{
CSS_INVALID = 0x000 ///<Default value
,CSS_4220 = 0x001 ///<4:2:2 sampling (no alpha)
,CSS_4444 = 0x004 ///<Full resolution sampling RGBA
};
/**
This is used by applications to allow the codecs to decompress
into multiple sizes based on the possibility of faster performance.
*/
enum DF_Resolution_t
{
RS_INVALID = 0x0 ///<Default value
,RS_FULL = 0x1 ///<Full resolution
};
/**
This describes the signal standard.
*/
enum DF_SignalStandard_t
{
SS_INVALID = 0x000 ///<Default value
,SS_None = 0x001 ///<No signal standard used
,SS_274M_I = 0x020 ///<HD Interlaced. Refers to SMPTE standard 274M for interlaced material.
,SS_274M_P = 0x040 ///<HD Progressive. Refers to SMPTE standard 274M for progressive material.
,SS_296M_P = 0x080 ///<HD Progressive. Refers to SMPTE standard 296M for progressive material.
};
/**
This describes the type representation of the component data.
*/
enum DF_ComponentType_t
{
CT_INVALID = 0x000 ///<Default value
,CT_UCHAR = 0x001 ///<8 bit
,CT_USHORT_10_6 = 0x004
,CT_SHORT_2_14 = 0x008
,CT_SHORT = 0x010 ///<16 bit. Byte ordering is machine dependent.
,CT_10Bit_2_8 = 0x040 ///<10 bit in 2_8 format. Byte ordering is fixed. This is to be used with 10-bit 4:2:2 YCbCr components.
,CT_V210 = 0x400
};
/**
This describes buffer field order of the uncompressed data.
*/
enum DF_BufferFieldOrder_t
{
BFO_INVALID = 0x000 ///<Default value
,BFO_Merged_F1_First = 0x001 ///<Use this buffer field order for interlaced frames. The first line of the buffer is field 1, the second line field 2 ... .
,BFO_Progressive = 0x040 ///<Use this buffer field order for progressive frames. All lines of the progressive frame are stored in order.
};
/**
This describes raster geometry of the uncompressed buffer. One of the characteristics defined by the raster geometry type is the dimensions of the raster.
*/
enum DF_RasterGeometryType_t
{
RGT_INVALID = 0x0 ///<Default value
,RGT_SignalStandard = 0x1 ///< Signal standard raster. 1920 x 1080 with top line field 1 for 1080i resolutions. 1920 x 1080 for 1080p resolutions. 1280 x 720 for 720p resolutions.
,RGT_NativeCompressed = 0x4 ///< Raster Geometry type is native to the codec. Should be used to compress 1440 x 1080 frames with field 1 on top using DNX_145_1440_1080i_COMPRESSION_ID.
};
/**
Specifies the alignment of buffer.
*/
enum DF_BufferLineOrientation_t
{
BLO_INVALID = 0x0 ///<Default
,BLO_Top_Bot = 0x1 ///<Top to bottom scanning
};
/**
Indicates the range of values taken by the components.
*/
enum DF_ComponentRangeType_t
{
CRT_INVALID = 0x0 ///<Default
,CRT_VideoRange = 0x1 ///<White and black levels per the ITU 709 color space.
};
/**
This indicates the operation to be performed by the codec.
*/
enum CodecOperation_t
{
CO_INVALID = 0 ///<Default
,CO_ENCODE = 0x1 ///<Encode
,CO_DECODE = 0x2 ///<Decode
};
/**
Container for the uncompressed data format parameters.
*/
/*!
@class UncompInfo_t
@abstract
Container for the uncompressed data format parameters.
*/
class UncompInfo_t
{
public:
DF_ColorSpace_t m_colorSpace;
DF_ColorComponentOrder_t m_colorComponentOrder;
DF_ChromaSubSampling_t m_chromaSubSampling;
DF_Resolution_t m_resolution;
DF_SignalStandard_t m_signalStandard;
DF_ComponentType_t m_componentType;
DF_ComponentRangeType_t m_componentRangeType;
DF_BufferFieldOrder_t m_bufferFieldOrder;
DF_BufferLineOrientation_t m_bufferLineOrientation;
DF_RasterGeometryType_t m_rasterGeometryType;
bool m_bIsAlphaPresent;
unsigned int m_uncompressedBufferAlignment;
bool m_isAlpha0Transparent;
UncompInfo_t()
{
m_bIsAlphaPresent = false;
m_bufferFieldOrder = BFO_INVALID;
m_bufferLineOrientation = BLO_INVALID;
m_chromaSubSampling = CSS_INVALID;
m_colorComponentOrder = CCO_INVALID;
m_colorSpace = CS_INVALID;
m_componentRangeType = CRT_INVALID;
m_componentType = CT_INVALID;
m_isAlpha0Transparent = false;
m_rasterGeometryType = RGT_INVALID;
m_resolution = RS_INVALID;
m_signalStandard = SS_INVALID;
m_uncompressedBufferAlignment = 0;
}
UncompInfo_t(
DF_ColorSpace_t colorSpace,
DF_ColorComponentOrder_t colorComponentOrder,
DF_ChromaSubSampling_t chromaSubSampling,
DF_Resolution_t resolution,
DF_SignalStandard_t signalStandard,
DF_ComponentType_t componentType,
DF_ComponentRangeType_t componentRangeType,
DF_BufferFieldOrder_t bufferFieldOrder,
DF_BufferLineOrientation_t bufferLineOrientation,
DF_RasterGeometryType_t rasterGeometryType,
bool bIsAlphaPresent,
unsigned int uncompressedBufferAlignment,
bool isAlpha0Transparent
)
{
m_colorSpace = colorSpace;
m_colorComponentOrder = colorComponentOrder;
m_chromaSubSampling = chromaSubSampling;
m_resolution = resolution;
m_signalStandard = signalStandard;
m_componentType = componentType;
m_componentRangeType = componentRangeType;
m_bufferFieldOrder = bufferFieldOrder;
m_bufferLineOrientation = bufferLineOrientation;
m_rasterGeometryType = rasterGeometryType;
m_bIsAlphaPresent = bIsAlphaPresent;
m_uncompressedBufferAlignment = uncompressedBufferAlignment;
m_isAlpha0Transparent = isAlpha0Transparent;
}
UncompInfo_t& operator =(const UncompInfo_t& rhs)
{
if(&rhs == this)
return *this;
m_colorSpace = rhs.m_colorSpace;
m_colorComponentOrder = rhs.m_colorComponentOrder;
m_chromaSubSampling = rhs.m_chromaSubSampling;
m_resolution = rhs.m_resolution;
m_signalStandard = rhs.m_signalStandard;
m_componentType = rhs.m_componentType;
m_componentRangeType = rhs.m_componentRangeType;
m_bufferFieldOrder = rhs.m_bufferFieldOrder;
m_bufferLineOrientation = rhs.m_bufferLineOrientation;
m_rasterGeometryType = rhs.m_rasterGeometryType;
m_bIsAlphaPresent = rhs.m_bIsAlphaPresent;
m_uncompressedBufferAlignment = rhs.m_uncompressedBufferAlignment;
m_isAlpha0Transparent = rhs.m_isAlpha0Transparent;
return *this;
}
};
}
#endif
/** This file contains the DNxHD compression enums.
*
* \file AvidDNXids.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
/**
These are the compression enums to be used in the SetInputOutputDataTypes(..) method of the AvidHDCodecSDK class.
*/
#ifndef DNXIDS_H
#define DNXIDS_H
typedef enum DNX_compression_ID_t
{
DNX_220X_1080p_COMPRESSION_ID = 1235, ///< Please see FAQ.
DNX_145_1080p_COMPRESSION_ID = 1237, ///< Please see FAQ.
DNX_220_1080p_COMPRESSION_ID = 1238, ///< Please see FAQ.
DNX_220X_720p_COMPRESSION_ID = 1250, ///< Please see FAQ.
DNX_220_720p_COMPRESSION_ID = 1251, ///< Please see FAQ.
DNX_145_720p_COMPRESSION_ID = 1252, ///< Please see FAQ.
DNX_220X_1080i_COMPRESSION_ID = 1241, ///< Please see FAQ.
DNX_145_1080i_COMPRESSION_ID = 1242, ///< Please see FAQ.
DNX_220_1080i_COMPRESSION_ID = 1243, ///< Please see FAQ.
DNX_145_1440_1080i_COMPRESSION_ID = 1244, ///< Please see FAQ. Thin raster - stored as 1440 width x 1080 height
DNX_36_1080p_COMPRESSION_ID = 1253, ///< Please see FAQ.
DNX_440X_1080p_COMPRESSION_ID = 1256, ///< Please see FAQ.
DNX_100_960_720p_COMPRESSION_ID = 1258, ///< Please see FAQ.
DNX_100_1440_1080p_COMPRESSION_ID = 1259, ///< Please see FAQ.
DNX_100_1440_1080i_COMPRESSION_ID = 1260 ///< Please see FAQ.
} DNX_compression_ID_t;
#endif
/** This file contains the AvidHDCodecSDK class.
*
* \file AvidHDCodecSDK.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
#ifndef AVIDHDCODECSDK_H
#define AVIDHDCODECSDK_H
#include "AvidDNXIDs.h"
#include "AvidDNXCodecParams.h"
#ifdef DLL_LIB
#ifdef DNxHDSDK_EXPORTS
#define DNxHD_API __declspec(dllexport)
#else
#define DNxHD_API __declspec(dllimport)
#endif
#define CALL _stdcall
#else
#define DNxHD_API
#define CALL
#endif
/**
All encode and decode operations are performed using this class.
*/
class AvidHDCodecSDK
{
public:
/**
Virtual Destructor
*/
virtual ~AvidHDCodecSDK();
/**
Gets the version of the API.
\param iMajor The major version.
\param iMinor The minor version.
\param iPatch The patch version.
\param iBuild The build number.
\param iBits Specifies 32 or 64 based on target OS.
\param iRelease 'a' for alpha, 'b' for beta, 'r' for release.
\return void.
*/
virtual void CALL GetAPIVersion(int *iMajor, int *iMinor, int *iPatch, int *iBuild, int *iBits, char *cRelease) = 0;
/////////////////////////////////////////////////////////////////////////
/**
Returns the size in bytes necessary to store the compressed data corresponding to the compression ID provided.
\return The necessary size of the compressed buffer. 0 if SetCompressionID(...) has not been called.
*/
virtual int CALL GetCompressedBufferSize() = 0;
/**
Returns the size in bytes of the largest DNxHD compressed frame size.
\return The maximum size the compressed buffer will be.
*/
static int DNxHD_API GetMaxCompressedBufferSize();
/**
Populates UncompInfo basing on restrictions described in DNxHD SDK manual.
\param uncomp_info UncompInfo to be populated
\param comptype Component type (CT_UCHAR, CT_SHORT etc)
\param comporder Component order (CCO_ARGB_Interleaved etc)
\param sigstand Signal standard: for 1920x1080 progressive it's SS_274M_P, etc, see manual
\param rgt Raster geometry type: use RGT_SignalStandard unless you know what you're doing.
\return void
*/
static void DNxHD_API PopulateUncompInfo(dnx_types::UncompInfo_t & uncomp_info,
dnx_types::DF_ComponentType_t comptype,
dnx_types::DF_ColorComponentOrder_t comporder,
dnx_types::DF_SignalStandard_t sigstand,
dnx_types::DF_RasterGeometryType_t rgt);
/**
Encodes a buffer of uncompressed data into an empty buffer.
\param pInBuf Pointer to the uncompressed data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param pOutBuf Pointer to the encoded data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param uiInBufSize Size of the input buffer in bytes.
\param uiOutBufSize Size of the output buffer in bytes.
\param pEncodeNumberOfBytes Actual size of encoded data in bytes.
\return 0 for no error.
*/
virtual int CALL EncodeFrame(
void *pInBuf,
void *pOutBuf,
unsigned int uiInBufSize,
unsigned int uiOutBufSize,
unsigned int *pEncodeNumberOfBytes
) = 0;
/**
Decodes a buffer of encoded DNxHD data into an empty buffer.
\param pInBuf Pointer to the encoded data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param pOutBuf Pointer to the uncompressed data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param uiInBufSize Size of the input buffer in bytes.
\param uiOutBufSize Size of the output buffer in bytes.
\return 0 for no error.
*/
virtual int CALL DecodeFrame(
void *pInBuf,
void *pOutBuf,
unsigned int uiInBufSize,
unsigned int uiOutBufSize
) = 0;
/**
Sets compressed video format.
Must be called before SetInputOutputDataTypes(...).
\param compID Enum representing the compression bitrate and format.
\return 0 for no error.
*/
virtual int CALL SetCompressionID(DNX_compression_ID_t compID) = 0;
/**
Sets uncompressed video format and whether a compression or decompression operation will be performed.
Called before EncodeFrame(...) or DecodeFrame(...)
\param pDFUnc Uncompressed video format data structure.
\param codecOp Enum representing an encode or decode operation.
\return 0 for no error.
*/
virtual int CALL SetInputOutputDataTypes(
dnx_types::UncompInfo_t * pDFUnc,
dnx_types::CodecOperation_t codecOp
) = 0;
/**
Returns the last error.
\return The last error.
*/
virtual int CALL GetLastError() = 0;
/**
Gets a description of the error associated with an error code.
\param iErrorCode The error code.
\param errorStrPtr Pointer to a buffer in which to store the error description
\param iBufferLength Length of the input buffer in bytes. Should be set to a size that will fit 60 characters.
\return void.
*/
virtual void CALL GetErrorString(int iErrorCode, unsigned char *errorStrPtr, unsigned int iBufferLength) = 0;
/**
Sets the number of bytes in a row of the uncompressed video. Called before DecodeFrame(...).
\param iRowBytes The number of bytes. Must be a multiple of 16.
0 can be passed in if the number of bytes in each row of the uncompressed image matches the
(number of bytes per component) x (raster width) x (number of components).
If the number of bytes in each row is different due to padding, this number should be specified.
\return 0 for no error.
*/
virtual int CALL SetRowBytesForDecode(unsigned int iRowBytes) = 0;
/**
Sets the number of bytes in a row of the uncompressed video. Must be called before EncodeFrame(...).
\param iRowBytes The number of bytes in a row of the raster. Must be a multiple of 16.
0 can be passed in if the number of bytes in each row of the uncompressed image matches the
(number of bytes per component) x (raster width) x (number of components).
If the number of bytes in each row is different due to padding, this number should be specified.
\return 0 for no error.
*/
virtual int CALL SetRowBytesForEncode(unsigned int iRowBytes) = 0;
/**
Sets the number of bytes between fields in the uncompressed buffer. Called before DecodeFrame(...).
\param iInterFieldGapBytes The number of bytes. Must be a multiple of 16.
\return 0 for no error.
*/
virtual int CALL SetInterFieldGapForDecode(unsigned int iInterFieldGapBytes) = 0;
/**
Sets the number of bytes between fields in the uncompressed buffer Called before EncodeFrame(...).
\param iInterFieldGapBytes The number of bytes. Must be a multiple of 16.
\return 0 for no error.
*/
virtual int CALL SetInterFieldGapForEncode(unsigned int iInterFieldGapBytes) = 0;
/**
Sets the number of threads for decode. Maximum value is 8 threads for encode and 16 threads for decode
Must be called after SetRowBytesForDecode in threaded environment
\param iNumThreads The number of threads.
\return 0 for no error.
*/
virtual int CALL SetNumThreadsForDecode(unsigned int iNumThreads) = 0;
/**
Sets the number of threads for encode.
Must be called after SetRowBytesForEncode in threaded environment
\param iNumThreads The number of threads.
\return 0 for no error.
*/
virtual int CALL SetNumThreadsForEncode(unsigned int iNumThreads) = 0;
/**
Gets the number of threads set for decode.
\return 0 for no error.
*/
virtual int CALL GetNumThreadsForDecode() = 0;
/**
Gets the number of threads set for encode.
\return 0 for no error.
*/
virtual int CALL GetNumThreadsForEncode() = 0;
};
/**
Called before CreateAvidHDCodec() is called.
\return 0 for no error.
*/
extern "C" DNxHD_API long InitializeAvidOptimizedDNxHDCodec();
/**
Called after DeleteAvidHDCodec() is called.
\return 0 for no error.
*/
extern "C" DNxHD_API void FinalAvidOptimizedDNxHDCleanUp();
/**
Called after InitializeCodec() is called. Creates an
instance of the AvidHDCodecSDK and passes it to the caller.
Must be deleted with a call to DeleteAvidHDCodec(...).
\return AvidHDCodecSDK *.
*/
extern "C" DNxHD_API AvidHDCodecSDK * CreateAvidOptimizedDNxHDCodec();
/**
Called before FinalCleanUp() is called. Deletes an instance of
an AvidHDCodecSDK passed from the caller.
\param pCodecObject Pointer to an AvidHDCodecSDK object. pCodecObject has been
created with a call to CreateAvidHDCodec().
\return void.
*/
extern "C" DNxHD_API void DeleteAvidOptimizedDNxHDCodec(AvidHDCodecSDK *pCodecObject);
#endif
/** This file should be included if the Windows dynamic link library is used.
*
* \file AvidHDCodecSDKdll.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
#ifndef AVIDHDCODECSDKDLL_H
#define AVIDHDCODECSDKDLL_H
#define DLL_LIB
#include "AvidHDCodecSDK.h"
#endif
/** Enums for uncompressed data format parameters.
* \file AvidDNXCodecParams.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
#ifndef AVIDCODECPARAMS_H
#define AVIDCODECPARAMS_H
/**
Defines the colors space of the Uncompressed Data Format.
*/
namespace dnx_types
{
enum DF_ColorSpace_t
{
CS_INVALID = 0x0 ///<Default value
,CS_RGB = 0x2 ///<RGB colorspace
,CS_YCbCr_709 = 0x8 ///<ITU 709 standard colorspace
};
/**
The uncompressed Color Component Order.
*/
enum DF_ColorComponentOrder_t
{
CCO_INVALID = 0x0000 ///<Default value
,CCO_YCbYCr_NoA = 0x0001 ///<Y0CbY1Cr
,CCO_CbYCrY_NoA = 0x0002 ///<CbY0CrY1
,CCO_ARGB_Interleaved = 0x0004 ///<ARGB
,CCO_BGRA_Interleaved = 0x0008 ///<BGRA
};
/**
Indicates the type of chroma subsampling.
*/
enum DF_ChromaSubSampling_t
{
CSS_INVALID = 0x000 ///<Default value
,CSS_4220 = 0x001 ///<4:2:2 sampling (no alpha)
,CSS_4444 = 0x004 ///<Full resolution sampling RGBA
};
/**
This is used by applications to allow the codecs to decompress
into multiple sizes based on the possibility of faster performance.
*/
enum DF_Resolution_t
{
RS_INVALID = 0x0 ///<Default value
,RS_FULL = 0x1 ///<Full resolution
};
/**
This describes the signal standard.
*/
enum DF_SignalStandard_t
{
SS_INVALID = 0x000 ///<Default value
,SS_None = 0x001 ///<No signal standard used
,SS_274M_I = 0x020 ///<HD Interlaced. Refers to SMPTE standard 274M for interlaced material.
,SS_274M_P = 0x040 ///<HD Progressive. Refers to SMPTE standard 274M for progressive material.
,SS_296M_P = 0x080 ///<HD Progressive. Refers to SMPTE standard 296M for progressive material.
};
/**
This describes the type representation of the component data.
*/
enum DF_ComponentType_t
{
CT_INVALID = 0x000 ///<Default value
,CT_UCHAR = 0x001 ///<8 bit
,CT_USHORT_10_6 = 0x004
,CT_SHORT_2_14 = 0x008
,CT_SHORT = 0x010 ///<16 bit. Byte ordering is machine dependent.
,CT_10Bit_2_8 = 0x040 ///<10 bit in 2_8 format. Byte ordering is fixed. This is to be used with 10-bit 4:2:2 YCbCr components.
,CT_V210 = 0x400
};
/**
This describes buffer field order of the uncompressed data.
*/
enum DF_BufferFieldOrder_t
{
BFO_INVALID = 0x000 ///<Default value
,BFO_Merged_F1_First = 0x001 ///<Use this buffer field order for interlaced frames. The first line of the buffer is field 1, the second line field 2 ... .
,BFO_Progressive = 0x040 ///<Use this buffer field order for progressive frames. All lines of the progressive frame are stored in order.
};
/**
This describes raster geometry of the uncompressed buffer. One of the characteristics defined by the raster geometry type is the dimensions of the raster.
*/
enum DF_RasterGeometryType_t
{
RGT_INVALID = 0x0 ///<Default value
,RGT_SignalStandard = 0x1 ///< Signal standard raster. 1920 x 1080 with top line field 1 for 1080i resolutions. 1920 x 1080 for 1080p resolutions. 1280 x 720 for 720p resolutions.
,RGT_NativeCompressed = 0x4 ///< Raster Geometry type is native to the codec. Should be used to compress 1440 x 1080 frames with field 1 on top using DNX_145_1440_1080i_COMPRESSION_ID.
};
/**
Specifies the alignment of buffer.
*/
enum DF_BufferLineOrientation_t
{
BLO_INVALID = 0x0 ///<Default
,BLO_Top_Bot = 0x1 ///<Top to bottom scanning
};
/**
Indicates the range of values taken by the components.
*/
enum DF_ComponentRangeType_t
{
CRT_INVALID = 0x0 ///<Default
,CRT_VideoRange = 0x1 ///<White and black levels per the ITU 709 color space.
};
/**
This indicates the operation to be performed by the codec.
*/
enum CodecOperation_t
{
CO_INVALID = 0 ///<Default
,CO_ENCODE = 0x1 ///<Encode
,CO_DECODE = 0x2 ///<Decode
};
/**
Container for the uncompressed data format parameters.
*/
/*!
@class UncompInfo_t
@abstract
Container for the uncompressed data format parameters.
*/
class UncompInfo_t
{
public:
DF_ColorSpace_t m_colorSpace;
DF_ColorComponentOrder_t m_colorComponentOrder;
DF_ChromaSubSampling_t m_chromaSubSampling;
DF_Resolution_t m_resolution;
DF_SignalStandard_t m_signalStandard;
DF_ComponentType_t m_componentType;
DF_ComponentRangeType_t m_componentRangeType;
DF_BufferFieldOrder_t m_bufferFieldOrder;
DF_BufferLineOrientation_t m_bufferLineOrientation;
DF_RasterGeometryType_t m_rasterGeometryType;
bool m_bIsAlphaPresent;
unsigned int m_uncompressedBufferAlignment;
bool m_isAlpha0Transparent;
UncompInfo_t()
{
m_bIsAlphaPresent = false;
m_bufferFieldOrder = BFO_INVALID;
m_bufferLineOrientation = BLO_INVALID;
m_chromaSubSampling = CSS_INVALID;
m_colorComponentOrder = CCO_INVALID;
m_colorSpace = CS_INVALID;
m_componentRangeType = CRT_INVALID;
m_componentType = CT_INVALID;
m_isAlpha0Transparent = false;
m_rasterGeometryType = RGT_INVALID;
m_resolution = RS_INVALID;
m_signalStandard = SS_INVALID;
m_uncompressedBufferAlignment = 0;
}
UncompInfo_t(
DF_ColorSpace_t colorSpace,
DF_ColorComponentOrder_t colorComponentOrder,
DF_ChromaSubSampling_t chromaSubSampling,
DF_Resolution_t resolution,
DF_SignalStandard_t signalStandard,
DF_ComponentType_t componentType,
DF_ComponentRangeType_t componentRangeType,
DF_BufferFieldOrder_t bufferFieldOrder,
DF_BufferLineOrientation_t bufferLineOrientation,
DF_RasterGeometryType_t rasterGeometryType,
bool bIsAlphaPresent,
unsigned int uncompressedBufferAlignment,
bool isAlpha0Transparent
)
{
m_colorSpace = colorSpace;
m_colorComponentOrder = colorComponentOrder;
m_chromaSubSampling = chromaSubSampling;
m_resolution = resolution;
m_signalStandard = signalStandard;
m_componentType = componentType;
m_componentRangeType = componentRangeType;
m_bufferFieldOrder = bufferFieldOrder;
m_bufferLineOrientation = bufferLineOrientation;
m_rasterGeometryType = rasterGeometryType;
m_bIsAlphaPresent = bIsAlphaPresent;
m_uncompressedBufferAlignment = uncompressedBufferAlignment;
m_isAlpha0Transparent = isAlpha0Transparent;
}
UncompInfo_t& operator =(const UncompInfo_t& rhs)
{
if(&rhs == this)
return *this;
m_colorSpace = rhs.m_colorSpace;
m_colorComponentOrder = rhs.m_colorComponentOrder;
m_chromaSubSampling = rhs.m_chromaSubSampling;
m_resolution = rhs.m_resolution;
m_signalStandard = rhs.m_signalStandard;
m_componentType = rhs.m_componentType;
m_componentRangeType = rhs.m_componentRangeType;
m_bufferFieldOrder = rhs.m_bufferFieldOrder;
m_bufferLineOrientation = rhs.m_bufferLineOrientation;
m_rasterGeometryType = rhs.m_rasterGeometryType;
m_bIsAlphaPresent = rhs.m_bIsAlphaPresent;
m_uncompressedBufferAlignment = rhs.m_uncompressedBufferAlignment;
m_isAlpha0Transparent = rhs.m_isAlpha0Transparent;
return *this;
}
};
}
#endif
/** This file contains the DNxHD compression enums.
*
* \file AvidDNXids.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
/**
These are the compression enums to be used in the SetInputOutputDataTypes(..) method of the AvidHDCodecSDK class.
*/
#ifndef DNXIDS_H
#define DNXIDS_H
typedef enum DNX_compression_ID_t
{
DNX_220X_1080p_COMPRESSION_ID = 1235, ///< Please see FAQ.
DNX_145_1080p_COMPRESSION_ID = 1237, ///< Please see FAQ.
DNX_220_1080p_COMPRESSION_ID = 1238, ///< Please see FAQ.
DNX_220X_720p_COMPRESSION_ID = 1250, ///< Please see FAQ.
DNX_220_720p_COMPRESSION_ID = 1251, ///< Please see FAQ.
DNX_145_720p_COMPRESSION_ID = 1252, ///< Please see FAQ.
DNX_220X_1080i_COMPRESSION_ID = 1241, ///< Please see FAQ.
DNX_145_1080i_COMPRESSION_ID = 1242, ///< Please see FAQ.
DNX_220_1080i_COMPRESSION_ID = 1243, ///< Please see FAQ.
DNX_145_1440_1080i_COMPRESSION_ID = 1244, ///< Please see FAQ. Thin raster - stored as 1440 width x 1080 height
DNX_36_1080p_COMPRESSION_ID = 1253, ///< Please see FAQ.
DNX_440X_1080p_COMPRESSION_ID = 1256, ///< Please see FAQ.
DNX_100_960_720p_COMPRESSION_ID = 1258, ///< Please see FAQ.
DNX_100_1440_1080p_COMPRESSION_ID = 1259, ///< Please see FAQ.
DNX_100_1440_1080i_COMPRESSION_ID = 1260 ///< Please see FAQ.
} DNX_compression_ID_t;
#endif
/** This file contains the AvidHDCodecSDK class.
*
* \file AvidHDCodecSDK.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
#ifndef AVIDHDCODECSDK_H
#define AVIDHDCODECSDK_H
#include "AvidDNXIDs.h"
#include "AvidDNXCodecParams.h"
#ifdef DLL_LIB
#ifdef DNxHDSDK_EXPORTS
#define DNxHD_API __declspec(dllexport)
#else
#define DNxHD_API __declspec(dllimport)
#endif
#define CALL _stdcall
#else
#define DNxHD_API
#define CALL
#endif
/**
All encode and decode operations are performed using this class.
*/
class AvidHDCodecSDK
{
public:
/**
Virtual Destructor
*/
virtual ~AvidHDCodecSDK();
/**
Gets the version of the API.
\param iMajor The major version.
\param iMinor The minor version.
\param iPatch The patch version.
\param iBuild The build number.
\param iBits Specifies 32 or 64 based on target OS.
\param iRelease 'a' for alpha, 'b' for beta, 'r' for release.
\return void.
*/
virtual void CALL GetAPIVersion(int *iMajor, int *iMinor, int *iPatch, int *iBuild, int *iBits, char *cRelease) = 0;
/////////////////////////////////////////////////////////////////////////
/**
Returns the size in bytes necessary to store the compressed data corresponding to the compression ID provided.
\return The necessary size of the compressed buffer. 0 if SetCompressionID(...) has not been called.
*/
virtual int CALL GetCompressedBufferSize() = 0;
/**
Returns the size in bytes of the largest DNxHD compressed frame size.
\return The maximum size the compressed buffer will be.
*/
static int DNxHD_API GetMaxCompressedBufferSize();
/**
Populates UncompInfo basing on restrictions described in DNxHD SDK manual.
\param uncomp_info UncompInfo to be populated
\param comptype Component type (CT_UCHAR, CT_SHORT etc)
\param comporder Component order (CCO_ARGB_Interleaved etc)
\param sigstand Signal standard: for 1920x1080 progressive it's SS_274M_P, etc, see manual
\param rgt Raster geometry type: use RGT_SignalStandard unless you know what you're doing.
\return void
*/
static void DNxHD_API PopulateUncompInfo(dnx_types::UncompInfo_t & uncomp_info,
dnx_types::DF_ComponentType_t comptype,
dnx_types::DF_ColorComponentOrder_t comporder,
dnx_types::DF_SignalStandard_t sigstand,
dnx_types::DF_RasterGeometryType_t rgt);
/**
Encodes a buffer of uncompressed data into an empty buffer.
\param pInBuf Pointer to the uncompressed data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param pOutBuf Pointer to the encoded data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param uiInBufSize Size of the input buffer in bytes.
\param uiOutBufSize Size of the output buffer in bytes.
\param pEncodeNumberOfBytes Actual size of encoded data in bytes.
\return 0 for no error.
*/
virtual int CALL EncodeFrame(
void *pInBuf,
void *pOutBuf,
unsigned int uiInBufSize,
unsigned int uiOutBufSize,
unsigned int *pEncodeNumberOfBytes
) = 0;
/**
Decodes a buffer of encoded DNxHD data into an empty buffer.
\param pInBuf Pointer to the encoded data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param pOutBuf Pointer to the uncompressed data buffer. Memory is managed by the caller. The buffer should be 16 byte aligned.
\param uiInBufSize Size of the input buffer in bytes.
\param uiOutBufSize Size of the output buffer in bytes.
\return 0 for no error.
*/
virtual int CALL DecodeFrame(
void *pInBuf,
void *pOutBuf,
unsigned int uiInBufSize,
unsigned int uiOutBufSize
) = 0;
/**
Sets compressed video format.
Must be called before SetInputOutputDataTypes(...).
\param compID Enum representing the compression bitrate and format.
\return 0 for no error.
*/
virtual int CALL SetCompressionID(DNX_compression_ID_t compID) = 0;
/**
Sets uncompressed video format and whether a compression or decompression operation will be performed.
Called before EncodeFrame(...) or DecodeFrame(...)
\param pDFUnc Uncompressed video format data structure.
\param codecOp Enum representing an encode or decode operation.
\return 0 for no error.
*/
virtual int CALL SetInputOutputDataTypes(
dnx_types::UncompInfo_t * pDFUnc,
dnx_types::CodecOperation_t codecOp
) = 0;
/**
Returns the last error.
\return The last error.
*/
virtual int CALL GetLastError() = 0;
/**
Gets a description of the error associated with an error code.
\param iErrorCode The error code.
\param errorStrPtr Pointer to a buffer in which to store the error description
\param iBufferLength Length of the input buffer in bytes. Should be set to a size that will fit 60 characters.
\return void.
*/
virtual void CALL GetErrorString(int iErrorCode, unsigned char *errorStrPtr, unsigned int iBufferLength) = 0;
/**
Sets the number of bytes in a row of the uncompressed video. Called before DecodeFrame(...).
\param iRowBytes The number of bytes. Must be a multiple of 16.
0 can be passed in if the number of bytes in each row of the uncompressed image matches the
(number of bytes per component) x (raster width) x (number of components).
If the number of bytes in each row is different due to padding, this number should be specified.
\return 0 for no error.
*/
virtual int CALL SetRowBytesForDecode(unsigned int iRowBytes) = 0;
/**
Sets the number of bytes in a row of the uncompressed video. Must be called before EncodeFrame(...).
\param iRowBytes The number of bytes in a row of the raster. Must be a multiple of 16.
0 can be passed in if the number of bytes in each row of the uncompressed image matches the
(number of bytes per component) x (raster width) x (number of components).
If the number of bytes in each row is different due to padding, this number should be specified.
\return 0 for no error.
*/
virtual int CALL SetRowBytesForEncode(unsigned int iRowBytes) = 0;
/**
Sets the number of bytes between fields in the uncompressed buffer. Called before DecodeFrame(...).
\param iInterFieldGapBytes The number of bytes. Must be a multiple of 16.
\return 0 for no error.
*/
virtual int CALL SetInterFieldGapForDecode(unsigned int iInterFieldGapBytes) = 0;
/**
Sets the number of bytes between fields in the uncompressed buffer Called before EncodeFrame(...).
\param iInterFieldGapBytes The number of bytes. Must be a multiple of 16.
\return 0 for no error.
*/
virtual int CALL SetInterFieldGapForEncode(unsigned int iInterFieldGapBytes) = 0;
/**
Sets the number of threads for decode. Maximum value is 8 threads for encode and 16 threads for decode
Must be called after SetRowBytesForDecode in threaded environment
\param iNumThreads The number of threads.
\return 0 for no error.
*/
virtual int CALL SetNumThreadsForDecode(unsigned int iNumThreads) = 0;
/**
Sets the number of threads for encode.
Must be called after SetRowBytesForEncode in threaded environment
\param iNumThreads The number of threads.
\return 0 for no error.
*/
virtual int CALL SetNumThreadsForEncode(unsigned int iNumThreads) = 0;
/**
Gets the number of threads set for decode.
\return 0 for no error.
*/
virtual int CALL GetNumThreadsForDecode() = 0;
/**
Gets the number of threads set for encode.
\return 0 for no error.
*/
virtual int CALL GetNumThreadsForEncode() = 0;
};
/**
Called before CreateAvidHDCodec() is called.
\return 0 for no error.
*/
extern "C" DNxHD_API long InitializeAvidOptimizedDNxHDCodec();
/**
Called after DeleteAvidHDCodec() is called.
\return 0 for no error.
*/
extern "C" DNxHD_API void FinalAvidOptimizedDNxHDCleanUp();
/**
Called after InitializeCodec() is called. Creates an
instance of the AvidHDCodecSDK and passes it to the caller.
Must be deleted with a call to DeleteAvidHDCodec(...).
\return AvidHDCodecSDK *.
*/
extern "C" DNxHD_API AvidHDCodecSDK * CreateAvidOptimizedDNxHDCodec();
/**
Called before FinalCleanUp() is called. Deletes an instance of
an AvidHDCodecSDK passed from the caller.
\param pCodecObject Pointer to an AvidHDCodecSDK object. pCodecObject has been
created with a call to CreateAvidHDCodec().
\return void.
*/
extern "C" DNxHD_API void DeleteAvidOptimizedDNxHDCodec(AvidHDCodecSDK *pCodecObject);
#endif
/** This file should be included if the Windows dynamic link library is used.
*
* \file AvidHDCodecSDKdll.h
*
* \par License
* The following programs are the sole property of Avid Technology, Inc.,
* and contain its proprietary and confidential information.
* Copyright 2013 Avid Technology, Inc.
* All Rights Reserved.
*
*
*
* \date 01/22/2013
*
*
* \author <a href='mailto:DNxHDSupport@avid.com'>Codecs/IEM Group</a>
*/
#ifndef AVIDHDCODECSDKDLL_H
#define AVIDHDCODECSDKDLL_H
#define DLL_LIB
#include "AvidHDCodecSDK.h"
#endif
#ifndef DNXHDMXF_H_
#define DNXHDMXF_H_
#ifdef _WIN32
typedef __int64 int64_t;
typedef unsigned char uint8_t;
#else
#include <inttypes.h>
#endif
#ifndef _E2FILE_MODE
#define _E2FILE_MODE
enum {
E2FILE_MODE_READ = 0,
E2FILE_MODE_WRITE,
};
#endif
#ifndef _E2FILE_TYPE
#define _E2FILE_TYPE
enum {
E2FILE_TYPE_VIDEO = 0,
E2FILE_TYPE_AUDIO,
};
#endif
#ifndef _VIDEO_STANDARD
#define _VIDEO_STANDARD
enum {
VIDEO_STANDARD_50I = 0,
VIDEO_STANDARD_5994I
};
#endif
typedef void* DNxHDMXF;
#ifdef __cplusplus
extern "C"
{
void DNxHDMXFSetDictionaryPath(char *NewPath);
int DNxHDMXFInit(char *dictname);
void DNxHDMXFRelease(void);
// id = 1241 : 185M, id = 1242 : 120M
DNxHDMXF DNxHDMXFOpen(char *filename, int id, int mode, int type, int standard, int afd, int sampleBits, int channelID, int totalChannel);
bool DNxHDMXFWriteVideoFrame(DNxHDMXF file, uint8_t *buffer, int size);
bool DNxHDMXFWriteAudioFrame(DNxHDMXF file, uint8_t *buffer, int size);
int DNxHDMXFReadVideoFrame(DNxHDMXF file, uint8_t *buffer, int *size);
int DNxHDMXFReadAudioFrame(DNxHDMXF file, uint8_t *buffer, int size);
void DNxHDMXFClose(DNxHDMXF file);
int DNxHDMXFSeek(DNxHDMXF file, int64_t pos);
int DNxHDMXFRepair(DNxHDMXF file, char *filename, int type, int64_t duration);
}
#endif
#endif /* DNXHDMXF_H_ */
K 25
svn:wc:ra_dav:version-url
V 62
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept
END
dec_amr.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/dec_amr.h
END
demux_mxf.h
K 25
svn:wc:ra_dav:version-url
V 74
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/demux_mxf.h
END
mfimport.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mfimport.h
END
config_mp2m.h
K 25
svn:wc:ra_dav:version-url
V 76
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/config_mp2m.h
END
demux_mp2.h
K 25
svn:wc:ra_dav:version-url
V 74
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/demux_mp2.h
END
mcfourcc.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mcfourcc.h
END
enc_mpa.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_mpa.h
END
config_mpa.h
K 25
svn:wc:ra_dav:version-url
V 75
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/config_mpa.h
END
demux_mp4.h
K 25
svn:wc:ra_dav:version-url
V 74
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/demux_mp4.h
END
config_mp2v.h
K 25
svn:wc:ra_dav:version-url
V 76
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/config_mp2v.h
END
auxinfo.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/auxinfo.h
END
enc_mp2v.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_mp2v.h
END
enc_aac.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_aac.h
END
mcapiext.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mcapiext.h
END
enc_mp4v.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_mp4v.h
END
config_mp4v.h
K 25
svn:wc:ra_dav:version-url
V 76
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/config_mp4v.h
END
bufstrm.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/bufstrm.h
END
mux_mxf.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mux_mxf.h
END
mux_mp2.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mux_mp2.h
END
enc_mp2sr.h
K 25
svn:wc:ra_dav:version-url
V 74
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_mp2sr.h
END
dec_mpa.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/dec_mpa.h
END
enc_mp4v_def.h
K 25
svn:wc:ra_dav:version-url
V 77
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_mp4v_def.h
END
mux_mp4.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mux_mp4.h
END
dec_aac.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/dec_aac.h
END
dec_mp2v.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/dec_mp2v.h
END
mcdefs.h
K 25
svn:wc:ra_dav:version-url
V 71
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mcdefs.h
END
dec_mp4v.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/dec_mp4v.h
END
enc_amr.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_amr.h
END
enc_pcm.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/enc_pcm.h
END
v_frame.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/v_frame.h
END
metadata.h
K 25
svn:wc:ra_dav:version-url
V 73
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/metadata.h
END
mcprofile.h
K 25
svn:wc:ra_dav:version-url
V 74
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mcprofile.h
END
mctypes.h
K 25
svn:wc:ra_dav:version-url
V 72
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mctypes.h
END
mcmediatypes.h
K 25
svn:wc:ra_dav:version-url
V 77
/svn/dev_panlinear1980/!svn/ver/1/common/codec/inc/MainConcept/mcmediatypes.h
END
10
dir
2512
http://soft-desktop:18080/svn/dev_panlinear1980/common/codec/inc/MainConcept
http://soft-desktop:18080/svn/dev_panlinear1980
2013-08-14T02:22:46.726428Z
1
gaozhanjun
f6e9b7a2-83e5-46f1-a154-58e556d148d2
dec_amr.h
file
2016-01-05T09:11:40.083659Z
8b2cbfb2daa5ecb8905eedf962fdb658
2013-08-14T02:22:46.726428Z
1
gaozhanjun
1315
demux_mxf.h
file
2016-01-05T09:11:40.084659Z
fa263ffe5da3805465862ed1bb710948
2013-08-14T02:22:46.726428Z
1
gaozhanjun
14426
mfimport.h
file
2016-01-05T09:11:40.084659Z
f2b7778ac5d18b6d3671473f40038e24
2013-08-14T02:22:46.726428Z
1
gaozhanjun
49399
config_mp2m.h
file
2016-01-05T09:11:40.085659Z
233498159289fb7e228b5e6b1d69cb31
2013-08-14T02:22:46.726428Z
1
gaozhanjun
2183
demux_mp2.h
file
2016-01-05T09:11:40.085659Z
6296c75fc4ec3eb4bf6231d8c9485039
2013-08-14T02:22:46.726428Z
1
gaozhanjun
58688
mcfourcc.h
file
2016-01-05T09:11:40.086659Z
e8e737897600d3df9f24a36a417a989b
2013-08-14T02:22:46.726428Z
1
gaozhanjun
5064
demux_mp4.h
file
2016-01-05T09:11:40.088659Z
a5a29f3f4f1f3df925338690c2bc558d
2013-08-14T02:22:46.726428Z
1
gaozhanjun
14158
enc_mpa.h
file
2016-01-05T09:11:40.086659Z
c69e3eb35891176fa026f50b9ed0cf65
2013-08-14T02:22:46.726428Z
1
gaozhanjun
7593
config_mpa.h
file
2016-01-05T09:11:40.087659Z
45cf4bffee447d666fa5921c1360b603
2013-08-14T02:22:46.726428Z
1
gaozhanjun
2245
CLSID
dir
config_mp2v.h
file
2016-01-05T09:11:40.090659Z
39a107b907e18e06971b03d5c6e6c1c5
2013-08-14T02:22:46.726428Z
1
gaozhanjun
2595
auxinfo.h
file
2016-01-05T09:11:40.090659Z
ce25e1eae35d5d2345eea9506b220492
2013-08-14T02:22:46.726428Z
1
gaozhanjun
18475
enc_aac.h
file
2016-01-05T09:11:40.089659Z
405aaa7640180d74823a1e9f3fc02413
2013-08-14T02:22:46.726428Z
1
gaozhanjun
5536
enc_mp2v.h
file
2016-01-05T09:11:40.088659Z
9972532ecc419e7409db770af68e43da
2013-08-14T02:22:46.726428Z
1
gaozhanjun
30462
mcapiext.h
file
2016-01-05T09:11:40.091659Z
fd29eba55a0b609ab19cade9af22592a
2013-08-14T02:22:46.726428Z
1
gaozhanjun
9539
enc_mp4v.h
file
2016-01-05T09:11:40.092659Z
4f87c36f74a4a64a2dc89c9dc5b41d07
2013-08-14T02:22:46.726428Z
1
gaozhanjun
12112
config_mp4v.h
file
2016-01-05T09:11:40.091659Z
fbcf48275b36fa4f0e074cd5516a37aa
2013-08-14T02:22:46.726428Z
1
gaozhanjun
2402
bufstrm.h
file
2016-01-05T09:11:40.093659Z
43db6e13bbc92b8fe59b6ee627f76380
2013-08-14T02:22:46.726428Z
1
gaozhanjun
3832
mux_mxf.h
file
2016-01-05T09:11:40.093659Z
366053cbf11f184eb425ea87b1e63872
2013-08-14T02:22:46.726428Z
1
gaozhanjun
11673
ModuleConfig
dir
mux_mp2.h
file
2016-01-05T09:11:40.094659Z
6bf304be8639e68b223fddbcacac061d
2013-08-14T02:22:46.726428Z
1
gaozhanjun
24482
enc_mp2sr.h
file
2016-01-05T09:11:40.095659Z
d728142e1d753d12da666b8fa60e4aa7
2013-08-14T02:22:46.726428Z
1
gaozhanjun
17318
dec_mpa.h
file
2016-01-05T09:11:40.094659Z
1bc36bf0c93fda87fb661b39db54e489
2013-08-14T02:22:46.726428Z
1
gaozhanjun
1922
enc_mp4v_def.h
file
2016-01-05T09:11:40.096659Z
dfc0749b0425a9bb7c2197c8afb712ab
2013-08-14T02:22:46.726428Z
1
gaozhanjun
2118
mux_mp4.h
file
2016-01-05T09:11:40.095659Z
7764df52ba87bb17d8f58fbbc3ca867a
2013-08-14T02:22:46.726428Z
1
gaozhanjun
7918
dec_mp2v.h
file
2016-01-05T09:11:40.096659Z
b9fc839d5359dada000b1619fd80b818
2013-08-14T02:22:46.726428Z
1
gaozhanjun
4366
dec_aac.h
file
2016-01-05T09:11:40.097659Z
cc013f7cb3cc4a00df27a35ff2985382
2013-08-14T02:22:46.726428Z
1
gaozhanjun
5199
dec_mp4v.h
file
2016-01-05T09:11:40.098659Z
33389afbe9ec6f6dff1db16cc25cf3ac
2013-08-14T02:22:46.726428Z
1
gaozhanjun
4035
mcdefs.h
file
2016-01-05T09:11:40.098659Z
a220ed9b03c7d0da0b2e12928914ce89
2013-08-14T02:22:46.726428Z
1
gaozhanjun
90603
enc_amr.h
file
2016-01-05T09:11:40.099659Z
07c11879cdec711659db12f09e73c89e
2013-08-14T02:22:46.726428Z
1
gaozhanjun
5586
enc_pcm.h
file
2016-01-05T09:11:40.099659Z
9d6f04049e8afab67f1f468682f75347
2013-08-14T02:22:46.726428Z
1
gaozhanjun
6171
v_frame.h
file
2016-01-05T09:11:40.080658Z
441f1f0e59b988be6e2f4836036d4501
2013-08-14T02:22:46.726428Z
1
gaozhanjun
1653
metadata.h
file
2016-01-05T09:11:40.080658Z
58bbc1518992ad10c8a32f48058d9240
2013-08-14T02:22:46.726428Z
1
gaozhanjun
2633
mcprofile.h
file
2016-01-05T09:11:40.081658Z
ce0bf18dfcf6df84a0fca9c03c6ba0ab
2013-08-14T02:22:46.726428Z
1
gaozhanjun
8920
mctypes.h
file
2016-01-05T09:11:40.082658Z
a55e461d3f49d238d009e8806d10fca5
2013-08-14T02:22:46.726428Z
1
gaozhanjun
4670
mcmediatypes.h
file
2016-01-05T09:11:40.082658Z
7e0b9e209f2706028b0cae6e69c67e7e
2013-08-14T02:22:46.726428Z
1
gaozhanjun
4250
/* ----------------------------------------------------------------------------
* File: bufstrm.h
*
* Desc: stream base class (used by encoder and decoders)
*
* Copyright (c) 2009, MainConcept GmbH. All rights reserved.
*
* This software is the confidential and proprietary information of
* MainConcept GmbH and may be used only in accordance with the terms of
* your license from MainConcept GmbH.
* ----------------------------------------------------------------------------
*/
#if !defined (__BUFSTREAM_API_INCLUDED__)
#define __BUFSTREAM_API_INCLUDED__
#include "mctypes.h"
// comment this out to use non-UNICODE functions
// in a UNICODE project. Meant for Windows platforms
// if commented out, leave _BS_MAX_PATH defined as 2048
#ifdef _UNICODE
#define _BS_UNICODE
#define _BS_MAX_PATH 32768
#else
#define _BS_MAX_PATH 2048
#endif
#define BS_OK (0)
#define BS_IO_ERROR (1)
#define BS_ERROR (0xFFFFFFFF)
#define BS_FLAGS_DST 0x00000001 // owns AuxInfo channel
#define BS_FLAGS_ACT 0x00000002 // owns Drive channel
// i.e. part calling HT-channel to drive information
typedef struct bufstream bufstream_tt;
struct bufstream
{
// how many bytes can be put_into/read_from buffer
// used if "request"-call fails
// fifo_w_empty/fifo_r_filled
uint32_t (MC_EXPORT_API * usable_bytes)(bufstream_tt *bs);
//request the buffer with at least numbytes-bytes
// fifo_w_sampbuf/fifo_r_sampbuf
uint8_t * (MC_EXPORT_API * request)(bufstream_tt *bs, uint32_t numbytes);
//confirm numbytes-bytes filled in in requested after last "request"-call
// fifo_w_commit/fifo_r_remove
uint32_t (MC_EXPORT_API * confirm)(bufstream_tt *bs, uint32_t numbytes);
//put/get numbytes-bytes into/from bufsteam
// fifo_w_sampput/fifo_r_sampget
uint32_t (MC_EXPORT_API * copybytes)(bufstream_tt *bs, uint8_t *ptr, uint32_t numSamples);
// maximal chunk-size in buffer-mode (i.e. for "request"-call)
uint32_t (MC_EXPORT_API * chunksize)(bufstream_tt *bs);
//inform bufstream about some additional info - for example
// to inform MUXer about encoding-units
//
// offs: offset from last request-call (if called after
// confirm/copybyte means next copybyte-chunk, i.e.
// we need to call auxinfo() before copybyte() or confirm()
// if offs != 0). AcessUnit-auxinfo is alway called with offs=0
// after confirm()/copybyte()-call!
// Other aux-info can be putted earlier then stream arrive.
//
// Can one asssume that area 0...offs-1 (after last request-call)
// is filled with valid part of stream? Do we need it?
//
uint32_t (MC_EXPORT_API * auxinfo)(bufstream_tt *bs, uint32_t offs, uint32_t info_ID, void *info_ptr, uint32_t info_size);
// allow to split output-stream {if(split!=NULL) - splittable}
// return 0 = OK
uint32_t (MC_EXPORT_API * split) (bufstream_tt *bs);
void (MC_EXPORT_API * done) (bufstream_tt *bs, int32_t Abort);
void (MC_EXPORT_API * free) (bufstream_tt *bs);
// used to drive io-pipe, undefined = NULL, currently unused
struct drive_struct *drive_ptr;
uint32_t (MC_EXPORT_API * drive) (bufstream_tt *bs, uint32_t info_ID, void *info_ptr, uint32_t info_size);
uint32_t flags; //currently unused, setted once on create/initialisation time
uint32_t (MC_EXPORT_API * state) (bufstream_tt *bs); //currently unused
struct impl_stream* Buf_IO_struct;
};
// close_bufstream is generic done and destroy makro
//
#define close_bufstream(bs, abort) \
do { bs->done(bs, abort); bs->free(bs); bs = NULL; } while(0)
//
// bs = NULL; is very important!
//
// It force usage of close_bufstream()-macro
// on pointer-variables and produce Compiler-error
// on static/stack/part_of_struct allocated objects
#endif // #if !defined (__BUFSTREAM_API_INCLUDED__)
/* ----------------------------------------------------------------------------
* File: config_mp2m.h
*
* Desc: MPEG-1/2 Multiplexer Configuration API
*
* Copyright (c) 2009, MainConcept GmbH. All rights reserved.
*
* This software is the confidential and proprietary information of
* MainConcept GmbH and may be used only in accordance with the terms of
* your license from MainConcept GmbH.
* ----------------------------------------------------------------------------
*/
#if !defined (__MP2M_CONFIG_API_INCLUDED__)
#define __MP2M_CONFIG_API_INCLUDED__
#include "mcapiext.h"
#include "mux_mp2.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* The API Extension control.
* @param func one of the following API function identifiers:
* MCAPI_LoadParamSet
* MCAPI_SaveParamSet
* MCAPI_ShowPages
* @return pointer to the requested API function or NULL, if not supported.
*/
APIEXTFUNC MC_EXPORT_API MP2MConfigGetAPIExt(uint32_t func);
#ifdef __cplusplus
}
#endif
/**
* @struct mp2m_param_set
* This structure is used as parameter set for all available API functions.
*/
struct mp2m_param_set
{
struct mp2muxer_set_struct params;
int32_t reserved[1024];
};
/**
* @name GUI Options
* These options are supported by ShowPages API.
* @{
*/
#define MP2M_PAGES_BASIC 0x00000001 /**< display the basic settings page */
#define MP2M_PAGES_ALL 0x00000001 /**< display all of the above pages */
#define MP2M_PAGES_LOADSAVE 0x00000010 /**< display the load/save buttons */
#define MP2M_PAGES_NOINITCHECK 0x00000020 /**< do not check the validity of the setting at function start */
#define MP2M_PAGES_REDWARNINGS 0x00000040 /**< display any validation warnings & errors */
#define MP2M_PAGES_BANNER_OFF 0x00001000 /**< do not display codec banner */
#define MP2M_PAGES_DISABLE_PRESET 0x00002000 /**< disable preset gui (used e.g. in Encoder Application) */
#define MP2M_PAGES_QT_APPLICATION 0x10000000 /**< caller application is QT (not MFC) */
/** @} */
#endif // __MP2M_CONFIG_API_INCLUDED__
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment