Skip to content

Commit d23a3c3

Browse files
backend: Don't assert on odd-width output for interleaved 422 (UYVY)
This is largely a hack to support scaling by a factor of exactly 2; but nothing bad seems to happen when it is allowed (given we have a 2-pix-per-cycle ISP it's no more objectionable than odd-width 444). Signed-off-by: Nick Hollinghurst <[email protected]>
1 parent 49f8f4a commit d23a3c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libpisp/backend/backend_prepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void finalise_output(pisp_be_output_format_config &config)
294294
throw std::runtime_error("finalise_output: 420 image height should be even");
295295

296296
if ((PISP_IMAGE_FORMAT_SAMPLING_420(config.image.format) || PISP_IMAGE_FORMAT_SAMPLING_422(config.image.format)) &&
297-
(config.image.width & 1))
297+
!PISP_IMAGE_FORMAT_INTERLEAVED(config.image.format) && (config.image.width & 1))
298298
throw std::runtime_error("finalise_output: 420/422 image width should be even");
299299

300300
if (PISP_IMAGE_FORMAT_WALLPAPER(config.image.format))

0 commit comments

Comments
 (0)