}
ctx->codec_mode = ctx->src_fmt->codec_mode;
- mfc_info_ctx("Dec input codec(%d): %s\n",
+ mfc_info_ctx("[STREAM] Dec src codec(%d): %s\n",
ctx->codec_mode, ctx->src_fmt->name);
ctx->pix_format = pix_fmt_mp->pixelformat;
dec->src_buf_size = pix_fmt_mp->plane_fmt[0].sizeimage;
else
dec->src_buf_size = MAX_FRAME_SIZE;
- mfc_debug(2, "sizeimage: %d\n", pix_fmt_mp->plane_fmt[0].sizeimage);
+ mfc_debug(2, "[STREAM] sizeimage: %d\n", pix_fmt_mp->plane_fmt[0].sizeimage);
pix_fmt_mp->plane_fmt[0].bytesperline = 0;
MFC_TRACE_CTX_HWLOCK("**DEC s_fmt\n");
}
}
} else if (vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
- mfc_debug(2, "Plane size: %lu, dec->src_buf_size: %u\n",
- vb2_plane_size(vb, 0), dec->src_buf_size);
+ buf_size = vb2_plane_size(vb, 0);
+ mfc_debug(2, "[STREAM] vb size: %lu, calc size: %d\n",
+ buf_size, dec->src_buf_size);
- if (vb2_plane_size(vb, 0) < dec->src_buf_size) {
- mfc_err_ctx("Plane buffer (OUTPUT) is too small.\n");
+ if (buf_size < dec->src_buf_size) {
+ mfc_err_ctx("[STREAM] size(%d) is smaller than (%d)\n",
+ buf_size, dec->src_buf_size);
return -EINVAL;
}
}
if (vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
- mfc_debug(2, "Adding to src index[%d] 0x%08llx\n",
+ mfc_debug(2, "[STREAM] Adding to src index[%d] 0x%08llx\n",
vb->index, buf->addr[0][0]);
if (dec->dst_memtype == V4L2_MEMORY_DMABUF &&
ctx->state < MFCINST_HEAD_PARSED && !ctx->is_drm)
}
ctx->codec_mode = ctx->dst_fmt->codec_mode;
- mfc_info_ctx("Enc output codec(%d) : %s\n",
- ctx->dst_fmt->codec_mode, ctx->dst_fmt->name);
+ mfc_info_ctx("[STREAM] Enc dst codec(%d) : %s\n",
+ ctx->codec_mode, ctx->dst_fmt->name);
if (ctx->otf_handle) {
if (ctx->dst_fmt->fourcc != V4L2_PIX_FMT_H264 &&
mfc_debug_enter();
if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
- mfc_debug(2, "plane size: %lu, dst size: %u\n",
- vb2_plane_size(vb, 0), enc->dst_buf_size);
+ buf_size = vb2_plane_size(vb, 0);
+ mfc_debug(2, "[STREAM] vb size: %lu, calc size: %u\n",
+ buf_size, enc->dst_buf_size);
- if (vb2_plane_size(vb, 0) < enc->dst_buf_size) {
- mfc_err_ctx("plane size is too small for capture\n");
+ if (buf_size < enc->dst_buf_size) {
+ mfc_err_ctx("[STREAM] size(%d) is smaller than (%d)\n",
+ buf_size, enc->dst_buf_size);
return -EINVAL;
}
buf->done_index = 0;
if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
- mfc_debug(2, "Adding to dst index[%d] 0x%08llx\n",
+ mfc_debug(2, "[STREAM] Adding to dst index[%d] 0x%08llx\n",
vb->index, buf->addr[0][0]);
/* Mark destination as available for use by MFC */
dst_mb->vb.flags |= V4L2_BUF_FLAG_KEYFRAME;
break;
}
- mfc_debug(2, "Slice type flag: %d\n", dst_mb->vb.flags);
+ mfc_debug(2, "[STREAM] Slice type flag: %d\n", dst_mb->vb.flags);
if (IS_BPG_ENC(ctx)) {
strm_size += enc->header_size;
strm_size = s5p_mfc_get_enc_strm_size();
pic_count = s5p_mfc_get_enc_pic_count();
- mfc_debug(2, "encoded slice type: %d\n", slice_type);
- mfc_debug(2, "encoded stream size: %d\n", strm_size);
- mfc_debug(2, "display order: %d\n", pic_count);
+ mfc_debug(2, "[STREAM] encoded slice type: %d, size: %d, display order: %d\n",
+ slice_type, strm_size, pic_count);
/* buffer full handling */
if (enc->buf_full) {
ctx->img_height = s5p_mfc_get_img_height();
ctx->crop_width = ctx->img_width;
ctx->crop_height = ctx->img_height;
- mfc_info_ctx("width: %d, height: %d\n", ctx->img_width, ctx->img_height);
+ mfc_info_ctx("[STREAM] resolution w: %d, h: %d\n", ctx->img_width, ctx->img_height);
}
ctx->dpb_count = s5p_mfc_get_dpb_count();
s5p_mfc_get_chroma_bit_depth_minus8() ||
s5p_mfc_get_profile() == S5P_FIMV_D_PROFILE_HEVC_MAIN_10) {
ctx->is_10bit = 1;
- mfc_info_ctx("[10BIT] 10bit contents, profile: %d, depth: %d/%d\n",
+ mfc_info_ctx("[STREAM][10BIT] 10bit contents, profile: %d, depth: %d/%d\n",
s5p_mfc_get_profile(),
s5p_mfc_get_luma_bit_depth_minus8() + 8,
s5p_mfc_get_chroma_bit_depth_minus8() + 8);
if (CODEC_422FORMAT(ctx) && dev->pdata->support_422) {
if (s5p_mfc_get_chroma_format() == S5P_FIMV_D_CHROMA_422) {
ctx->is_422 = 1;
- mfc_info_ctx("422 chroma format\n");
+ mfc_info_ctx("[STREAM] 422 chroma format\n");
}
}
struct s5p_mfc_buf *src_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->src_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (src_mb) {
dec->consumed += s5p_mfc_get_consumed_stream();
- mfc_debug(2, "Check consumed size of header. ");
- mfc_debug(2, "total size : %d, consumed : %lu\n",
+ mfc_debug(2, "[STREAM] header total size : %d, consumed : %lu\n",
src_mb->vb.vb2_buf.planes[0].bytesused, dec->consumed);
if ((dec->consumed > 0) &&
(src_mb->vb.vb2_buf.planes[0].bytesused > dec->consumed)) {
dec->remained_size = src_mb->vb.vb2_buf.planes[0].bytesused -
dec->consumed;
- mfc_debug(2, "there is remained bytes after header parsing\n");
- mfc_debug(2, "remained_size: %lu\n", dec->remained_size);
+ mfc_debug(2, "[STREAM] there is remained bytes(%lu) after header parsing\n",
+ dec->remained_size);
} else {
dec->consumed = 0;
dec->remained_size = 0;
int ret;
enc->header_size = s5p_mfc_get_enc_strm_size();
- mfc_debug(2, "seq header size: %d\n", enc->header_size);
+ mfc_debug(2, "[STREAM] encoded slice type: %d, header size: %d, display order: %d\n",
+ s5p_mfc_get_enc_slice_type(), enc->header_size,
+ s5p_mfc_get_enc_pic_count());
if (IS_BPG_ENC(ctx)) {
dst_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->dst_buf_queue, MFC_BUF_NO_TOUCH_USED);
dst_mb->vb.flags |= V4L2_BUF_FLAG_KEYFRAME;
break;
}
- mfc_debug(2, "NAL Q: Slice type flag: %d\n", dst_mb->vb.flags);
+ mfc_debug(2, "NAL Q:[STREAM] Slice type flag: %d\n", dst_mb->vb.flags);
vb2_set_plane_payload(&dst_mb->vb.vb2_buf, 0, strm_size);
strm_size = pOutStr->StreamSize;
pic_count = pOutStr->EncCnt;
- mfc_debug(2, "NAL Q: encoded slice type: %d\n", slice_type);
- mfc_debug(2, "NAL Q: encoded stream size: %d\n", strm_size);
- mfc_debug(2, "NAL Q: display order: %d\n", pic_count);
+ mfc_debug(2, "NAL Q:[STREAM] encoded slice type: %d, size: %d, display order: %d\n",
+ slice_type, strm_size, pic_count);
/* buffer full handling */
if (ctx->state == MFCINST_RUNNING_BUF_FULL)
enc->header_size = s5p_mfc_get_enc_strm_size();
ctx->dpb_count = s5p_mfc_get_enc_dpb_count();
ctx->scratch_buf_size = s5p_mfc_get_enc_scratch_size();
- mfc_debug(2, "OTF: header size: %d, cpb_count: %d, scratch size: %zu\n",
- enc->header_size, ctx->dpb_count, ctx->scratch_buf_size);
+ mfc_debug(2, "OTF:[STREAM] encoded slice type: %d, header size: %d, display order: %d\n",
+ s5p_mfc_get_enc_slice_type(), enc->header_size,
+ s5p_mfc_get_enc_pic_count());
+ mfc_debug(2, "OTF: cpb_count: %d, scratch size: %zu\n",
+ ctx->dpb_count, ctx->scratch_buf_size);
s5p_mfc_change_state(ctx, MFCINST_HEAD_PARSED);
pic_count = s5p_mfc_get_enc_pic_count();
strm_size = s5p_mfc_get_enc_strm_size();
- mfc_debug(2, "OTF: encoded slice type: %d\n", slice_type);
- mfc_debug(2, "OTF: encoded stream size: %d\n", strm_size);
- mfc_debug(2, "OTF: display order: %d\n", pic_count);
+ mfc_debug(2, "OTF:[STREAM] encoded slice type: %d, size: %d, display order: %d\n",
+ slice_type, strm_size, pic_count);
/* set encoded frame type */
enc->frame_type = slice_type;
if (otf_dump && !ctx->is_drm) {
buf = &debug->stream_buf[debug->frame_cnt];
mfc_debug(2, "OTF: set stream addr for debugging\n");
- mfc_debug(2, "OTF: buf[%d] daddr: 0x%08llx\n",
+ mfc_debug(2, "OTF:[STREAM] buf[%d] daddr: 0x%08llx\n",
debug->frame_cnt, buf->daddr);
MFC_WRITEL(buf->daddr, S5P_FIMV_E_STREAM_BUFFER_ADDR);
}