Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f47d6b98 authored by DIB Elian's avatar DIB Elian
Browse files

Accommodated function to recent changes

parent 240eed09
No related branches found
No related tags found
No related merge requests found
...@@ -65,24 +65,31 @@ end ...@@ -65,24 +65,31 @@ end
% Do padding % Do padding
LFSize = size(LFRef); LFSize = size(LFRef);
LFSizePad = ceil(LFSize./LFParams.padding).*LFParams.padding-LFSize; padSize = ceil(LFSize./LFParams.padding).*LFParams.padding-LFSize;
LFSizePad(3:end) = 0; padSize(3:end) = 0;
LFRef = padarray(LFRef,LFSizePad,'replicate','post'); LFSizePad = LFSize + padSize;
imgSizePad = LFSizePad(1:3);
imgResPad = LFSizePad(4:end);
imgResPad(end+1:2) = 1;
LFRef = padarray(LFRef,padSize,'replicate','post');
% Convert inputs for HEVC
LFHEVCParams = LF.LFtoHEVC(imgSizePad,imgResPad,LFParams,HEVCParams);
LFParams.refFilename = LFHEVCParams.InputFile;
LFParams.recFilename = LFHEVCParams.ReconFile;
% Write input yuv file % Write input yuv file
if LFParams.encode if LFParams.encode
[imgSizePad,imgRes] = LF.write(LFRef,LFParams,'filename',LFParams.refFilename); LF.write(LFRef,'filename',LFParams.refFilename,'addInfo',false);
end end
% Convert inputs for HEVC
LFHEVCParams = LF.LFtoHEVC(imgSizePad,imgRes,LFParams,HEVCParams);
% Encode frames using HEVC % Encode frames using HEVC
[nbBits,peaksnr] = HEVC.codec(LFHEVCParams,HEVCParams); [nbBits,peaksnr] = HEVC.codec(LFHEVCParams,HEVCParams);
% Read output yuv file % Read output yuv file
if LFParams.decode if LFParams.decode
LFRec = LF.read(imgSizePad,imgRes,LFParams,'filename',LFParams.recFilename); LFRec = LF.read('filename',LFParams.recFilename);
end end
% Undo padding % Undo padding
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment