Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LF
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
Show more breadcrumbs
LightFieldCodingLibrary
LF
Commits
f47d6b98
Commit
f47d6b98
authored
5 years ago
by
DIB Elian
Browse files
Options
Downloads
Patches
Plain Diff
Accommodated function to recent changes
parent
240eed09
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codec.m
+15
-8
15 additions, 8 deletions
codec.m
with
15 additions
and
8 deletions
codec.m
+
15
−
8
View file @
f47d6b98
...
@@ -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
...
...
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