Skip to content

Latest commit

 

History

History

FDLTree_Codec

FDL Tree Codec

Description

This directory contains the FDL Tree codec described in the paper [1].

Usage

An example is provided in: ../Demo/Demo_FDLTree_Codec.m

Note: before encoding a light field with the FDL tree codec, a FDL model (layers and disparity values) must be generated with the FDL toolbox.

Encoding

  1. Convert the layers to spatial domain: FDLspat = ifftImgs(FDL);

  2. Define encoder's configuration parameters (e.g. HEVC QP, codec bitdepth, chroma format for YUV encoding...):

    cfg.QPBase=22;
    cfg.bitDepth=10;
    cfg.chromaFormat='444';
    

    See EncodeFDLTree.m for the full list of configuration parameters.

  3. Define the encoding tree structure to use. For example, to split each parent layer in two equal halves, as in the paper, use: treeStruct = genBinTreeMidCut(numLayers);

  4. Encode the layers FDLspat and disparity values D using the EncodeFDLTree function (see detailed documentation in EncodeFDLTree.m):

    EncodeFDLTree(FDLspat, D, treeStruct, cfg, resDir);
    

    This will generate subdirectories bin and log in the resDir containing respectively the binary files of the full encoded tree and the corresponding HEVC log files. The function also generates the reconstructed FDL Tree as output.

Decoding / Reading

  • To decode from binary files: use DecodeFDLTree specifying the codec configuration and the bin directory containing the encoded binary files (see detailed documentation of the function in DecodeFDLTree.m).

    • Decoding may be done only up to a given level of the tree using configuration parameter cfg.level (the full tree is decoded by default).
    • The function also outputs the number of bits nBits used and the processing time decodTime for decoding up to the specified level (only includes processing time: actual runtime may be longer due to reading/writing files from disk in the current implementation).
    • Number of bits and decoding times depend on the level of the decoded tree specified with cfg.level. If the full tree is decoded, the size (in bytes) of the bin directory must be equal to ceil(nBits/8).
  • To read a FDL Tree already in memory (e.g. reconstructed FDL Tree generated by EncodeFDLTree or decoded with DecodeFDLTree): use ReadFDLTree (see detailed documentation of the function in ReadFDLTree.m).

    • The FDL Tree may be read only up to a level specified as input (read the full tree by default).
    • Outputs the FDL (with its disparity values) at the specified level. Similarly to the DecodeFDLTree function, additional outputs nBits and decodTime are given for the specified level.

For the final display with the FDL toolbox rendering tools, the layers must be converted back to the Fourier domain: e.g. FDL=fftImgs(FDLspat);

Requirements

Windows is required to run the HEVC encoder/decoder with the modifications described in [2] or [3]. The Windows executables are provided in the HEVC_ILP subdirectory for:

  • Normal HEVC (HM): TAppEncoder_HM-12.1+RExt-4.2.exe | TAppDecoder_HM-12.1+RExt-4.2.exe
  • Modified HEVC [2] with non-linear inter-layer prediction: TAppEncoder_ILP_lin_trFast.exe | TAppDecoder_ILP_lin_tr.exe
  • Modified HEVC [3] with linear inter-layer prediction: TAppEncoder_ILP_lin_trFast.exe | TAppDecoder_ILP_lin_tr.exe

References

[1] M. Le Pendu, C. Ozcinar and A. Smolic, "Hierarchical Fourier Disparity Layer Transmission for Light Field Streaming," ICIP 2020.

[2] M. Le Pendu, D. Thoreau and C. Guillemot, "Local Inverse Tone Curve Learning for High Dynamic Range Image Scalable Compression," in IEEE Transactions on Image Processing, vol. 24, no. 12, pp. 5753-5763, Dec. 2015.

[3] J.-U. Garbas and H. Thoma, "Inter-layer prediction for backwards compatible high dynamic range video coding with SVC," PCS 2012.