[Convert] Support RSTRIDE = RU4 Cases (RGB && width%4>0)
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 24 May 2018 02:19:56 +0000 (11:19 +0900)
committer함명주/동작제어Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Fri, 1 Jun 2018 05:25:41 +0000 (14:25 +0900)
commitb3955e02032f65ea1a5e7d3e416e2d0c70dc9f2f
tree3e68f0726df5ed1aea4e0b4267d1627a88312e08
parent9f0e6878edae308a1d5abbbe72fec3a16c04d9f2
[Convert] Support RSTRIDE = RU4 Cases (RGB && width%4>0)

Most (if not all) video/x-raw formats align data with 4-bytes for each
image row.

E.g., if image width = 642 and colorspace = RGB, video/x-raw adds
two zero-bytes for each row's end.

The tensor array should not have such zero-padding; thus
this commit supports zero-padding removal.

However, such operation costs one additional full memcpy; thus,
having such stream input must be discouraged.

This commit includes:
1. Support zero-padding removal
2. Added warnings when zero-paddings exists in the source streams.

Fixes #7

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tensor_converter/tensor_converter.c
tensor_converter/tensor_converter.h