Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HEVC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
LightFieldCodingLibrary
HEVC
Commits
c5693add
Commit
c5693add
authored
7 years ago
by
Unknown
Browse files
Options
Downloads
Patches
Plain Diff
Create folders before executing HEVC
parent
6421bd3e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
decode.m
+13
-18
13 additions, 18 deletions
decode.m
encode.m
+25
-14
25 additions, 14 deletions
encode.m
with
38 additions
and
32 deletions
decode.m
+
13
−
18
View file @
c5693add
...
...
@@ -10,31 +10,26 @@ p = inputParser; p.KeepUnmatched = true; p.StructExpand = true;
p
.
addParameter
(
'BitstreamFile'
,
'bit.hevc'
,
@
ischar
);
p
.
addParameter
(
'ReconFile'
,
'rec.yuv'
,
@
ischar
);
p
.
addParameter
(
'SkipFrames'
,
'0'
,
@
ischar
);
%p.addParameter('LogFile' ,'log.rtf' ,@ischar);
% Add additional default parameters here
p
.
parse
(
varargin
{:});
parameters
=
fieldnames
(
p
.
Results
);
values
=
struct2cell
(
p
.
Results
);
extraParameters
=
fieldnames
(
p
.
Unmatched
);
extraValues
=
struct2cell
(
p
.
Unmatched
);
try
argList
=
paramToArg
([
parameters
;
extraParameters
],[
values
;
extraValues
]);
status
=
system
([
TAppDecoder
,
' '
,
argList
]);
if
status
error
(
'Execution with extra parameters failed, trying execution without'
);
end
catch
argList
=
paramToArg
(
parameters
,
values
);
system
([
TAppDecoder
,
' '
,
argList
]);
end
function
argList
=
paramToArg
(
parameters
,
values
)
argList
=
cellfun
(
@
(
param
,
val
)
[
'--'
,
param
,
'='
,
val
],
...
parameters
(
~
ind
),
values
(
~
ind
),
'UniformOutput'
,
false
);
argList
=
strjoin
(
argList
(:));
end
% extraParameters = fieldnames (p.Unmatched);
% extraValues = struct2cell(p.Unmatched);
% argList = paramToArg([parameters;extraParameters],[values;extraValues]);
argList
=
paramToArg
(
parameters
,
values
);
system
([
TAppDecoder
,
' '
,
argList
]);
end
function
argList
=
paramToArg
(
parameters
,
values
)
argList
=
cellfun
(
@
(
param
,
val
)
[
'--'
,
param
,
'='
,
val
],
...
parameters
,
values
,
'UniformOutput'
,
false
);
argList
=
strjoin
(
argList
(:));
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
encode.m
+
25
−
14
View file @
c5693add
...
...
@@ -16,6 +16,7 @@ p.addParameter('LogFile' ,'log.rtf' ,@ischar);
p
.
addParameter
(
'SourceWidth'
,
'512'
,
@
ischar
);
p
.
addParameter
(
'SourceHeight'
,
'512'
,
@
ischar
);
p
.
addParameter
(
'InputBitDepth'
,
'8'
,
@
ischar
);
p
.
addParameter
(
'InternalBitDepth'
,
'8'
,
@
ischar
);
p
.
addParameter
(
'InputChromaFormat'
,
'420'
,
@
ischar
);
p
.
addParameter
(
'FrameRate'
,
'60'
,
@
ischar
);
p
.
addParameter
(
'FrameSkip'
,
'0'
,
@
ischar
);
...
...
@@ -31,6 +32,17 @@ values = struct2cell(p.Results);
extraParameters
=
fieldnames
(
p
.
Unmatched
);
extraValues
=
struct2cell
(
p
.
Unmatched
);
ReconFile
=
p
.
Results
.
ReconFile
;
BitstreamFile
=
p
.
Results
.
BitstreamFile
;
LogFile
=
p
.
Results
.
LogFile
;
for
file
=
{
ReconFile
,
BitstreamFile
,
LogFile
}
[
folder
,
~
,
~
]
=
fileparts
(
file
{:});
if
~
(
7
==
exist
(
folder
,
'dir'
))
mkdir
(
folder
);
end
end
try
argList
=
paramToArg
([
parameters
;
extraParameters
],[
values
;
extraValues
]);
status
=
system
([
TAppEncoder
,
' '
,
argList
]);
...
...
@@ -42,19 +54,18 @@ catch
system
([
TAppEncoder
,
' '
,
argList
]);
end
function
argList
=
paramToArg
(
parameters
,
values
)
indConf
=
cellfun
(
@
(
str
)
strcmp
(
str
,
'ConfigFile'
),
parameters
);
indLog
=
cellfun
(
@
(
str
)
strcmp
(
str
,
'LogFile'
),
parameters
);
ind
=
indConf
|
indLog
;
argConf
=
strjoin
([
'-c'
,
values
(
indConf
)]);
argLog
=
strjoin
([
'>'
,
values
(
indLog
)
]);
argList
=
cellfun
(
@
(
param
,
val
)
[
'--'
,
param
,
'='
,
val
],
...
parameters
(
~
ind
),
values
(
~
ind
),
'UniformOutput'
,
false
);
argList
=
[
argConf
;
argList
;
argLog
];
argList
=
strjoin
(
argList
(:));
end
end
function
argList
=
paramToArg
(
parameters
,
values
)
indConf
=
cellfun
(
@
(
str
)
strcmp
(
str
,
'ConfigFile'
),
parameters
);
indLog
=
cellfun
(
@
(
str
)
strcmp
(
str
,
'LogFile'
),
parameters
);
ind
=
indConf
|
indLog
;
argConf
=
strjoin
([
'-c'
,
values
(
indConf
)]);
argLog
=
strjoin
([
'>'
,
values
(
indLog
)
]);
argList
=
cellfun
(
@
(
param
,
val
)
[
'--'
,
param
,
'='
,
val
],
...
parameters
(
~
ind
),
values
(
~
ind
),
'UniformOutput'
,
false
);
argList
=
[
argConf
;
argList
;
argLog
];
argList
=
strjoin
(
argList
(:));
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment