瑞芯微Rockchip开发者社区
直播中

王强

7年用户 1368经验值
私信 关注
[问答]

rk3288的VPU提供JPEG的硬件编解码功能有何作用

rk3288的VPU提供JPEG的硬件编解码功能有何作用?

回帖(1)

王红

2022-3-3 10:42:17
Platform: ROCKCHIP

OS: Android 6.0

Kernel: 3.10.92

硬解:

rk3288的VPU提供了JPEG的硬件编解码功能.


对应的so路径:

rk3288/vendor/rockchip/common/vpu/lib/arm/libjpeghwenc.so

rk3288/vendor/rockchip/common/vpu/lib/arm/libjpeghwdec.so

头文件:

rk3288/hardware/rockchip/jpeghw/release/encode_release/hw_jpegenc.h

rk3288/hardware/rockchip/jpeghw/release/decoder_release/hw_jpegdecapi.h

编码会在Camera模块拍照被用到:

hardware/rockchip/camera/CameraHal/AppMsgNotifier.cpp

int AppMsgNotifier::captureEncProcessPicture(FramInfo_s* frame){

......

err = hw_jpeg_encode(&JpegInInfo, &JpegOutInfo);

......

}

Android.mk

LOCAL_SHARED_LIBRARIES:=

......

libjpeghwenc

解码会在SKIA图形库中用到:

rk3288/external/skia/src/images/SkHwJpegUtility.cpp

bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {

......

if(hw_jpeg_decode(&hwInfo,&outInfo, &reuseBitmap, bm->width(), bm->height()) >= 0)

......

}

Android.mk

#ifeq ($(HAVE_LIBRKVPU), true)

LOCAL_CFLAGS += -DUSE_HW_JPEG

LOCAL_SRC_FILES += src/images/SkHwJpegUtility.cpp

LOCAL_SHARED_LIBRARIES += libjpeghwdec

LOCAL_C_INCLUDES += hardware/rockchip/jpeghw/release/decoder_release

hardware/rockchip/librkvpu

#endif

软解: Android自带软解库位于: rk3288/external/jpeg Android.mk: LOCAL_MODULE := libjpeg
举报

更多回帖

发帖
×
20
完善资料,
赚取积分