Lines Matching refs:frame
252 if (component->frame != NULL) {
253 mppApi->HdiMppFrameDeinit(&component->frame);
254 component->frame = NULL;
273 HDF_LOGI("%{public}s: dec frame count : %{public}d, error count : %{public}d", __func__,
278 HDF_LOGI("%{public}s: enc frame count : %{public}d", __func__, component->frameCount);
310 HDF_LOGE("%{public}s: config set frame number failed", __func__);
404 HDF_LOGE("%{public}s: config set frame number failed", __func__);
578 MPP_RET DecodeGetFrame(RKHdiBaseComponent* component, MppCtx ctx, MppFrame *frame)
584 ret = mpi->decode_get_frame(ctx, frame);
599 int32_t HandleDecodeFrameInfoChange(RKHdiBaseComponent* component, MppFrame frame, MppCtx ctx)
604 RK_U32 width = mppApi->HdiMppFrameGetWidth(frame);
605 RK_U32 height = mppApi->HdiMppFrameGetHeight(frame);
606 RK_U32 hor_stride = mppApi->HdiMppFrameGetHorStride(frame);
607 RK_U32 ver_stride = mppApi->HdiMppFrameGetVerStride(frame);
608 RK_U32 buf_size = mppApi->HdiMppFrameGetBufferSize(frame);
652 static IM_STATUS PutDecodeFrameToOutput(RKHdiBaseComponent* component, MppFrame frame, CodecBuffer *outInfo)
655 MppBuffer mppBuffer = mppApi->HdiMppFrameGetBuffer(frame);
676 src.width = mppApi->HdiMppFrameGetWidth(frame);
677 src.height = mppApi->HdiMppFrameGetHeight(frame);
678 src.wstride = mppApi->HdiMppFrameGetHorStride(frame);
679 src.hstride = mppApi->HdiMppFrameGetVerStride(frame);
701 void HandleDecodeFrameOutput(RKHdiBaseComponent* component, MppFrame frame, int32_t frm_eos, CodecBuffer *outInfo)
704 RK_U32 err_info = mppApi->HdiMppFrameGetErrinfo(frame);
705 RK_U32 discard = mppApi->HdiMppFrameGetDiscard(frame);
718 IM_STATUS ret = PutDecodeFrameToOutput(component, frame, outInfo);
725 HDF_LOGI("%{public}s: dec reach STREAM_FLAG_EOS, frame count : %{public}d, error count : %{public}d",
733 int32_t HandleDecodedFrame(RKHdiBaseComponent* component, MppFrame frame, MppCtx ctx,
737 if (frame) {
738 if (mppApi->HdiMppFrameGetInfoChange(frame)) {
739 if (HandleDecodeFrameInfoChange(component, frame, ctx) != HDF_SUCCESS) {
741 mppApi->HdiMppFrameDeinit(&frame);
745 HandleDecodeFrameOutput(component, frame, frm_eos, outInfo);
747 mppApi->HdiMppFrameDeinit(&frame);
750 // try get runtime frame memory usage
765 MppFrame frame = NULL;
769 ret = DecodeGetFrame(component, ctx, &frame);
774 if (frame) {
775 frm_eos = mppApi->HdiMppFrameGetEos(frame);
777 if (HandleDecodedFrame(component, frame, ctx, frm_eos, outInfo) != HDF_SUCCESS) {
853 static IM_STATUS GetEncodeFrameFromInput(RKHdiBaseComponent* component, MppFrame frame,
877 dst.wstride = mppApi->HdiMppFrameGetHorStride(frame);
878 dst.hstride = mppApi->HdiMppFrameGetVerStride(frame);
879 dst.width = mppApi->HdiMppFrameGetWidth(frame);
880 dst.height = mppApi->HdiMppFrameGetHeight(frame);
908 HDF_LOGI("%{public}s: receive eos frame", __func__);
959 HDF_LOGI("%{public}s: enc reach STREAM_FLAG_EOS, frame count : %{public}d",
1008 MppFrame frame = NULL;
1030 if (EncodeInitFrame(component, &frame, frm_eos, inputData) != HDF_SUCCESS) {
1034 ret = mpi->encode_put_frame(ctx, frame);
1036 HDF_LOGE("%{public}s: mpp encode put frame failed", __func__);
1037 mppApi->HdiMppFrameDeinit(&frame);
1040 mppApi->HdiMppFrameDeinit(&frame);