Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 49cd3954 authored by Elian Dib's avatar Elian Dib
Browse files

Added interpMeth parameter in read

parent 963588b2
No related branches found
No related tags found
No related merge requests found
......@@ -53,12 +53,14 @@ fullRange = true;
p.addParameter( 'inColSpace', 'rgb' , @ischar);
p.addParameter('outColSpace', 'ycbcr', @ischar);
p.addParameter('fullRange', fullRange , @islogical);
p.addParameter('interpMeth', 'nearest', @ischar);
p.parse(varargin{:});
inColSpace = p.Results.inColSpace;
outColSpace = p.Results.outColSpace;
fullRange = p.Results.fullRange;
interpMeth = p.Results.interpMeth;
precision = ['uint',num2str(max(8,2^ceil(log2(bitDepth))))];
......@@ -87,8 +89,13 @@ switch subSamp
xgv = 1.5:2:imgSize(1); ygv = 1:2:imgSize(2);
end
% Add small offset to ensure correct nearest neighbour interpolation
if any(strcmp(subSamp,{'422','420'})) && strcmp(interpMeth,'nearest')
ygv = ygv + 0.25;
end
subImgSize = [numel(xgv),numel(ygv)];
UV = griddedInterpolant({xgv,ygv},zeros(subImgSize),'linear','nearest');
UV = griddedInterpolant({xgv,ygv},zeros(subImgSize),interpMeth,'nearest');
%% Read frames iteratively
%filename = yuv.params2name(filename,imgSize,imgRes,subSamp,bitDepth);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment