summaryrefslogtreecommitdiff
path: root/libhwjpeg/ExynosJpegEncoderForCamera.cpp
AgeCommit message (Collapse)Author
2023-02-28libhwjpeg: fix formattingMichelle Yang
Ran formatter over files. Whitespace changes only. Bug: 265156558 Test: m libhwjpeg Change-Id: Ie12eea3fbba1a5dce31f0d823aa0968faf08a274
2023-01-25libhwjpeg: add support for setting custom horizontal padding per planeMichelle Yang
Input buffers may already have horizontal padding applied (see ImageFormat.YV12 for example). pa/2371678 and pa/2375202 adds functionality to set horizontal padding in pixels through VIDIOC_S_EXT_CTRLS. This CL updates V4L2 library. Bug: 265156559 Test: checked output image when applying ag/20576841 Change-Id: I432dcdfd4103222c7df10c7a974ab2ebd0afbbfd
2020-05-14libhwjpeg: move thunbmail scaler messageCho KyongHo
Showing "Thumbnail scaler is not available. No thumbnail is embedded" every encoding causes misreading. So move the message to the constructor. Bug: 156553294 Signed-off-by: Cho KyongHo <pullip.cho@samsung.com> Change-Id: I15f4cfdbcf329269946a154a6936a3f7f04c9b13
2020-03-05libhwjpeg: know earlier about thumbnail scalerCho KyongHo
If thumbnail scaler is not available due to some problem with configuration or file system, libhwjpeg handles the problem after starting compression but we know that before compression. If it is found before processing EXIF, we can gracefully handle the exception. Signed-off-by: Cho KyongHo <pullip.cho@samsung.com> Change-Id: I7844216c672f7b3aafc790758088487a0a20a5b0
2020-02-20libhwjpeg: introduce polymorphic thumbnail scalerCho KyongHo
LibScalerForJpeg is the only thumbnail scaler implemented with the legacy V4L2 MSCL driver. But we may need to use another types of thumbnail scaler that runs with different H/W or different API. Therefore abstract calss, ThumbnailScaler is introduced and the concrete object of the thumbnail scaler is created with ThumbnailScaler::createInstance(). All the implementation details and differences between products are handled in createInstance(). Change-Id: Ibef2693ca6ea9e23f8993c9e525e58ac54a22333 Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
2020-02-20libhwjpeg: use buffer size instead of payloadCho KyongHo
ExynosJpegEncoderForCamera has the lengths of mage buffers to LibScalerForJpeg but it does not get informed about the lengths. Instead LibScalerForJpeg feeds VIDIOC_QBUF the required payloads of images studied by VIDOC_S_FMT as the buffer length which is not the length of the buffer. Change-Id: Id51f3a6e4f701fdb5f33bf84d17045448ab5f97a Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
2020-02-20libhwjpeg: delegate driver init to each portCho KyongHo
V4L2 API call sequence in LibScalerForJpeg is deviced by the APIs for both of the ports including output and capture: s_fmt(output) & s_fmt(capture) -> reqbufs(output) & reqbufs(capture) -> qbuf(output) & qbuf(capture) -> dqbuf(output) & dqbuf(capture). But LibScalerForJpeg should revert the success of an API call for output if the following the same API call for capture is failed for the next try. Now we can choose the better way: (s_fmt(output)->reqbufs(output))&(s_fmt(capture)->reqbufs(capture)) -> qbuf(output) & qbuf(capture) We do not need to revert an API call for output even though its following API call for capture.o We also moved parameters of LibScalerForJpeg::Set[Src|Dst]Image() about image buffers to LibScalerForJpeg::RunStream() because image dimension and format seldom change while buffers can be changed every frame. This change helps the better design. We do not need to hold the buffer information confirued by LibScalerForJpeg::Set[Src|Dst]Image() until LibScalerForJpeg::RunStream() is called. Change-Id: I4af0750975068b22055c1c2eafc53ce76d366479 Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
2020-02-20libhwjpeg: refactor Set[Src|Dst]Image()Cho KyongHo
The LibScalerForJpeg is the thumbnail image generator for libhwjpeg and the image and buffer types to LibScalerForJpeg does not vary. Unnecessary flexibility increases the complexity of a module. So, we should discard the support for userptr in SetDstImage(). In addition, LibScalerForJpeg requires unnecessary type casting to libhwjpeg for SetSrcImage and SetDstImage for the historical reasion. However, it is no longer needed because we can decide our API now. Change-Id: Ie8eebc38bf4f09889cc001e673f128570fb642c1 Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
2020-02-20libhwjpeg: support the multiple APPX segmentsSeungchul Kim
libhwjpeg is modified to support the multiple APPX segments. For example, libhwjpeg can now update the multiple APP4 segments to the JPEG file. Change-Id: If494db0ba54a885469a161651198e08e9a41ab66 Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
2019-09-18Add initial source codeHyunKyung Kim
Change-Id: I285a55c44c9fd5d3a8abaa781ef9dc8d9d39f53a Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>