diff --git a/python/test/asset_test.py b/python/test/asset_test.py index 8d2a31e76..f29992511 100644 --- a/python/test/asset_test.py +++ b/python/test/asset_test.py @@ -440,6 +440,15 @@ def test_str(self): "test_0_1_refvideo_720x480_vs_disvideo_720x480_ebd_8_yuv420p10le_q_720x480" ) + asset = Asset(dataset="test", content_id=0, asset_id=1, + ref_path="dir/refvideo.yuv", dis_path="dir/disvideo.yuv", + asset_dict={'width': 720, 'height': 480, + 'workfile_yuv_type': 'yuv420p10le'}) + self.assertEqual( + str(asset), + "test_0_1_refvideo_720x480_vs_disvideo_720x480_q_720x480_wf_yuv420p10le" + ) + def test_hash_equal(self): asset1 = Asset(dataset="test", content_id=0, asset_id=2, ref_path="dir/refvideo.yuv", dis_path="dir/disvideo.yuv", diff --git a/python/vmaf/core/asset.py b/python/vmaf/core/asset.py index d7e40a3d0..2469bf1c7 100644 --- a/python/vmaf/core/asset.py +++ b/python/vmaf/core/asset.py @@ -528,6 +528,11 @@ def quality_str(self): s += "_" s += "{w}x{h}".format(w=w, h=h) + if self.workfile_yuv_type != self.DEFAULT_YUV_TYPE: + if s != "": + s += "_" + s += "wf_" + self.workfile_yuv_type + return s def to_string(self):