From 2f5c56e124d6986e9403cf1594a9e4035659e94d Mon Sep 17 00:00:00 2001 From: fengxinmin <1958749374@qq.com> Date: Wed, 12 Feb 2025 15:17:52 +0800 Subject: [PATCH] Update the code for generating the training dataset --- README.md | 26 +- {encoder => codec}/exe/print_partition.exe | Bin .../BitstreamExtractorApp.cpp | 0 .../BitstreamExtractorApp.h | 0 .../BitstreamExtractorAppCfg.cpp | 0 .../BitstreamExtractorAppCfg.h | 0 .../App/BitstreamExtractorApp/CMakeLists.txt | 0 .../bitstreamextractormain.cpp | 0 .../App/DecoderAnalyserApp/CMakeLists.txt | 0 .../App/DecoderApp/CMakeLists.txt | 0 .../print_partition/App/DecoderApp/DecApp.cpp | 0 .../print_partition/App/DecoderApp/DecApp.h | 0 .../App/DecoderApp/DecAppCfg.cpp | 0 .../App/DecoderApp/DecAppCfg.h | 0 .../App/DecoderApp/decmain.cpp | 0 .../App/EncoderApp/CMakeLists.txt | 0 .../print_partition/App/EncoderApp/EncApp.cpp | 0 .../print_partition/App/EncoderApp/EncApp.h | 0 .../App/EncoderApp/EncAppCfg.cpp | 0 .../App/EncoderApp/EncAppCfg.h | 0 .../App/EncoderApp/encmain.cpp | 0 .../print_partition/App/Parcat/CMakeLists.txt | 0 .../print_partition/App/Parcat/parcat.cpp | 0 .../print_partition/App/Parcat/readme.md | 0 .../App/SEIRemovalApp/CMakeLists.txt | 0 .../App/SEIRemovalApp/SEIRemovalApp.cpp | 0 .../App/SEIRemovalApp/SEIRemovalApp.h | 0 .../App/SEIRemovalApp/SEIRemovalAppCfg.cpp | 0 .../App/SEIRemovalApp/SEIRemovalAppCfg.h | 0 .../App/SEIRemovalApp/seiremovalmain.cpp | 0 .../App/StreamMergeApp/CMakeLists.txt | 0 .../App/StreamMergeApp/StreamMergeApp.cpp | 0 .../App/StreamMergeApp/StreamMergeApp.h | 0 .../App/StreamMergeApp/StreamMergeAppCfg.cpp | 0 .../App/StreamMergeApp/StreamMergeAppCfg.h | 0 .../App/StreamMergeApp/StreamMergeMain.cpp | 0 .../BitrateTargeting/ExtractBitrates.cpp | 0 .../utils/BitrateTargeting/ExtractBitrates.h | 0 .../BitrateTargeting/ExtractBitratesMain.cpp | 0 .../BitrateTargeting/GuessLambdaModifiers.cpp | 0 .../BitrateTargeting/GuessLambdaModifiers.h | 0 .../GuessLambdaModifiersMain.cpp | 0 .../BitrateTargeting/QuickStartGuide.pdf | Bin .../App/utils/BitrateTargeting/RuntimeError.h | 0 .../App/utils/BitrateTargeting/encode.shl | 0 .../utils/BitrateTargeting/encodeCommand.sh | 0 .../App/utils/BitrateTargeting/makefile | 0 .../utils/BitrateTargeting/targetBitrates.sh | 0 .../App/utils/annexBbytecount.cpp | 0 .../App/utils/convert_NtoMbit_YCbCr.cpp | 0 .../Lib/CommonAnalyserLib/CMakeLists.txt | 0 .../Lib/CommonLib/AdaptiveLoopFilter.cpp | 0 .../Lib/CommonLib/AdaptiveLoopFilter.h | 0 .../Lib/CommonLib/AffineGradientSearch.cpp | 0 .../Lib/CommonLib/AffineGradientSearch.h | 0 .../Lib/CommonLib/AlfParameters.h | 0 .../Lib/CommonLib/BitStream.cpp | 0 .../print_partition/Lib/CommonLib/BitStream.h | 0 .../print_partition/Lib/CommonLib/Buffer.cpp | 0 .../print_partition/Lib/CommonLib/Buffer.h | 0 .../Lib/CommonLib/CMakeLists.txt | 0 .../Lib/CommonLib/CacheModel.cpp | 0 .../Lib/CommonLib/CacheModel.h | 0 .../Lib/CommonLib/ChromaFormat.cpp | 0 .../Lib/CommonLib/ChromaFormat.h | 0 .../Lib/CommonLib/CodingStatistics.h | 0 .../Lib/CommonLib/CodingStructure.cpp | 0 .../Lib/CommonLib/CodingStructure.h | 0 .../print_partition/Lib/CommonLib/Common.h | 0 .../print_partition/Lib/CommonLib/CommonDef.h | 0 .../Lib/CommonLib/ContextModelling.cpp | 0 .../Lib/CommonLib/ContextModelling.h | 0 .../Lib/CommonLib/Contexts.cpp | 0 .../print_partition/Lib/CommonLib/Contexts.h | 0 .../Lib/CommonLib/DepQuant.cpp | 0 .../print_partition/Lib/CommonLib/DepQuant.h | 0 .../print_partition/Lib/CommonLib/HRD.cpp | 0 .../print_partition/Lib/CommonLib/HRD.h | 0 .../print_partition/Lib/CommonLib/Hash.cpp | 0 .../print_partition/Lib/CommonLib/Hash.h | 0 .../Lib/CommonLib/IbcHashMap.cpp | 0 .../Lib/CommonLib/IbcHashMap.h | 0 .../Lib/CommonLib/InterPrediction.cpp | 0 .../Lib/CommonLib/InterPrediction.h | 0 .../Lib/CommonLib/InterpolationFilter.cpp | 0 .../Lib/CommonLib/InterpolationFilter.h | 0 .../Lib/CommonLib/IntraPrediction.cpp | 0 .../Lib/CommonLib/IntraPrediction.h | 0 .../Lib/CommonLib/LoopFilter.cpp | 0 .../Lib/CommonLib/LoopFilter.h | 0 .../print_partition/Lib/CommonLib/MCTS.cpp | 0 .../print_partition/Lib/CommonLib/MCTS.h | 0 .../Lib/CommonLib/MatrixIntraPrediction.cpp | 0 .../Lib/CommonLib/MatrixIntraPrediction.h | 0 .../print_partition/Lib/CommonLib/MipData.h | 0 .../Lib/CommonLib/MotionInfo.h | 0 .../print_partition/Lib/CommonLib/Mv.cpp | 0 .../print_partition/Lib/CommonLib/Mv.h | 0 .../print_partition/Lib/CommonLib/NAL.h | 0 .../Lib/CommonLib/ParameterSetManager.cpp | 0 .../Lib/CommonLib/ParameterSetManager.h | 0 .../Lib/CommonLib/PicYuvMD5.cpp | 0 .../print_partition/Lib/CommonLib/Picture.cpp | 0 .../print_partition/Lib/CommonLib/Picture.h | 0 .../Lib/CommonLib/ProfileLevelTier.cpp | 0 .../Lib/CommonLib/ProfileLevelTier.h | 0 .../print_partition/Lib/CommonLib/Quant.cpp | 0 .../print_partition/Lib/CommonLib/Quant.h | 0 .../Lib/CommonLib/QuantRDOQ.cpp | 0 .../print_partition/Lib/CommonLib/QuantRDOQ.h | 0 .../print_partition/Lib/CommonLib/RdCost.cpp | 0 .../print_partition/Lib/CommonLib/RdCost.h | 0 .../Lib/CommonLib/RdCostWeightPrediction.cpp | 0 .../Lib/CommonLib/RdCostWeightPrediction.h | 0 .../print_partition/Lib/CommonLib/Reshape.cpp | 0 .../print_partition/Lib/CommonLib/Reshape.h | 0 .../print_partition/Lib/CommonLib/Rom.cpp | 0 .../print_partition/Lib/CommonLib/Rom.h | 0 .../Lib/CommonLib/RomLFNST.cpp | 0 .../print_partition/Lib/CommonLib/RomTr.cpp | 0 .../print_partition/Lib/CommonLib/SEI.cpp | 0 .../print_partition/Lib/CommonLib/SEI.h | 0 .../Lib/CommonLib/SampleAdaptiveOffset.cpp | 0 .../Lib/CommonLib/SampleAdaptiveOffset.h | 0 .../print_partition/Lib/CommonLib/Slice.cpp | 0 .../print_partition/Lib/CommonLib/Slice.h | 0 .../print_partition/Lib/CommonLib/TrQuant.cpp | 0 .../print_partition/Lib/CommonLib/TrQuant.h | 0 .../Lib/CommonLib/TrQuant_EMT.cpp | 0 .../Lib/CommonLib/TrQuant_EMT.h | 0 .../print_partition/Lib/CommonLib/TypeDef.h | 0 .../print_partition/Lib/CommonLib/Unit.cpp | 0 .../print_partition/Lib/CommonLib/Unit.h | 0 .../Lib/CommonLib/UnitPartitioner.cpp | 0 .../Lib/CommonLib/UnitPartitioner.h | 0 .../Lib/CommonLib/UnitTools.cpp | 0 .../print_partition/Lib/CommonLib/UnitTools.h | 0 .../Lib/CommonLib/WeightPrediction.cpp | 0 .../Lib/CommonLib/WeightPrediction.h | 0 .../print_partition/Lib/CommonLib/dtrace.cpp | 0 .../print_partition/Lib/CommonLib/dtrace.h | 0 .../Lib/CommonLib/dtrace_blockstatistics.cpp | 0 .../Lib/CommonLib/dtrace_blockstatistics.h | 0 .../Lib/CommonLib/dtrace_buffer.h | 0 .../Lib/CommonLib/dtrace_codingstruct.h | 0 .../Lib/CommonLib/dtrace_next.h | 0 .../print_partition/Lib/CommonLib/version.h | 0 .../Lib/CommonLib/x86/AdaptiveLoopFilterX86.h | 0 .../CommonLib/x86/AffineGradientSearchX86.h | 0 .../Lib/CommonLib/x86/BufferX86.h | 0 .../Lib/CommonLib/x86/CommonDefX86.cpp | 0 .../Lib/CommonLib/x86/CommonDefX86.h | 0 .../Lib/CommonLib/x86/IbcHashMapX86.h | 0 .../Lib/CommonLib/x86/InitX86.cpp | 0 .../CommonLib/x86/InterpolationFilterX86.h | 0 .../Lib/CommonLib/x86/RdCostX86.h | 0 .../x86/avx/AdaptiveLoopFilter_avx.cpp | 0 .../x86/avx/AffineGradientSearch_avx.cpp | 0 .../Lib/CommonLib/x86/avx/Buffer_avx.cpp | 0 .../x86/avx/InterpolationFilter_avx.cpp | 0 .../Lib/CommonLib/x86/avx/RdCost_avx.cpp | 0 .../x86/avx2/AdaptiveLoopFilter_avx2.cpp | 0 .../x86/avx2/AffineGradientSearch_avx2.cpp | 0 .../Lib/CommonLib/x86/avx2/Buffer_avx2.cpp | 0 .../x86/avx2/InterpolationFilter_avx2.cpp | 0 .../Lib/CommonLib/x86/avx2/RdCost_avx2.cpp | 0 .../x86/sse41/AdaptiveLoopFilter_sse41.cpp | 0 .../x86/sse41/AffineGradientSearch_sse41.cpp | 0 .../Lib/CommonLib/x86/sse41/Buffer_sse41.cpp | 0 .../x86/sse41/InterpolationFilter_sse41.cpp | 0 .../Lib/CommonLib/x86/sse41/RdCost_sse41.cpp | 0 .../CommonLib/x86/sse42/IbcHashmap_sse42.cpp | 0 .../Lib/DecoderAnalyserLib/CMakeLists.txt | 0 .../Lib/DecoderLib/AnnexBread.cpp | 0 .../Lib/DecoderLib/AnnexBread.h | 0 .../Lib/DecoderLib/BinDecoder.cpp | 0 .../Lib/DecoderLib/BinDecoder.h | 0 .../Lib/DecoderLib/CABACReader.cpp | 0 .../Lib/DecoderLib/CABACReader.h | 0 .../Lib/DecoderLib/CMakeLists.txt | 0 .../print_partition/Lib/DecoderLib/DecCu.cpp | 0 .../print_partition/Lib/DecoderLib/DecCu.h | 0 .../print_partition/Lib/DecoderLib/DecLib.cpp | 0 .../print_partition/Lib/DecoderLib/DecLib.h | 0 .../Lib/DecoderLib/DecSlice.cpp | 0 .../print_partition/Lib/DecoderLib/DecSlice.h | 0 .../Lib/DecoderLib/NALread.cpp | 0 .../print_partition/Lib/DecoderLib/NALread.h | 0 .../Lib/DecoderLib/SEIread.cpp | 0 .../print_partition/Lib/DecoderLib/SEIread.h | 0 .../Lib/DecoderLib/VLCReader.cpp | 0 .../Lib/DecoderLib/VLCReader.h | 0 .../print_partition/Lib/EncoderLib/AQp.cpp | 0 .../print_partition/Lib/EncoderLib/AQp.h | 0 .../print_partition/Lib/EncoderLib/Analyze.h | 0 .../Lib/EncoderLib/AnnexBwrite.h | 0 .../Lib/EncoderLib/BinEncoder.cpp | 0 .../Lib/EncoderLib/BinEncoder.h | 0 .../Lib/EncoderLib/CABACWriter.cpp | 0 .../Lib/EncoderLib/CABACWriter.h | 0 .../Lib/EncoderLib/CMakeLists.txt | 0 .../Lib/EncoderLib/EncAdaptiveLoopFilter.cpp | 0 .../Lib/EncoderLib/EncAdaptiveLoopFilter.h | 0 .../print_partition/Lib/EncoderLib/EncCfg.h | 0 .../Lib/EncoderLib/EncCfgParam.h | 0 .../print_partition/Lib/EncoderLib/EncCu.cpp | 0 .../print_partition/Lib/EncoderLib/EncCu.h | 0 .../print_partition/Lib/EncoderLib/EncGOP.cpp | 0 .../print_partition/Lib/EncoderLib/EncGOP.h | 0 .../print_partition/Lib/EncoderLib/EncHRD.cpp | 0 .../print_partition/Lib/EncoderLib/EncHRD.h | 0 .../print_partition/Lib/EncoderLib/EncLib.cpp | 0 .../print_partition/Lib/EncoderLib/EncLib.h | 0 .../Lib/EncoderLib/EncLibCommon.cpp | 0 .../Lib/EncoderLib/EncLibCommon.h | 0 .../Lib/EncoderLib/EncModeCtrl.cpp | 0 .../Lib/EncoderLib/EncModeCtrl.h | 0 .../Lib/EncoderLib/EncReshape.cpp | 0 .../Lib/EncoderLib/EncReshape.h | 0 .../EncoderLib/EncSampleAdaptiveOffset.cpp | 0 .../Lib/EncoderLib/EncSampleAdaptiveOffset.h | 0 .../Lib/EncoderLib/EncSlice.cpp | 0 .../print_partition/Lib/EncoderLib/EncSlice.h | 0 .../Lib/EncoderLib/EncTemporalFilter.cpp | 0 .../Lib/EncoderLib/EncTemporalFilter.h | 0 .../Lib/EncoderLib/InterSearch.cpp | 0 .../Lib/EncoderLib/InterSearch.h | 0 .../Lib/EncoderLib/IntraSearch.cpp | 0 .../Lib/EncoderLib/IntraSearch.h | 0 .../Lib/EncoderLib/NALwrite.cpp | 0 .../print_partition/Lib/EncoderLib/NALwrite.h | 0 .../Lib/EncoderLib/RateCtrl.cpp | 0 .../print_partition/Lib/EncoderLib/RateCtrl.h | 0 .../Lib/EncoderLib/SEIEncoder.cpp | 0 .../Lib/EncoderLib/SEIEncoder.h | 0 .../Lib/EncoderLib/SEIwrite.cpp | 0 .../print_partition/Lib/EncoderLib/SEIwrite.h | 0 .../Lib/EncoderLib/VLCWriter.cpp | 0 .../Lib/EncoderLib/VLCWriter.h | 0 .../Lib/EncoderLib/WeightPredAnalysis.cpp | 0 .../Lib/EncoderLib/WeightPredAnalysis.h | 0 .../Lib/Utilities/CMakeLists.txt | 0 .../Lib/Utilities/VideoIOYuv.cpp | 0 .../Lib/Utilities/VideoIOYuv.h | 0 .../Lib/Utilities/program_options_lite.cpp | 0 .../Lib/Utilities/program_options_lite.h | 0 .../print_partition/Lib/libmd5/MD5.h | 0 .../print_partition/Lib/libmd5/libmd5.cpp | 0 .../print_partition/Lib/libmd5/libmd5.h | 0 .../VisualStudio/common.natvis | 0 .../VisualStudio/static_vector.natvis | 0 dataset_preparation.py | 118 +++++++ depth2dataset.py | 317 ++++++++++++++++++ 253 files changed, 459 insertions(+), 2 deletions(-) rename {encoder => codec}/exe/print_partition.exe (100%) rename {encoder => codec}/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.h (100%) rename {encoder => codec}/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.h (100%) rename {encoder => codec}/source_code/print_partition/App/BitstreamExtractorApp/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/BitstreamExtractorApp/bitstreamextractormain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderAnalyserApp/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderApp/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderApp/DecApp.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderApp/DecApp.h (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderApp/DecAppCfg.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderApp/DecAppCfg.h (100%) rename {encoder => codec}/source_code/print_partition/App/DecoderApp/decmain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/EncoderApp/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/EncoderApp/EncApp.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/EncoderApp/EncApp.h (100%) rename {encoder => codec}/source_code/print_partition/App/EncoderApp/EncAppCfg.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/EncoderApp/EncAppCfg.h (100%) rename {encoder => codec}/source_code/print_partition/App/EncoderApp/encmain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/Parcat/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/Parcat/parcat.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/Parcat/readme.md (100%) rename {encoder => codec}/source_code/print_partition/App/SEIRemovalApp/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.h (100%) rename {encoder => codec}/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.h (100%) rename {encoder => codec}/source_code/print_partition/App/SEIRemovalApp/seiremovalmain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/StreamMergeApp/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.h (100%) rename {encoder => codec}/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.h (100%) rename {encoder => codec}/source_code/print_partition/App/StreamMergeApp/StreamMergeMain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.h (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitratesMain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.h (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/QuickStartGuide.pdf (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/RuntimeError.h (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/encode.shl (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/encodeCommand.sh (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/makefile (100%) rename {encoder => codec}/source_code/print_partition/App/utils/BitrateTargeting/targetBitrates.sh (100%) rename {encoder => codec}/source_code/print_partition/App/utils/annexBbytecount.cpp (100%) rename {encoder => codec}/source_code/print_partition/App/utils/convert_NtoMbit_YCbCr.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonAnalyserLib/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/AlfParameters.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/BitStream.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/BitStream.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Buffer.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Buffer.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CacheModel.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CacheModel.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ChromaFormat.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ChromaFormat.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CodingStatistics.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CodingStructure.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CodingStructure.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Common.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/CommonDef.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ContextModelling.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ContextModelling.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Contexts.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Contexts.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/DepQuant.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/DepQuant.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/HRD.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/HRD.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Hash.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Hash.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/IbcHashMap.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/IbcHashMap.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/InterPrediction.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/InterPrediction.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/InterpolationFilter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/InterpolationFilter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/IntraPrediction.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/IntraPrediction.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/LoopFilter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/LoopFilter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/MCTS.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/MCTS.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/MipData.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/MotionInfo.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Mv.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Mv.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/NAL.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ParameterSetManager.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ParameterSetManager.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/PicYuvMD5.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Picture.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Picture.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Quant.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Quant.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/QuantRDOQ.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/QuantRDOQ.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/RdCost.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/RdCost.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Reshape.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Reshape.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Rom.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Rom.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/RomLFNST.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/RomTr.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/SEI.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/SEI.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Slice.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Slice.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/TrQuant.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/TrQuant.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/TypeDef.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Unit.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/Unit.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/UnitPartitioner.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/UnitPartitioner.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/UnitTools.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/UnitTools.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/WeightPrediction.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/WeightPrediction.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace_buffer.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace_codingstruct.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/dtrace_next.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/version.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/AffineGradientSearchX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/BufferX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/IbcHashMapX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/InitX86.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/InterpolationFilterX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/RdCostX86.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx/AdaptiveLoopFilter_avx.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx/AffineGradientSearch_avx.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx/Buffer_avx.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx/RdCost_avx.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx2/AdaptiveLoopFilter_avx2.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx2/AffineGradientSearch_avx2.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx2/Buffer_avx2.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx2/InterpolationFilter_avx2.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/avx2/RdCost_avx2.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/sse41/AdaptiveLoopFilter_sse41.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/sse41/AffineGradientSearch_sse41.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/sse41/Buffer_sse41.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/sse41/InterpolationFilter_sse41.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/sse41/RdCost_sse41.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/CommonLib/x86/sse42/IbcHashmap_sse42.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderAnalyserLib/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/AnnexBread.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/AnnexBread.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/BinDecoder.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/BinDecoder.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/CABACReader.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/CABACReader.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/DecCu.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/DecCu.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/DecLib.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/DecLib.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/DecSlice.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/DecSlice.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/NALread.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/NALread.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/SEIread.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/SEIread.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/VLCReader.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/DecoderLib/VLCReader.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/AQp.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/AQp.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/Analyze.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/AnnexBwrite.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/BinEncoder.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/BinEncoder.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/CABACWriter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/CABACWriter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncCfg.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncCfgParam.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncCu.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncCu.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncGOP.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncGOP.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncHRD.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncHRD.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncLib.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncLib.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncLibCommon.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncLibCommon.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncReshape.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncReshape.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncSlice.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncSlice.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/InterSearch.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/InterSearch.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/IntraSearch.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/IntraSearch.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/NALwrite.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/NALwrite.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/RateCtrl.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/RateCtrl.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/SEIEncoder.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/SEIEncoder.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/SEIwrite.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/SEIwrite.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/VLCWriter.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/VLCWriter.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/Utilities/CMakeLists.txt (100%) rename {encoder => codec}/source_code/print_partition/Lib/Utilities/VideoIOYuv.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/Utilities/VideoIOYuv.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/Utilities/program_options_lite.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/Utilities/program_options_lite.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/libmd5/MD5.h (100%) rename {encoder => codec}/source_code/print_partition/Lib/libmd5/libmd5.cpp (100%) rename {encoder => codec}/source_code/print_partition/Lib/libmd5/libmd5.h (100%) rename {encoder => codec}/source_code/print_partition/VisualStudio/common.natvis (100%) rename {encoder => codec}/source_code/print_partition/VisualStudio/static_vector.natvis (100%) create mode 100644 dataset_preparation.py create mode 100644 depth2dataset.py diff --git a/README.md b/README.md index 090da41..1be170e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,29 @@ +## Training Dataset -## :running_woman: Previous work +The training dataset is available at [Baidu Cloud](https://pan.baidu.com/s/1ZMPZqOcQS_gri_pzSq2vGA?pwd=tmxn). We used 668 4K sequences with 32 frames from the BVI-DVC dataset, Tencent Video Dataset, and UVG dataset. These sequences were cropped or downsampled to create datasets with four different resolutions: 3840x2160, 1920x1080, 960x544, and 480x272. We organized the training dataset using HDF5 format, which includes the following files: -[Partition Map Prediction for Fast Block Partitioning in VVC Intra-frame Coding](https://github.com/AolinFeng/PMP-VVC-TIP2023) +- `train_seqs.h5`: Luma components of the original sequences. +- `train_qp22.h5`: Training dataset label for basic QP22. +- `train_qp27.h5`: Training dataset label for basic QP27. +- `train_qp32.h5`: Training dataset label for basic QP32. +- `train_qp37.h5`: Training dataset label for basic QP37. + +To further support subsequent research, we also provide the code for generating the training dataset, which includes: + +1. Modified VTM source code `codec/print_encoder` and the executable file `codec/exe/print_encoder.exe` for extracting block partitioning statistics from YUV sequences. Code `dataset_preparation.py` for extracting the statistics into `DepthSaving/` with multiple threads. +3. Code `depth2dataset.py` for converting the statistics into partition maps. + + + + + + + +## References + +1. [Partition Map Prediction for Fast Block Partitioning in VVC Intra-frame Coding](https://github.com/AolinFeng/PMP-VVC-TIP2023) + +2. \ No newline at end of file diff --git a/encoder/exe/print_partition.exe b/codec/exe/print_partition.exe similarity index 100% rename from encoder/exe/print_partition.exe rename to codec/exe/print_partition.exe diff --git a/encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp b/codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp similarity index 100% rename from encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp rename to codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp diff --git a/encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.h b/codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.h similarity index 100% rename from encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.h rename to codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorApp.h diff --git a/encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.cpp b/codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.cpp similarity index 100% rename from encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.cpp rename to codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.cpp diff --git a/encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.h b/codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.h similarity index 100% rename from encoder/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.h rename to codec/source_code/print_partition/App/BitstreamExtractorApp/BitstreamExtractorAppCfg.h diff --git a/encoder/source_code/print_partition/App/BitstreamExtractorApp/CMakeLists.txt b/codec/source_code/print_partition/App/BitstreamExtractorApp/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/BitstreamExtractorApp/CMakeLists.txt rename to codec/source_code/print_partition/App/BitstreamExtractorApp/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/BitstreamExtractorApp/bitstreamextractormain.cpp b/codec/source_code/print_partition/App/BitstreamExtractorApp/bitstreamextractormain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/BitstreamExtractorApp/bitstreamextractormain.cpp rename to codec/source_code/print_partition/App/BitstreamExtractorApp/bitstreamextractormain.cpp diff --git a/encoder/source_code/print_partition/App/DecoderAnalyserApp/CMakeLists.txt b/codec/source_code/print_partition/App/DecoderAnalyserApp/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/DecoderAnalyserApp/CMakeLists.txt rename to codec/source_code/print_partition/App/DecoderAnalyserApp/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/DecoderApp/CMakeLists.txt b/codec/source_code/print_partition/App/DecoderApp/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/DecoderApp/CMakeLists.txt rename to codec/source_code/print_partition/App/DecoderApp/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/DecoderApp/DecApp.cpp b/codec/source_code/print_partition/App/DecoderApp/DecApp.cpp similarity index 100% rename from encoder/source_code/print_partition/App/DecoderApp/DecApp.cpp rename to codec/source_code/print_partition/App/DecoderApp/DecApp.cpp diff --git a/encoder/source_code/print_partition/App/DecoderApp/DecApp.h b/codec/source_code/print_partition/App/DecoderApp/DecApp.h similarity index 100% rename from encoder/source_code/print_partition/App/DecoderApp/DecApp.h rename to codec/source_code/print_partition/App/DecoderApp/DecApp.h diff --git a/encoder/source_code/print_partition/App/DecoderApp/DecAppCfg.cpp b/codec/source_code/print_partition/App/DecoderApp/DecAppCfg.cpp similarity index 100% rename from encoder/source_code/print_partition/App/DecoderApp/DecAppCfg.cpp rename to codec/source_code/print_partition/App/DecoderApp/DecAppCfg.cpp diff --git a/encoder/source_code/print_partition/App/DecoderApp/DecAppCfg.h b/codec/source_code/print_partition/App/DecoderApp/DecAppCfg.h similarity index 100% rename from encoder/source_code/print_partition/App/DecoderApp/DecAppCfg.h rename to codec/source_code/print_partition/App/DecoderApp/DecAppCfg.h diff --git a/encoder/source_code/print_partition/App/DecoderApp/decmain.cpp b/codec/source_code/print_partition/App/DecoderApp/decmain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/DecoderApp/decmain.cpp rename to codec/source_code/print_partition/App/DecoderApp/decmain.cpp diff --git a/encoder/source_code/print_partition/App/EncoderApp/CMakeLists.txt b/codec/source_code/print_partition/App/EncoderApp/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/EncoderApp/CMakeLists.txt rename to codec/source_code/print_partition/App/EncoderApp/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/EncoderApp/EncApp.cpp b/codec/source_code/print_partition/App/EncoderApp/EncApp.cpp similarity index 100% rename from encoder/source_code/print_partition/App/EncoderApp/EncApp.cpp rename to codec/source_code/print_partition/App/EncoderApp/EncApp.cpp diff --git a/encoder/source_code/print_partition/App/EncoderApp/EncApp.h b/codec/source_code/print_partition/App/EncoderApp/EncApp.h similarity index 100% rename from encoder/source_code/print_partition/App/EncoderApp/EncApp.h rename to codec/source_code/print_partition/App/EncoderApp/EncApp.h diff --git a/encoder/source_code/print_partition/App/EncoderApp/EncAppCfg.cpp b/codec/source_code/print_partition/App/EncoderApp/EncAppCfg.cpp similarity index 100% rename from encoder/source_code/print_partition/App/EncoderApp/EncAppCfg.cpp rename to codec/source_code/print_partition/App/EncoderApp/EncAppCfg.cpp diff --git a/encoder/source_code/print_partition/App/EncoderApp/EncAppCfg.h b/codec/source_code/print_partition/App/EncoderApp/EncAppCfg.h similarity index 100% rename from encoder/source_code/print_partition/App/EncoderApp/EncAppCfg.h rename to codec/source_code/print_partition/App/EncoderApp/EncAppCfg.h diff --git a/encoder/source_code/print_partition/App/EncoderApp/encmain.cpp b/codec/source_code/print_partition/App/EncoderApp/encmain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/EncoderApp/encmain.cpp rename to codec/source_code/print_partition/App/EncoderApp/encmain.cpp diff --git a/encoder/source_code/print_partition/App/Parcat/CMakeLists.txt b/codec/source_code/print_partition/App/Parcat/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/Parcat/CMakeLists.txt rename to codec/source_code/print_partition/App/Parcat/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/Parcat/parcat.cpp b/codec/source_code/print_partition/App/Parcat/parcat.cpp similarity index 100% rename from encoder/source_code/print_partition/App/Parcat/parcat.cpp rename to codec/source_code/print_partition/App/Parcat/parcat.cpp diff --git a/encoder/source_code/print_partition/App/Parcat/readme.md b/codec/source_code/print_partition/App/Parcat/readme.md similarity index 100% rename from encoder/source_code/print_partition/App/Parcat/readme.md rename to codec/source_code/print_partition/App/Parcat/readme.md diff --git a/encoder/source_code/print_partition/App/SEIRemovalApp/CMakeLists.txt b/codec/source_code/print_partition/App/SEIRemovalApp/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/SEIRemovalApp/CMakeLists.txt rename to codec/source_code/print_partition/App/SEIRemovalApp/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.cpp b/codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.cpp similarity index 100% rename from encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.cpp rename to codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.cpp diff --git a/encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.h b/codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.h similarity index 100% rename from encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.h rename to codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalApp.h diff --git a/encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.cpp b/codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.cpp similarity index 100% rename from encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.cpp rename to codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.cpp diff --git a/encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.h b/codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.h similarity index 100% rename from encoder/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.h rename to codec/source_code/print_partition/App/SEIRemovalApp/SEIRemovalAppCfg.h diff --git a/encoder/source_code/print_partition/App/SEIRemovalApp/seiremovalmain.cpp b/codec/source_code/print_partition/App/SEIRemovalApp/seiremovalmain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/SEIRemovalApp/seiremovalmain.cpp rename to codec/source_code/print_partition/App/SEIRemovalApp/seiremovalmain.cpp diff --git a/encoder/source_code/print_partition/App/StreamMergeApp/CMakeLists.txt b/codec/source_code/print_partition/App/StreamMergeApp/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/App/StreamMergeApp/CMakeLists.txt rename to codec/source_code/print_partition/App/StreamMergeApp/CMakeLists.txt diff --git a/encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.cpp b/codec/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.cpp similarity index 100% rename from encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.cpp rename to codec/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.cpp diff --git a/encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.h b/codec/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.h similarity index 100% rename from encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.h rename to codec/source_code/print_partition/App/StreamMergeApp/StreamMergeApp.h diff --git a/encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.cpp b/codec/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.cpp similarity index 100% rename from encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.cpp rename to codec/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.cpp diff --git a/encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.h b/codec/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.h similarity index 100% rename from encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.h rename to codec/source_code/print_partition/App/StreamMergeApp/StreamMergeAppCfg.h diff --git a/encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeMain.cpp b/codec/source_code/print_partition/App/StreamMergeApp/StreamMergeMain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/StreamMergeApp/StreamMergeMain.cpp rename to codec/source_code/print_partition/App/StreamMergeApp/StreamMergeMain.cpp diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.cpp b/codec/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.cpp similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.cpp rename to codec/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.cpp diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.h b/codec/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.h similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.h rename to codec/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitrates.h diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitratesMain.cpp b/codec/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitratesMain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitratesMain.cpp rename to codec/source_code/print_partition/App/utils/BitrateTargeting/ExtractBitratesMain.cpp diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp b/codec/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp rename to codec/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.h b/codec/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.h similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.h rename to codec/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiers.h diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp b/codec/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp rename to codec/source_code/print_partition/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/QuickStartGuide.pdf b/codec/source_code/print_partition/App/utils/BitrateTargeting/QuickStartGuide.pdf similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/QuickStartGuide.pdf rename to codec/source_code/print_partition/App/utils/BitrateTargeting/QuickStartGuide.pdf diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/RuntimeError.h b/codec/source_code/print_partition/App/utils/BitrateTargeting/RuntimeError.h similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/RuntimeError.h rename to codec/source_code/print_partition/App/utils/BitrateTargeting/RuntimeError.h diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/encode.shl b/codec/source_code/print_partition/App/utils/BitrateTargeting/encode.shl similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/encode.shl rename to codec/source_code/print_partition/App/utils/BitrateTargeting/encode.shl diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/encodeCommand.sh b/codec/source_code/print_partition/App/utils/BitrateTargeting/encodeCommand.sh similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/encodeCommand.sh rename to codec/source_code/print_partition/App/utils/BitrateTargeting/encodeCommand.sh diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/makefile b/codec/source_code/print_partition/App/utils/BitrateTargeting/makefile similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/makefile rename to codec/source_code/print_partition/App/utils/BitrateTargeting/makefile diff --git a/encoder/source_code/print_partition/App/utils/BitrateTargeting/targetBitrates.sh b/codec/source_code/print_partition/App/utils/BitrateTargeting/targetBitrates.sh similarity index 100% rename from encoder/source_code/print_partition/App/utils/BitrateTargeting/targetBitrates.sh rename to codec/source_code/print_partition/App/utils/BitrateTargeting/targetBitrates.sh diff --git a/encoder/source_code/print_partition/App/utils/annexBbytecount.cpp b/codec/source_code/print_partition/App/utils/annexBbytecount.cpp similarity index 100% rename from encoder/source_code/print_partition/App/utils/annexBbytecount.cpp rename to codec/source_code/print_partition/App/utils/annexBbytecount.cpp diff --git a/encoder/source_code/print_partition/App/utils/convert_NtoMbit_YCbCr.cpp b/codec/source_code/print_partition/App/utils/convert_NtoMbit_YCbCr.cpp similarity index 100% rename from encoder/source_code/print_partition/App/utils/convert_NtoMbit_YCbCr.cpp rename to codec/source_code/print_partition/App/utils/convert_NtoMbit_YCbCr.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonAnalyserLib/CMakeLists.txt b/codec/source_code/print_partition/Lib/CommonAnalyserLib/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonAnalyserLib/CMakeLists.txt rename to codec/source_code/print_partition/Lib/CommonAnalyserLib/CMakeLists.txt diff --git a/encoder/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.cpp b/codec/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.cpp rename to codec/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.h b/codec/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.h rename to codec/source_code/print_partition/Lib/CommonLib/AdaptiveLoopFilter.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.cpp b/codec/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.cpp rename to codec/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.h b/codec/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.h rename to codec/source_code/print_partition/Lib/CommonLib/AffineGradientSearch.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/AlfParameters.h b/codec/source_code/print_partition/Lib/CommonLib/AlfParameters.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/AlfParameters.h rename to codec/source_code/print_partition/Lib/CommonLib/AlfParameters.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/BitStream.cpp b/codec/source_code/print_partition/Lib/CommonLib/BitStream.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/BitStream.cpp rename to codec/source_code/print_partition/Lib/CommonLib/BitStream.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/BitStream.h b/codec/source_code/print_partition/Lib/CommonLib/BitStream.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/BitStream.h rename to codec/source_code/print_partition/Lib/CommonLib/BitStream.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Buffer.cpp b/codec/source_code/print_partition/Lib/CommonLib/Buffer.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Buffer.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Buffer.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Buffer.h b/codec/source_code/print_partition/Lib/CommonLib/Buffer.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Buffer.h rename to codec/source_code/print_partition/Lib/CommonLib/Buffer.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CMakeLists.txt b/codec/source_code/print_partition/Lib/CommonLib/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CMakeLists.txt rename to codec/source_code/print_partition/Lib/CommonLib/CMakeLists.txt diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CacheModel.cpp b/codec/source_code/print_partition/Lib/CommonLib/CacheModel.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CacheModel.cpp rename to codec/source_code/print_partition/Lib/CommonLib/CacheModel.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CacheModel.h b/codec/source_code/print_partition/Lib/CommonLib/CacheModel.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CacheModel.h rename to codec/source_code/print_partition/Lib/CommonLib/CacheModel.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ChromaFormat.cpp b/codec/source_code/print_partition/Lib/CommonLib/ChromaFormat.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ChromaFormat.cpp rename to codec/source_code/print_partition/Lib/CommonLib/ChromaFormat.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ChromaFormat.h b/codec/source_code/print_partition/Lib/CommonLib/ChromaFormat.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ChromaFormat.h rename to codec/source_code/print_partition/Lib/CommonLib/ChromaFormat.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CodingStatistics.h b/codec/source_code/print_partition/Lib/CommonLib/CodingStatistics.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CodingStatistics.h rename to codec/source_code/print_partition/Lib/CommonLib/CodingStatistics.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CodingStructure.cpp b/codec/source_code/print_partition/Lib/CommonLib/CodingStructure.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CodingStructure.cpp rename to codec/source_code/print_partition/Lib/CommonLib/CodingStructure.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CodingStructure.h b/codec/source_code/print_partition/Lib/CommonLib/CodingStructure.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CodingStructure.h rename to codec/source_code/print_partition/Lib/CommonLib/CodingStructure.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Common.h b/codec/source_code/print_partition/Lib/CommonLib/Common.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Common.h rename to codec/source_code/print_partition/Lib/CommonLib/Common.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/CommonDef.h b/codec/source_code/print_partition/Lib/CommonLib/CommonDef.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/CommonDef.h rename to codec/source_code/print_partition/Lib/CommonLib/CommonDef.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ContextModelling.cpp b/codec/source_code/print_partition/Lib/CommonLib/ContextModelling.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ContextModelling.cpp rename to codec/source_code/print_partition/Lib/CommonLib/ContextModelling.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ContextModelling.h b/codec/source_code/print_partition/Lib/CommonLib/ContextModelling.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ContextModelling.h rename to codec/source_code/print_partition/Lib/CommonLib/ContextModelling.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Contexts.cpp b/codec/source_code/print_partition/Lib/CommonLib/Contexts.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Contexts.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Contexts.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Contexts.h b/codec/source_code/print_partition/Lib/CommonLib/Contexts.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Contexts.h rename to codec/source_code/print_partition/Lib/CommonLib/Contexts.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/DepQuant.cpp b/codec/source_code/print_partition/Lib/CommonLib/DepQuant.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/DepQuant.cpp rename to codec/source_code/print_partition/Lib/CommonLib/DepQuant.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/DepQuant.h b/codec/source_code/print_partition/Lib/CommonLib/DepQuant.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/DepQuant.h rename to codec/source_code/print_partition/Lib/CommonLib/DepQuant.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/HRD.cpp b/codec/source_code/print_partition/Lib/CommonLib/HRD.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/HRD.cpp rename to codec/source_code/print_partition/Lib/CommonLib/HRD.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/HRD.h b/codec/source_code/print_partition/Lib/CommonLib/HRD.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/HRD.h rename to codec/source_code/print_partition/Lib/CommonLib/HRD.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Hash.cpp b/codec/source_code/print_partition/Lib/CommonLib/Hash.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Hash.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Hash.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Hash.h b/codec/source_code/print_partition/Lib/CommonLib/Hash.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Hash.h rename to codec/source_code/print_partition/Lib/CommonLib/Hash.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/IbcHashMap.cpp b/codec/source_code/print_partition/Lib/CommonLib/IbcHashMap.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/IbcHashMap.cpp rename to codec/source_code/print_partition/Lib/CommonLib/IbcHashMap.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/IbcHashMap.h b/codec/source_code/print_partition/Lib/CommonLib/IbcHashMap.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/IbcHashMap.h rename to codec/source_code/print_partition/Lib/CommonLib/IbcHashMap.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/InterPrediction.cpp b/codec/source_code/print_partition/Lib/CommonLib/InterPrediction.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/InterPrediction.cpp rename to codec/source_code/print_partition/Lib/CommonLib/InterPrediction.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/InterPrediction.h b/codec/source_code/print_partition/Lib/CommonLib/InterPrediction.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/InterPrediction.h rename to codec/source_code/print_partition/Lib/CommonLib/InterPrediction.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/InterpolationFilter.cpp b/codec/source_code/print_partition/Lib/CommonLib/InterpolationFilter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/InterpolationFilter.cpp rename to codec/source_code/print_partition/Lib/CommonLib/InterpolationFilter.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/InterpolationFilter.h b/codec/source_code/print_partition/Lib/CommonLib/InterpolationFilter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/InterpolationFilter.h rename to codec/source_code/print_partition/Lib/CommonLib/InterpolationFilter.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/IntraPrediction.cpp b/codec/source_code/print_partition/Lib/CommonLib/IntraPrediction.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/IntraPrediction.cpp rename to codec/source_code/print_partition/Lib/CommonLib/IntraPrediction.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/IntraPrediction.h b/codec/source_code/print_partition/Lib/CommonLib/IntraPrediction.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/IntraPrediction.h rename to codec/source_code/print_partition/Lib/CommonLib/IntraPrediction.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/LoopFilter.cpp b/codec/source_code/print_partition/Lib/CommonLib/LoopFilter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/LoopFilter.cpp rename to codec/source_code/print_partition/Lib/CommonLib/LoopFilter.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/LoopFilter.h b/codec/source_code/print_partition/Lib/CommonLib/LoopFilter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/LoopFilter.h rename to codec/source_code/print_partition/Lib/CommonLib/LoopFilter.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/MCTS.cpp b/codec/source_code/print_partition/Lib/CommonLib/MCTS.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/MCTS.cpp rename to codec/source_code/print_partition/Lib/CommonLib/MCTS.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/MCTS.h b/codec/source_code/print_partition/Lib/CommonLib/MCTS.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/MCTS.h rename to codec/source_code/print_partition/Lib/CommonLib/MCTS.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.cpp b/codec/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.cpp rename to codec/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.h b/codec/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.h rename to codec/source_code/print_partition/Lib/CommonLib/MatrixIntraPrediction.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/MipData.h b/codec/source_code/print_partition/Lib/CommonLib/MipData.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/MipData.h rename to codec/source_code/print_partition/Lib/CommonLib/MipData.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/MotionInfo.h b/codec/source_code/print_partition/Lib/CommonLib/MotionInfo.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/MotionInfo.h rename to codec/source_code/print_partition/Lib/CommonLib/MotionInfo.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Mv.cpp b/codec/source_code/print_partition/Lib/CommonLib/Mv.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Mv.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Mv.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Mv.h b/codec/source_code/print_partition/Lib/CommonLib/Mv.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Mv.h rename to codec/source_code/print_partition/Lib/CommonLib/Mv.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/NAL.h b/codec/source_code/print_partition/Lib/CommonLib/NAL.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/NAL.h rename to codec/source_code/print_partition/Lib/CommonLib/NAL.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ParameterSetManager.cpp b/codec/source_code/print_partition/Lib/CommonLib/ParameterSetManager.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ParameterSetManager.cpp rename to codec/source_code/print_partition/Lib/CommonLib/ParameterSetManager.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ParameterSetManager.h b/codec/source_code/print_partition/Lib/CommonLib/ParameterSetManager.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ParameterSetManager.h rename to codec/source_code/print_partition/Lib/CommonLib/ParameterSetManager.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/PicYuvMD5.cpp b/codec/source_code/print_partition/Lib/CommonLib/PicYuvMD5.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/PicYuvMD5.cpp rename to codec/source_code/print_partition/Lib/CommonLib/PicYuvMD5.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Picture.cpp b/codec/source_code/print_partition/Lib/CommonLib/Picture.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Picture.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Picture.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Picture.h b/codec/source_code/print_partition/Lib/CommonLib/Picture.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Picture.h rename to codec/source_code/print_partition/Lib/CommonLib/Picture.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.cpp b/codec/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.cpp rename to codec/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.h b/codec/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.h rename to codec/source_code/print_partition/Lib/CommonLib/ProfileLevelTier.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Quant.cpp b/codec/source_code/print_partition/Lib/CommonLib/Quant.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Quant.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Quant.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Quant.h b/codec/source_code/print_partition/Lib/CommonLib/Quant.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Quant.h rename to codec/source_code/print_partition/Lib/CommonLib/Quant.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/QuantRDOQ.cpp b/codec/source_code/print_partition/Lib/CommonLib/QuantRDOQ.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/QuantRDOQ.cpp rename to codec/source_code/print_partition/Lib/CommonLib/QuantRDOQ.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/QuantRDOQ.h b/codec/source_code/print_partition/Lib/CommonLib/QuantRDOQ.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/QuantRDOQ.h rename to codec/source_code/print_partition/Lib/CommonLib/QuantRDOQ.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/RdCost.cpp b/codec/source_code/print_partition/Lib/CommonLib/RdCost.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/RdCost.cpp rename to codec/source_code/print_partition/Lib/CommonLib/RdCost.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/RdCost.h b/codec/source_code/print_partition/Lib/CommonLib/RdCost.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/RdCost.h rename to codec/source_code/print_partition/Lib/CommonLib/RdCost.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.cpp b/codec/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.cpp rename to codec/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.h b/codec/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.h rename to codec/source_code/print_partition/Lib/CommonLib/RdCostWeightPrediction.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Reshape.cpp b/codec/source_code/print_partition/Lib/CommonLib/Reshape.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Reshape.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Reshape.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Reshape.h b/codec/source_code/print_partition/Lib/CommonLib/Reshape.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Reshape.h rename to codec/source_code/print_partition/Lib/CommonLib/Reshape.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Rom.cpp b/codec/source_code/print_partition/Lib/CommonLib/Rom.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Rom.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Rom.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Rom.h b/codec/source_code/print_partition/Lib/CommonLib/Rom.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Rom.h rename to codec/source_code/print_partition/Lib/CommonLib/Rom.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/RomLFNST.cpp b/codec/source_code/print_partition/Lib/CommonLib/RomLFNST.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/RomLFNST.cpp rename to codec/source_code/print_partition/Lib/CommonLib/RomLFNST.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/RomTr.cpp b/codec/source_code/print_partition/Lib/CommonLib/RomTr.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/RomTr.cpp rename to codec/source_code/print_partition/Lib/CommonLib/RomTr.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/SEI.cpp b/codec/source_code/print_partition/Lib/CommonLib/SEI.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/SEI.cpp rename to codec/source_code/print_partition/Lib/CommonLib/SEI.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/SEI.h b/codec/source_code/print_partition/Lib/CommonLib/SEI.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/SEI.h rename to codec/source_code/print_partition/Lib/CommonLib/SEI.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.cpp b/codec/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.cpp rename to codec/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.h b/codec/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.h rename to codec/source_code/print_partition/Lib/CommonLib/SampleAdaptiveOffset.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Slice.cpp b/codec/source_code/print_partition/Lib/CommonLib/Slice.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Slice.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Slice.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Slice.h b/codec/source_code/print_partition/Lib/CommonLib/Slice.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Slice.h rename to codec/source_code/print_partition/Lib/CommonLib/Slice.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/TrQuant.cpp b/codec/source_code/print_partition/Lib/CommonLib/TrQuant.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/TrQuant.cpp rename to codec/source_code/print_partition/Lib/CommonLib/TrQuant.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/TrQuant.h b/codec/source_code/print_partition/Lib/CommonLib/TrQuant.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/TrQuant.h rename to codec/source_code/print_partition/Lib/CommonLib/TrQuant.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.cpp b/codec/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.cpp rename to codec/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.h b/codec/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.h rename to codec/source_code/print_partition/Lib/CommonLib/TrQuant_EMT.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/TypeDef.h b/codec/source_code/print_partition/Lib/CommonLib/TypeDef.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/TypeDef.h rename to codec/source_code/print_partition/Lib/CommonLib/TypeDef.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Unit.cpp b/codec/source_code/print_partition/Lib/CommonLib/Unit.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Unit.cpp rename to codec/source_code/print_partition/Lib/CommonLib/Unit.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/Unit.h b/codec/source_code/print_partition/Lib/CommonLib/Unit.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/Unit.h rename to codec/source_code/print_partition/Lib/CommonLib/Unit.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/UnitPartitioner.cpp b/codec/source_code/print_partition/Lib/CommonLib/UnitPartitioner.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/UnitPartitioner.cpp rename to codec/source_code/print_partition/Lib/CommonLib/UnitPartitioner.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/UnitPartitioner.h b/codec/source_code/print_partition/Lib/CommonLib/UnitPartitioner.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/UnitPartitioner.h rename to codec/source_code/print_partition/Lib/CommonLib/UnitPartitioner.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/UnitTools.cpp b/codec/source_code/print_partition/Lib/CommonLib/UnitTools.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/UnitTools.cpp rename to codec/source_code/print_partition/Lib/CommonLib/UnitTools.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/UnitTools.h b/codec/source_code/print_partition/Lib/CommonLib/UnitTools.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/UnitTools.h rename to codec/source_code/print_partition/Lib/CommonLib/UnitTools.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/WeightPrediction.cpp b/codec/source_code/print_partition/Lib/CommonLib/WeightPrediction.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/WeightPrediction.cpp rename to codec/source_code/print_partition/Lib/CommonLib/WeightPrediction.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/WeightPrediction.h b/codec/source_code/print_partition/Lib/CommonLib/WeightPrediction.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/WeightPrediction.h rename to codec/source_code/print_partition/Lib/CommonLib/WeightPrediction.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace.cpp b/codec/source_code/print_partition/Lib/CommonLib/dtrace.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace.cpp rename to codec/source_code/print_partition/Lib/CommonLib/dtrace.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace.h b/codec/source_code/print_partition/Lib/CommonLib/dtrace.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace.h rename to codec/source_code/print_partition/Lib/CommonLib/dtrace.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.cpp b/codec/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.cpp rename to codec/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.h b/codec/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.h rename to codec/source_code/print_partition/Lib/CommonLib/dtrace_blockstatistics.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace_buffer.h b/codec/source_code/print_partition/Lib/CommonLib/dtrace_buffer.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace_buffer.h rename to codec/source_code/print_partition/Lib/CommonLib/dtrace_buffer.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace_codingstruct.h b/codec/source_code/print_partition/Lib/CommonLib/dtrace_codingstruct.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace_codingstruct.h rename to codec/source_code/print_partition/Lib/CommonLib/dtrace_codingstruct.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/dtrace_next.h b/codec/source_code/print_partition/Lib/CommonLib/dtrace_next.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/dtrace_next.h rename to codec/source_code/print_partition/Lib/CommonLib/dtrace_next.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/version.h b/codec/source_code/print_partition/Lib/CommonLib/version.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/version.h rename to codec/source_code/print_partition/Lib/CommonLib/version.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/AdaptiveLoopFilterX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/AffineGradientSearchX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/AffineGradientSearchX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/AffineGradientSearchX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/AffineGradientSearchX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/BufferX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/BufferX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/BufferX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/BufferX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/CommonDefX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/IbcHashMapX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/IbcHashMapX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/IbcHashMapX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/IbcHashMapX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/InitX86.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/InitX86.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/InitX86.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/InitX86.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/InterpolationFilterX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/InterpolationFilterX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/InterpolationFilterX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/InterpolationFilterX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/RdCostX86.h b/codec/source_code/print_partition/Lib/CommonLib/x86/RdCostX86.h similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/RdCostX86.h rename to codec/source_code/print_partition/Lib/CommonLib/x86/RdCostX86.h diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx/AdaptiveLoopFilter_avx.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx/AdaptiveLoopFilter_avx.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx/AdaptiveLoopFilter_avx.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx/AdaptiveLoopFilter_avx.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx/AffineGradientSearch_avx.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx/AffineGradientSearch_avx.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx/AffineGradientSearch_avx.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx/AffineGradientSearch_avx.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx/Buffer_avx.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx/Buffer_avx.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx/Buffer_avx.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx/Buffer_avx.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx/RdCost_avx.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx/RdCost_avx.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx/RdCost_avx.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx/RdCost_avx.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/AdaptiveLoopFilter_avx2.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx2/AdaptiveLoopFilter_avx2.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/AdaptiveLoopFilter_avx2.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx2/AdaptiveLoopFilter_avx2.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/AffineGradientSearch_avx2.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx2/AffineGradientSearch_avx2.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/AffineGradientSearch_avx2.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx2/AffineGradientSearch_avx2.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/Buffer_avx2.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx2/Buffer_avx2.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/Buffer_avx2.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx2/Buffer_avx2.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/InterpolationFilter_avx2.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx2/InterpolationFilter_avx2.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/InterpolationFilter_avx2.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx2/InterpolationFilter_avx2.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/RdCost_avx2.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/avx2/RdCost_avx2.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/avx2/RdCost_avx2.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/avx2/RdCost_avx2.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/AdaptiveLoopFilter_sse41.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/sse41/AdaptiveLoopFilter_sse41.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/AdaptiveLoopFilter_sse41.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/sse41/AdaptiveLoopFilter_sse41.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/AffineGradientSearch_sse41.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/sse41/AffineGradientSearch_sse41.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/AffineGradientSearch_sse41.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/sse41/AffineGradientSearch_sse41.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/Buffer_sse41.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/sse41/Buffer_sse41.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/Buffer_sse41.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/sse41/Buffer_sse41.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/InterpolationFilter_sse41.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/sse41/InterpolationFilter_sse41.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/InterpolationFilter_sse41.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/sse41/InterpolationFilter_sse41.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/RdCost_sse41.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/sse41/RdCost_sse41.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/sse41/RdCost_sse41.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/sse41/RdCost_sse41.cpp diff --git a/encoder/source_code/print_partition/Lib/CommonLib/x86/sse42/IbcHashmap_sse42.cpp b/codec/source_code/print_partition/Lib/CommonLib/x86/sse42/IbcHashmap_sse42.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/CommonLib/x86/sse42/IbcHashmap_sse42.cpp rename to codec/source_code/print_partition/Lib/CommonLib/x86/sse42/IbcHashmap_sse42.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderAnalyserLib/CMakeLists.txt b/codec/source_code/print_partition/Lib/DecoderAnalyserLib/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderAnalyserLib/CMakeLists.txt rename to codec/source_code/print_partition/Lib/DecoderAnalyserLib/CMakeLists.txt diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/AnnexBread.cpp b/codec/source_code/print_partition/Lib/DecoderLib/AnnexBread.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/AnnexBread.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/AnnexBread.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/AnnexBread.h b/codec/source_code/print_partition/Lib/DecoderLib/AnnexBread.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/AnnexBread.h rename to codec/source_code/print_partition/Lib/DecoderLib/AnnexBread.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/BinDecoder.cpp b/codec/source_code/print_partition/Lib/DecoderLib/BinDecoder.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/BinDecoder.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/BinDecoder.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/BinDecoder.h b/codec/source_code/print_partition/Lib/DecoderLib/BinDecoder.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/BinDecoder.h rename to codec/source_code/print_partition/Lib/DecoderLib/BinDecoder.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/CABACReader.cpp b/codec/source_code/print_partition/Lib/DecoderLib/CABACReader.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/CABACReader.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/CABACReader.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/CABACReader.h b/codec/source_code/print_partition/Lib/DecoderLib/CABACReader.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/CABACReader.h rename to codec/source_code/print_partition/Lib/DecoderLib/CABACReader.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/CMakeLists.txt b/codec/source_code/print_partition/Lib/DecoderLib/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/CMakeLists.txt rename to codec/source_code/print_partition/Lib/DecoderLib/CMakeLists.txt diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/DecCu.cpp b/codec/source_code/print_partition/Lib/DecoderLib/DecCu.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/DecCu.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/DecCu.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/DecCu.h b/codec/source_code/print_partition/Lib/DecoderLib/DecCu.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/DecCu.h rename to codec/source_code/print_partition/Lib/DecoderLib/DecCu.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/DecLib.cpp b/codec/source_code/print_partition/Lib/DecoderLib/DecLib.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/DecLib.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/DecLib.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/DecLib.h b/codec/source_code/print_partition/Lib/DecoderLib/DecLib.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/DecLib.h rename to codec/source_code/print_partition/Lib/DecoderLib/DecLib.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/DecSlice.cpp b/codec/source_code/print_partition/Lib/DecoderLib/DecSlice.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/DecSlice.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/DecSlice.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/DecSlice.h b/codec/source_code/print_partition/Lib/DecoderLib/DecSlice.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/DecSlice.h rename to codec/source_code/print_partition/Lib/DecoderLib/DecSlice.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/NALread.cpp b/codec/source_code/print_partition/Lib/DecoderLib/NALread.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/NALread.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/NALread.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/NALread.h b/codec/source_code/print_partition/Lib/DecoderLib/NALread.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/NALread.h rename to codec/source_code/print_partition/Lib/DecoderLib/NALread.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/SEIread.cpp b/codec/source_code/print_partition/Lib/DecoderLib/SEIread.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/SEIread.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/SEIread.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/SEIread.h b/codec/source_code/print_partition/Lib/DecoderLib/SEIread.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/SEIread.h rename to codec/source_code/print_partition/Lib/DecoderLib/SEIread.h diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/VLCReader.cpp b/codec/source_code/print_partition/Lib/DecoderLib/VLCReader.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/VLCReader.cpp rename to codec/source_code/print_partition/Lib/DecoderLib/VLCReader.cpp diff --git a/encoder/source_code/print_partition/Lib/DecoderLib/VLCReader.h b/codec/source_code/print_partition/Lib/DecoderLib/VLCReader.h similarity index 100% rename from encoder/source_code/print_partition/Lib/DecoderLib/VLCReader.h rename to codec/source_code/print_partition/Lib/DecoderLib/VLCReader.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/AQp.cpp b/codec/source_code/print_partition/Lib/EncoderLib/AQp.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/AQp.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/AQp.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/AQp.h b/codec/source_code/print_partition/Lib/EncoderLib/AQp.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/AQp.h rename to codec/source_code/print_partition/Lib/EncoderLib/AQp.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/Analyze.h b/codec/source_code/print_partition/Lib/EncoderLib/Analyze.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/Analyze.h rename to codec/source_code/print_partition/Lib/EncoderLib/Analyze.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/AnnexBwrite.h b/codec/source_code/print_partition/Lib/EncoderLib/AnnexBwrite.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/AnnexBwrite.h rename to codec/source_code/print_partition/Lib/EncoderLib/AnnexBwrite.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/BinEncoder.cpp b/codec/source_code/print_partition/Lib/EncoderLib/BinEncoder.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/BinEncoder.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/BinEncoder.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/BinEncoder.h b/codec/source_code/print_partition/Lib/EncoderLib/BinEncoder.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/BinEncoder.h rename to codec/source_code/print_partition/Lib/EncoderLib/BinEncoder.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/CABACWriter.cpp b/codec/source_code/print_partition/Lib/EncoderLib/CABACWriter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/CABACWriter.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/CABACWriter.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/CABACWriter.h b/codec/source_code/print_partition/Lib/EncoderLib/CABACWriter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/CABACWriter.h rename to codec/source_code/print_partition/Lib/EncoderLib/CABACWriter.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/CMakeLists.txt b/codec/source_code/print_partition/Lib/EncoderLib/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/CMakeLists.txt rename to codec/source_code/print_partition/Lib/EncoderLib/CMakeLists.txt diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.h b/codec/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncAdaptiveLoopFilter.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncCfg.h b/codec/source_code/print_partition/Lib/EncoderLib/EncCfg.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncCfg.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncCfg.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncCfgParam.h b/codec/source_code/print_partition/Lib/EncoderLib/EncCfgParam.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncCfgParam.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncCfgParam.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncCu.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncCu.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncCu.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncCu.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncCu.h b/codec/source_code/print_partition/Lib/EncoderLib/EncCu.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncCu.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncCu.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncGOP.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncGOP.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncGOP.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncGOP.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncGOP.h b/codec/source_code/print_partition/Lib/EncoderLib/EncGOP.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncGOP.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncGOP.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncHRD.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncHRD.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncHRD.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncHRD.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncHRD.h b/codec/source_code/print_partition/Lib/EncoderLib/EncHRD.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncHRD.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncHRD.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncLib.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncLib.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncLib.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncLib.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncLib.h b/codec/source_code/print_partition/Lib/EncoderLib/EncLib.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncLib.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncLib.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncLibCommon.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncLibCommon.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncLibCommon.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncLibCommon.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncLibCommon.h b/codec/source_code/print_partition/Lib/EncoderLib/EncLibCommon.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncLibCommon.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncLibCommon.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.h b/codec/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncModeCtrl.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncReshape.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncReshape.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncReshape.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncReshape.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncReshape.h b/codec/source_code/print_partition/Lib/EncoderLib/EncReshape.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncReshape.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncReshape.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.h b/codec/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncSampleAdaptiveOffset.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncSlice.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncSlice.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncSlice.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncSlice.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncSlice.h b/codec/source_code/print_partition/Lib/EncoderLib/EncSlice.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncSlice.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncSlice.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.cpp b/codec/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.h b/codec/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.h rename to codec/source_code/print_partition/Lib/EncoderLib/EncTemporalFilter.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/InterSearch.cpp b/codec/source_code/print_partition/Lib/EncoderLib/InterSearch.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/InterSearch.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/InterSearch.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/InterSearch.h b/codec/source_code/print_partition/Lib/EncoderLib/InterSearch.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/InterSearch.h rename to codec/source_code/print_partition/Lib/EncoderLib/InterSearch.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/IntraSearch.cpp b/codec/source_code/print_partition/Lib/EncoderLib/IntraSearch.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/IntraSearch.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/IntraSearch.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/IntraSearch.h b/codec/source_code/print_partition/Lib/EncoderLib/IntraSearch.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/IntraSearch.h rename to codec/source_code/print_partition/Lib/EncoderLib/IntraSearch.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/NALwrite.cpp b/codec/source_code/print_partition/Lib/EncoderLib/NALwrite.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/NALwrite.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/NALwrite.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/NALwrite.h b/codec/source_code/print_partition/Lib/EncoderLib/NALwrite.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/NALwrite.h rename to codec/source_code/print_partition/Lib/EncoderLib/NALwrite.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/RateCtrl.cpp b/codec/source_code/print_partition/Lib/EncoderLib/RateCtrl.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/RateCtrl.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/RateCtrl.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/RateCtrl.h b/codec/source_code/print_partition/Lib/EncoderLib/RateCtrl.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/RateCtrl.h rename to codec/source_code/print_partition/Lib/EncoderLib/RateCtrl.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/SEIEncoder.cpp b/codec/source_code/print_partition/Lib/EncoderLib/SEIEncoder.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/SEIEncoder.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/SEIEncoder.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/SEIEncoder.h b/codec/source_code/print_partition/Lib/EncoderLib/SEIEncoder.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/SEIEncoder.h rename to codec/source_code/print_partition/Lib/EncoderLib/SEIEncoder.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/SEIwrite.cpp b/codec/source_code/print_partition/Lib/EncoderLib/SEIwrite.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/SEIwrite.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/SEIwrite.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/SEIwrite.h b/codec/source_code/print_partition/Lib/EncoderLib/SEIwrite.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/SEIwrite.h rename to codec/source_code/print_partition/Lib/EncoderLib/SEIwrite.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/VLCWriter.cpp b/codec/source_code/print_partition/Lib/EncoderLib/VLCWriter.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/VLCWriter.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/VLCWriter.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/VLCWriter.h b/codec/source_code/print_partition/Lib/EncoderLib/VLCWriter.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/VLCWriter.h rename to codec/source_code/print_partition/Lib/EncoderLib/VLCWriter.h diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.cpp b/codec/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.cpp rename to codec/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.cpp diff --git a/encoder/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.h b/codec/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.h similarity index 100% rename from encoder/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.h rename to codec/source_code/print_partition/Lib/EncoderLib/WeightPredAnalysis.h diff --git a/encoder/source_code/print_partition/Lib/Utilities/CMakeLists.txt b/codec/source_code/print_partition/Lib/Utilities/CMakeLists.txt similarity index 100% rename from encoder/source_code/print_partition/Lib/Utilities/CMakeLists.txt rename to codec/source_code/print_partition/Lib/Utilities/CMakeLists.txt diff --git a/encoder/source_code/print_partition/Lib/Utilities/VideoIOYuv.cpp b/codec/source_code/print_partition/Lib/Utilities/VideoIOYuv.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/Utilities/VideoIOYuv.cpp rename to codec/source_code/print_partition/Lib/Utilities/VideoIOYuv.cpp diff --git a/encoder/source_code/print_partition/Lib/Utilities/VideoIOYuv.h b/codec/source_code/print_partition/Lib/Utilities/VideoIOYuv.h similarity index 100% rename from encoder/source_code/print_partition/Lib/Utilities/VideoIOYuv.h rename to codec/source_code/print_partition/Lib/Utilities/VideoIOYuv.h diff --git a/encoder/source_code/print_partition/Lib/Utilities/program_options_lite.cpp b/codec/source_code/print_partition/Lib/Utilities/program_options_lite.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/Utilities/program_options_lite.cpp rename to codec/source_code/print_partition/Lib/Utilities/program_options_lite.cpp diff --git a/encoder/source_code/print_partition/Lib/Utilities/program_options_lite.h b/codec/source_code/print_partition/Lib/Utilities/program_options_lite.h similarity index 100% rename from encoder/source_code/print_partition/Lib/Utilities/program_options_lite.h rename to codec/source_code/print_partition/Lib/Utilities/program_options_lite.h diff --git a/encoder/source_code/print_partition/Lib/libmd5/MD5.h b/codec/source_code/print_partition/Lib/libmd5/MD5.h similarity index 100% rename from encoder/source_code/print_partition/Lib/libmd5/MD5.h rename to codec/source_code/print_partition/Lib/libmd5/MD5.h diff --git a/encoder/source_code/print_partition/Lib/libmd5/libmd5.cpp b/codec/source_code/print_partition/Lib/libmd5/libmd5.cpp similarity index 100% rename from encoder/source_code/print_partition/Lib/libmd5/libmd5.cpp rename to codec/source_code/print_partition/Lib/libmd5/libmd5.cpp diff --git a/encoder/source_code/print_partition/Lib/libmd5/libmd5.h b/codec/source_code/print_partition/Lib/libmd5/libmd5.h similarity index 100% rename from encoder/source_code/print_partition/Lib/libmd5/libmd5.h rename to codec/source_code/print_partition/Lib/libmd5/libmd5.h diff --git a/encoder/source_code/print_partition/VisualStudio/common.natvis b/codec/source_code/print_partition/VisualStudio/common.natvis similarity index 100% rename from encoder/source_code/print_partition/VisualStudio/common.natvis rename to codec/source_code/print_partition/VisualStudio/common.natvis diff --git a/encoder/source_code/print_partition/VisualStudio/static_vector.natvis b/codec/source_code/print_partition/VisualStudio/static_vector.natvis similarity index 100% rename from encoder/source_code/print_partition/VisualStudio/static_vector.natvis rename to codec/source_code/print_partition/VisualStudio/static_vector.natvis diff --git a/dataset_preparation.py b/dataset_preparation.py new file mode 100644 index 0000000..e269734 --- /dev/null +++ b/dataset_preparation.py @@ -0,0 +1,118 @@ +import os +import argparse +import time +from concurrent.futures import ThreadPoolExecutor + +def str2bool(v): + if isinstance(v, bool): + return v + if v.lower() in ('yes', 'true', 't', 'y', '1'): + return True + elif v.lower() in ('no', 'false', 'f', 'n', '0'): + return False + else: + raise argparse.ArgumentTypeError('Boolean value expected.') + +def write_seq_name_from_dir(Train_sequence_dir): + seq_list = os.listdir(Train_sequence_dir) + with open('sequences_name.txt','w') as f: + for seq_name in seq_list: + f.write(seq_name.strip('.yuv') + '\n') + +def load_ifo_from_cfg(cfg_path): + fp = open(cfg_path) + input_path = None + bit_depth = None + width = None + height = None + frame_num = None + for line in fp: + if "InputFile" in line: + line = line.rstrip('\n').replace(' ', '').split('#')[0] + loc = line.find(':') + input_path = line[loc+1:] + elif "InputBitDepth" in line: + bit_depth = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + elif "SourceWidth" in line: + width = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + elif "SourceHeight" in line: + height = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + elif "FramesToBeEncoded" in line: + frame_num = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + if (input_path is None) or (bit_depth is None) or (width is None) or (height is None): + print("Format of CFG error !!!!!!!!") + return + return input_path, bit_depth, width, height,frame_num + + + +def make_dataset(qp, seq_name, seq_dir, exe_name, bit_depth, enc_mode): + """only for depth label + enc_mode: LDP LDB RA""" + cur_path = os.getcwd() + exe_dir = os.path.join(cur_path, "codec") + log_path = os.path.join(cur_path, "log", "QP" + str(qp)) + out_path = os.path.join(cur_path, 'output', enc_mode, 'QP' + str(qp), "train_dataset") + depth_path = os.path.join(cur_path, "DepthSaving") + seq_path = os.path.join(seq_dir, seq_name + '.yuv') + frame_num = args.test_frm_num + per_cfg_path = os.path.join(args.cfg_dir, seq_name + '.cfg') + is10bit = False + if bit_depth == 10: + is10bit = True + bin_name = seq_name + ".bin" + enc_log_name = 'enc_' + seq_name + '.log' + enc_cfg_name = 'encoder_randomaccess_vtm.cfg' + if os.path.exists(os.path.join(depth_path, seq_name + '_Depth.txt')): + os.remove(os.path.join(depth_path, seq_name + '_Depth.txt')) + if os.path.exists(os.path.join(log_path, enc_log_name)): + os.remove(os.path.join(log_path, enc_log_name)) + if not os.path.exists(out_path): + os.makedirs(out_path) + if args.train: + encoder_order = os.path.join(exe_dir, exe_name) + ' -c ' + os.path.join(args.cfg_dir, enc_cfg_name)\ + + ' -c ' + per_cfg_path + " -f "+ str(frame_num) + ' -i ' + seq_path + " -q " +str(qp) \ + + ' -b ' + os.path.join(out_path, seq_name + '.bin') \ + + " >> " + os.path.join(log_path, enc_log_name) + else: + encoder_order = os.path.join(exe_dir, exe_name) + ' -c ' + os.path.join(args.cfg_dir, enc_cfg_name)\ + + ' -c ' + per_cfg_path + " -f "+ str(frame_num) + ' -i ' + seq_path + " -q " +str(qp) \ + + ' -b ' + os.path.join(out_path, seq_name + '.bin') \ + + " >> " + os.path.join(log_path, enc_log_name) + print(encoder_order) + os.system(encoder_order) + + +if __name__ == '__main__': + # Encode each sequence and generate partition depth files, e.g., DepthSaving/BasketballDrillText_832x480_50_Depth.txt + parser = argparse.ArgumentParser() + parser.add_argument('--qp', type=int, default=None, help='option: 22 27 32 37') + parser.add_argument('--sequences_dir', type=str, help='Path to the training sequences') + parser.add_argument('--cfg_dir', type=str, help='Path to the configuration file of the training sequences') + parser.add_argument('--test_frm_num', type=int, default=32) + parser.add_argument('--bit_depth', type=int, default=8) + + args = parser.parse_args() + qp_list = [32,27,22,37] if args.qp is None else [args.qp] + exe_name = 'print_encoder.exe' + + write_seq_name_from_dir(args.sequences_dir) + seq_list = list() + with open("sequences_name.txt") as f: + for line in f.readlines(): + seq_list.append(line.strip('\n')) + + po = ThreadPoolExecutor(max_workers=35) + future_list = [] + for qp in qp_list: + for seq_name in seq_list: + # make_dataset(qp, seq_name, args.sequences_dir, exe_name, args.bit_depth, args.enc_mode) + future_list.append(po.submit(make_dataset, seq_name, args.sequences_dir, exe_name, args.bit_depth, args.enc_mode)) + while True: + is_done = True + for future in future_list: + is_done &= future.done() + if is_done: + break + time.sleep(5) + po.shutdown() \ No newline at end of file diff --git a/depth2dataset.py b/depth2dataset.py new file mode 100644 index 0000000..ff46c88 --- /dev/null +++ b/depth2dataset.py @@ -0,0 +1,317 @@ +import argparse +import os +import numpy as np +from tqdm import tqdm +import math + +def YUV2RGB(Y,U,V, isYUV420 = True): + """Y: (frame_num, height, width), U/V: (frame_num, height//2, width//2)""" + FRAME_NUM, IMG_HEIGHT, IMG_WIDTH = Y.shape[-3], Y.shape[-2], Y.shape[-1] + bgr_data = np.zeros((FRAME_NUM, 3, IMG_HEIGHT, IMG_WIDTH), dtype=np.uint8) + if (isYUV420): + V = np.repeat(V, 2, 1) + V = np.repeat(V, 2, 2) + U = np.repeat(U, 2, 1) + U = np.repeat(U, 2, 2) + + c = (Y-np.array([16])) * 298 + d = U - np.array([128]) + e = V - np.array([128]) + + r = (c + 409 * e + 128) // 256 + g = (c - 100 * d - 208 * e + 128) // 256 + b = (c + 516 * d + 128) // 256 + + r = np.where(r < 0, 0, r) + r = np.where(r > 255,255,r) + + g = np.where(g < 0, 0, g) + g = np.where(g > 255,255,g) + + b = np.where(b < 0, 0, b) + b = np.where(b > 255,255,b) + + bgr_data[:, 2, :, :] = r + bgr_data[:, 1, :, :] = g + bgr_data[:, 0, :, :] = b + # return (n,3,h,w) + return bgr_data + + +def get_frame_res(seq_content): + """input (N,3,H,W) , return (N-1,3,H,W)""" + FRAME_NUM = seq_content.shape[0] + frame_res = np.zeros((FRAME_NUM-1, 3, seq_content.shape[-2], seq_content.shape[-1])) + for frame_idx in range(FRAME_NUM - 1): + frame_res[frame_idx] = seq_content[frame_idx + 1] - seq_content[frame_idx] + return frame_res + +def load_ifo_from_cfg(cfg_path): + fp = open(cfg_path) + input_path = None + bit_depth = None + width = None + height = None + frame_num = None + for line in fp: + if "InputFile" in line: + line = line.rstrip('\n').replace(' ', '').split('#')[0] + loc = line.find(':') + input_path = line[loc+1:] + elif "InputBitDepth" in line: + bit_depth = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + elif "SourceWidth" in line: + width = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + elif "SourceHeight" in line: + height = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + elif "FramesToBeEncoded" in line: + frame_num = int(line.rstrip('\n').replace(' ', '').split('#')[0].split(':')[-1]) + if (input_path is None) or (bit_depth is None) or (width is None) or (height is None): + print("Format of CFG error !!!!!!!!") + return + return input_path, bit_depth, width, height,frame_num + + +def import_yuv420(file_path, width, height, frm_num, sub_sample_ratio=1, is10bit=False, without_precision_loss=False): + fp = open(file_path, 'rb') + pix_num = width * height + sub_frm_num = (frm_num + sub_sample_ratio - 1) // sub_sample_ratio # actual frame number after downsampling + if is10bit: + data_type = np.uint16 + else: + data_type = np.uint8 + y_temp = np.zeros(pix_num*sub_frm_num, dtype=data_type) + u_temp = np.zeros(pix_num*sub_frm_num // 4, dtype=data_type) + v_temp = np.zeros(pix_num*sub_frm_num // 4, dtype=data_type) + for i in range(0, frm_num, sub_sample_ratio): + if is10bit: + fp.seek(i * pix_num * 3, 0) + else: + fp.seek(i * pix_num * 3 // 2, 0) + subi = i // sub_sample_ratio + y_temp[subi*pix_num : (subi+1)*pix_num] = np.fromfile(fp, dtype=data_type, count=pix_num, sep='') + u_temp[subi*pix_num//4 : (subi+1)*pix_num//4] = np.fromfile(fp, dtype=data_type, count=pix_num//4, sep='') + v_temp[subi*pix_num//4 : (subi+1)*pix_num//4] = np.fromfile(fp, dtype=data_type, count=pix_num//4, sep='') + fp.close() + y = y_temp.reshape((sub_frm_num, height, width)) + u = u_temp.reshape((sub_frm_num, height//2, width//2)) + v = v_temp.reshape((sub_frm_num, height//2, width//2)) + # if is10bit and ~without_precision_loss: + # y = np.clip((y + 2) / 4, 0, 255).astype(np.uint8) + # u = np.clip((u + 2) / 4, 0, 255).astype(np.uint8) + # v = np.clip((v + 2) / 4, 0, 255).astype(np.uint8) + return y, u, v # return frm_num * H * W + +def es_rdo(mark_map, depth = 0, mt_depth = 0, pos_x = 0, pos_y = 0): + """mark_map: (64,64) ~ (4,4)""" + if mark_map[0,0,depth] == 2000 or depth == 7 or mt_depth >=3 : + return + global single_direction_map, single_depth_map + height, width = mark_map.shape[0], mark_map.shape[1] + partitio_type = mark_map[0,0,depth] + depth += 1 + if partitio_type == 1: + # QT + es_rdo(mark_map[:height//2, :width//2], depth, mt_depth=0, pos_x=pos_x, pos_y=pos_y) # 1 + es_rdo(mark_map[:height//2, width//2:], depth, mt_depth=0, pos_x=pos_x, pos_y=pos_y + width//2) # 2 + es_rdo(mark_map[height//2:, :width//2], depth, mt_depth=0, pos_x=pos_x + height//2, pos_y=pos_y) # 3 + es_rdo(mark_map[height//2:, width//2:], depth, mt_depth=0, pos_x=pos_x + height//2, pos_y=pos_y + width//2) # 4 + elif partitio_type == 2: + # BTH + single_direction_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = 1 + single_depth_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = 1 + mt_depth += 1 + es_rdo(mark_map[:height//2, :], depth, mt_depth, pos_x=pos_x, pos_y=pos_y) + es_rdo(mark_map[height//2:, :], depth, mt_depth, pos_x=pos_x + height//2, pos_y=pos_y) + elif partitio_type == 3: + # BTV + single_direction_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = -1 + single_depth_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = 1 + mt_depth += 1 + es_rdo(mark_map[:, :width//2], depth, mt_depth, pos_x=pos_x, pos_y=pos_y) + es_rdo(mark_map[:, width//2:], depth, mt_depth, pos_x=pos_x, pos_y=pos_y + width//2) + elif partitio_type == 4: + # TTH + single_direction_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = 1 + single_depth_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = 2 + single_depth_map[mt_depth, pos_x+height//4:pos_x+height//4*3, pos_y:pos_y+width] = 1 + mt_depth += 1 + es_rdo(mark_map[:height//4, :], depth, mt_depth, pos_x=pos_x, pos_y=pos_y) + es_rdo(mark_map[height//4:height//4*3, :], depth, mt_depth, pos_x=pos_x + height//4, pos_y=pos_y) + es_rdo(mark_map[height//4*3:, :], depth, mt_depth, pos_x=pos_x + height//4*3, pos_y=pos_y) + elif partitio_type == 5: + # TTV + single_direction_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = -1 + single_depth_map[mt_depth, pos_x:pos_x+height, pos_y:pos_y+width] = 2 + single_depth_map[mt_depth, pos_x:pos_x+height, pos_y+width//4:pos_y+width//4*3] = 1 + mt_depth += 1 + es_rdo(mark_map[:, :width//4], depth, mt_depth, pos_x=pos_x, pos_y=pos_y) + es_rdo(mark_map[:, width//4:width//4*3], depth, mt_depth, pos_x=pos_x, pos_y=pos_y + width//4) + es_rdo(mark_map[:, width//4*3:], depth,mt_depth, pos_x=pos_x, pos_y=pos_y + width//4*3) + + + +def get_depth_label(depth_file_path, frame_width, frame_height, frame_num, block_size=128, inter_mode=True): + """return Depth Map(include QT,BT,MT), partition map label""" + global single_direction_map, single_depth_map + block_ratio = block_size // 64 + frame_height_cropped, frame_width_cropped = frame_height // block_size * block_size, frame_width // block_size * block_size + MAX_MT_DEPTH = 4 + + qt_depth_map = np.zeros((frame_num, 1, frame_width_cropped, frame_height_cropped), dtype=int) + mtt_depth_map = np.zeros((frame_num, MAX_MT_DEPTH, frame_width_cropped, frame_height_cropped), dtype=int) + mtt_direction_map = np.zeros((frame_num, MAX_MT_DEPTH, frame_width_cropped, frame_height_cropped), dtype=int) + + size_map = np.ones((frame_num, 2, frame_width_cropped, frame_height_cropped), dtype=int) * 128 + f_id_list = [] + for f_id in range(frame_num): + if inter_mode and f_id % 32 == 0: + continue + print('f_id: ', f_id) + f_flag = False + ctu_x, ctu_y = 0, 0 + with open(depth_file_path,'r') as f: + for line in f.readlines(): + if f_flag and 'POC' not in line: + block_params_list = line.strip("\n").split(",") + block_params_list = [int(ele) for ele in block_params_list] + pos_x, pos_y, block_height, block_width, partition_mode = block_params_list[1], block_params_list[2], block_params_list[3], block_params_list[4], block_params_list[-1] + + if (pos_x >= frame_width_cropped or pos_y >= frame_height_cropped): + # skip partial CTU + continue + elif pos_x < ctu_x + 128 and pos_y < ctu_y + 128: + if partition_mode == 1: + # quad split + qt_depth_map[f_id, 0, pos_x:pos_x + block_width, pos_y:pos_y + block_height] += 1 + else: + mt_depth = 0 + for i in range(MAX_MT_DEPTH): + if mtt_depth_map[f_id, i, pos_x, pos_y] == 0: + mt_depth = i + break + if mtt_depth_map[f_id, i, pos_x, pos_y] != 0: + raise Exception("wrong.") + if partition_mode == 2: + # btv + mtt_depth_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = 1 + mtt_direction_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = -1 + elif partition_mode == 3: + # bth + mtt_depth_map[f_id, mt_depth, pos_x:pos_x + block_width // 4, pos_y:pos_y + block_height] = 1 + mtt_depth_map[f_id, mt_depth, pos_x + block_width // 4:pos_x + block_width // 4 * 3, pos_y:pos_y + block_height] = 2 + mtt_depth_map[f_id, mt_depth, pos_x + block_width // 4 * 3 :pos_x + block_width, pos_y:pos_y + block_height] = 1 + mtt_direction_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = 1 + elif partition_mode == 4: + # tth + mtt_depth_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height // 4] = 1 + mtt_depth_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y + block_height // 4: pos_y + block_height // 4 * 3] = 2 + mtt_depth_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y + block_height // 4 * 3 :pos_y + block_height] = 1 + mtt_direction_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = -1 + elif partition_mode == 5: + # ttv + mtt_depth_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = 2 + mtt_direction_map[f_id, mt_depth, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = 1 + # size + size_map[f_id, 0, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = block_width + size_map[f_id, 1, pos_x:pos_x + block_width, pos_y:pos_y + block_height] = block_height + else: + # new CTU, refresh params. + ctu_x, ctu_y = pos_x, pos_y + if 'POC' in line: + if line.strip('\n') == 'POC: %d'%f_id: + f_flag = True + f_id_list.append(f_id) + else: + f_flag = False + qt_depth_map = np.transpose(qt_depth_map, axes=(0, 1, 3, 2)) + mtt_depth_map = np.transpose(mtt_depth_map, axes=(0, 1, 3, 2)) + mtt_direction_map = np.transpose(mtt_direction_map, axes=(0, 1, 3, 2)) + + size_percent = np.zeros((6, 6)) + for f_id in tqdm(f_id_list): + if inter_mode and f_id % 32 == 0: + continue + for i in range(size_map.shape[-1]): + for j in range(size_map.shape[-2]): + block_width, block_height = size_map[f_id, 0, j, i], size_map[f_id, 1, j, i] + size_percent[int(math.log2(block_width)) - 2, int(math.log2(block_height)) - 2] += 1 + size_percent = size_percent / np.sum(size_percent) + return qt_depth_map, mtt_depth_map[:,:5], mtt_direction_map[:,:5], size_percent + + +def str2bool(v): + if isinstance(v, bool): + return v + if v.lower() in ('yes', 'true', 't', 'y', '1'): + return True + elif v.lower() in ('no', 'false', 'f', 'n', '0'): + return False + else: + raise argparse.ArgumentTypeError('Boolean value expected.') + + +def get_seq_info(seq_name): + seq_dir = os.path.join('Z:\\', 'data', 'origCfp', 'BVI_DVC', 'Video_10bit') if seq_name[0] == 'A' else os.path.join( + 'Z:\\', 'data', 'origCfp', 'BVI_DVC', 'Video_8bit') + seq_path = os.path.join(seq_dir, seq_name + '.yuv') + if args.train: + frame_width, frame_height = int(seq_name.split('_')[1].split('x')[0]), int(seq_name.split('_')[1].split('x')[1]) + bit_depth = 10 if seq_name[0] == 'A' else 8 + frame_num = 64 + frame_rate = int(seq_name.split('_')[2].split('fps')[0]) + is10bit = False + if bit_depth == 10: + is10bit = True + return frame_height, frame_width, frame_num, frame_rate, is10bit, seq_path + + +def make_depth_dataset_func(depth_file_path, frame_width, frame_height, base_name): + qt_depth_map, mtt_depth_map, mtt_direction_map = get_depth_label(depth_file_path, frame_width, frame_height, frame_num=1, block_size=128) + qt_label = qt_depth_map[:,0,::16,::16].astype(np.int8) + mtt_label = np.stack([mtt_depth_map, mtt_direction_map], axis=2)[:,:,:,::4,::4].astype(np.int8) + with open(os.path.join(args.train_dataset_dir, 'qt_label', base_name + '.npy'), 'wb') as f: + np.save(f, qt_label) + with open(os.path.join(args.train_dataset_dir, 'mtt_label', base_name + '.npy'), 'wb') as f: + np.save(f, mtt_label) + +def write_seq_name_from_dir(Train_sequence_dir): + seq_list = os.listdir(Train_sequence_dir) + with open('sequences_name.txt','w') as f: + for seq_name in seq_list: + f.write(seq_name.strip('.yuv') + '\n') + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('--qp', type=int, default=None, help='option: 22 27 32 37') + parser.add_argument('--sequences_dir', type=str, help='Path to the training sequences') + parser.add_argument('--cfg_dir', type=str, help='Path to the configuration file of the training sequences') + parser.add_argument('--depth_file_path', type=str, help='Path to the extracted depth file') + parser.add_argument('--thread_num', type=int, default=0, help='frame2block multi-threading' ) + args = parser.parse_args() + + write_seq_name_from_dir(args.sequences_dir) + seq_list = list() + with open("sequences_name.txt") as f: + for line in f.readlines(): + seq_list.append(line.strip('\n')) + + qp_list = [22,27,32,37] if args.qp is None else [args.qp] + size_percent_list = [] + + for qp in qp_list: + for seq_id, seq_name in tqdm(enumerate(seq_list)): + cfg_path = os.path.join(args.cfg_dir, seq_name + '.cfg') + print("SEQ:", seq_name) + seq_path, bit_depth, frame_width, frame_height, frame_num = load_ifo_from_cfg(cfg_path) + frame_num = 32 + if not os.path.exists(os.path.join(args.train_dataset_dir, 'Q' + str(qp), 'qt_label')): + os.makedirs(os.path.join(args.train_dataset_dir, 'Q' + str(qp), 'qt_label')) + if not os.path.exists(os.path.join(args.train_dataset_dir, 'Q' + str(qp), 'mtt_label')): + os.makedirs(os.path.join(args.train_dataset_dir, 'Q' + str(qp), 'mtt_label')) + depth_file_path = os.path.join(args.depth_file_path, seq_name + '_Depth.txt') + qt_depth_map, mtt_depth_map, mtt_direction_map, size_percent = get_depth_label(depth_file_path, frame_width, frame_height, frame_num=frame_num, block_size=128) + size_percent_list.append(size_percent) + qt_label = qt_depth_map[:,0,::16,::16].astype(np.int8) + mtt_label = np.stack([mtt_depth_map, mtt_direction_map], axis=2)[:,:,:,::4,::4].astype(np.int8) + del qt_depth_map, mtt_depth_map, mtt_direction_map