Skip to content
Snippets Groups Projects
Commit e4121df8 authored by Franck Galpin's avatar Franck Galpin
Browse files

Merge branch 'fix_mr94_data_conversion' into 'VTM-11.0_nnvc'

Draft: Fix mr94 data conversion

Closes #94

See merge request jvet-ahg-nnvc/VVCSoftware_VTM!238
parents 89a157b4 aa239aa4
No related branches found
Tags JM-14.0
No related merge requests found
...@@ -110,10 +110,10 @@ def readDataInt16( ...@@ -110,10 +110,10 @@ def readDataInt16(
data_h, w data_h, w
) )
data = data[:, srcc[2] : srcc[3]] data = data[:, srcc[2] : srcc[3]]
t[dstc[0] : dstc[1], dstc[2] : dstc[3]] = data * norm t[dstc[0] : dstc[1], dstc[2] : dstc[3]] = data
if scale: if scale:
t = t.repeat(2, axis=0).repeat(2, axis=1) t = t.repeat(2, axis=0).repeat(2, axis=1)
return t.astype("int16") return t.astype("int16") * norm
def readOne(patch_size, border_size, norm, fn, off, ctype): def readOne(patch_size, border_size, norm, fn, off, ctype):
...@@ -169,9 +169,7 @@ def hasLuma(comp): ...@@ -169,9 +169,7 @@ def hasLuma(comp):
class DataLoader: class DataLoader:
components = [] components = []
database = None # contains the whole database database = None # contains the whole database
patch_info = ( patch_info = None # contains address of each patch in the database: dataset index, frame index in the dataset, patch_index in the frame
None
) # contains address of each patch in the database: dataset index, frame index in the dataset, patch_index in the frame
suffix = {} # suffix for each file suffix = {} # suffix for each file
# patch_size in luma sample # patch_size in luma sample
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment