diff --git a/decode.m b/decode.m index b58e8ffad54d7aecaeb1e21ea18ea1be1e198dcd..1093ea85ead2c8acca7558c0905516ab20c2d7cf 100644 --- a/decode.m +++ b/decode.m @@ -3,7 +3,15 @@ function [nbBits,peaksnr] = decode(varargin) % Detailed explanation goes here [HEVCDir,~,~] = fileparts(mfilename('fullpath')); -TAppDecoder = fullfile(HEVCDir,'bin','TAppDecoder.exe'); +if ispc + TAppDecoder = fullfile(HEVCDir,'bin','TAppDecoder.exe'); +elseif isunix + TAppDecoder = fullfile(HEVCDir,'bin','TAppDecoderStatic'); +elseif ismac + error('custom HEVC not compiled for macOS'); +else + disp('Platform not supported') +end p = inputParser; p.KeepUnmatched = true; p.StructExpand = true; diff --git a/encode.m b/encode.m index 8094a49082fd71c0bc459c638414c626aa1ceac4..dfb0d449f308c04e626b3b58927995257fbf1a6f 100644 --- a/encode.m +++ b/encode.m @@ -3,7 +3,15 @@ function [nbBits,peaksnr] = encode(varargin) % Detailed explanation goes here [HEVCDir,~,~] = fileparts(mfilename('fullpath')); -TAppEncoder = fullfile(HEVCDir,'bin','TAppEncoder.exe'); +if ispc + TAppEncoder = fullfile(HEVCDir,'bin','TAppEncoder.exe'); +elseif isunix + TAppEncoder = fullfile(HEVCDir,'bin','TAppEncoderStatic'); +elseif ismac + error('custom HEVC not compiled for macOS'); +else + disp('Platform not supported') +end defaultCfg = fullfile(HEVCDir,'cfg','intra.cfg'); p = inputParser; p.KeepUnmatched = true; p.StructExpand = true; diff --git a/encodedecode.m b/encodedecode.m index 1838ee9e3dbcb5f9cd452d8d3e0c77feabfd97c0..78793f71da702e90d6121dea99eb12ebba6dbb7c 100644 --- a/encodedecode.m +++ b/encodedecode.m @@ -3,7 +3,15 @@ function [nbBits,peaksnr] = encodedecode(varargin) % Detailed explanation goes here [HEVCDir,~,~] = fileparts(mfilename('fullpath')); -TAppEncoder = fullfile(HEVCDir,'bin','TAppEncoder.exe'); +if ispc + TAppEncoder = fullfile(HEVCDir,'bin','TAppEncoder.exe'); +elseif isunix + TAppEncoder = fullfile(HEVCDir,'bin','TAppEncoderStatic'); +elseif ismac + error('custom HEVC not compiled for macOS'); +else + disp('Platform not supported') +end defaultCfg = fullfile(HEVCDir,'cfg','intra.cfg'); p = inputParser; p.KeepUnmatched = true; p.StructExpand = true;