Skip to content

Commit 04fc266

Browse files
ArcaneNibblemarcan
authored andcommitted
jpeg: Unbreak encode for RGB formats
Signed-off-by: R <[email protected]>
1 parent d28ab8c commit 04fc266

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

proxyclient/experiments/jpeg.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,11 +1022,6 @@ def set_default_regs(param1=0):
10221022
jpeg.PX_PLANE0_TILING_V = 16
10231023
jpeg.PX_PLANE1_TILING_H = 2
10241024
jpeg.PX_PLANE1_TILING_V = 8
1025-
elif args.encode_subsampling == '411':
1026-
jpeg.PX_PLANE0_TILING_H = 4
1027-
jpeg.PX_PLANE0_TILING_V = 8
1028-
jpeg.PX_PLANE1_TILING_H = 4
1029-
jpeg.PX_PLANE1_TILING_V = 4
10301025
else:
10311026
assert False
10321027
else:
@@ -1087,11 +1082,16 @@ def set_default_regs(param1=0):
10871082
jpeg.ENCODE_COMPONENT1_POS = 1
10881083
jpeg.ENCODE_COMPONENT2_POS = 3
10891084
jpeg.ENCODE_COMPONENT3_POS = 2
1090-
else:
1085+
elif pixfmt in ['YUV422-planar', 'YUV420-planar', 'YUV444-planar']:
10911086
jpeg.ENCODE_COMPONENT0_POS = 0
10921087
jpeg.ENCODE_COMPONENT1_POS = 0
10931088
jpeg.ENCODE_COMPONENT2_POS = 1
10941089
jpeg.ENCODE_COMPONENT3_POS = 3
1090+
else:
1091+
jpeg.ENCODE_COMPONENT0_POS = 0
1092+
jpeg.ENCODE_COMPONENT1_POS = 1
1093+
jpeg.ENCODE_COMPONENT2_POS = 2
1094+
jpeg.ENCODE_COMPONENT3_POS = 3
10951095

10961096
jpeg.INPUT_START1 = input_buf_iova
10971097
jpeg.INPUT_START2 = input_buf_iova + surface_P1_off

0 commit comments

Comments
 (0)