summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorywan171 <yi.a.wang@intel.com>2014-09-17 15:09:39 +0800
committerPatrick Tjin <pattjin@google.com>2014-09-17 09:24:02 -0700
commit67efa6523d593d3ebdb3e22eafb186e26d4bad74 (patch)
tree5c3a76073b91a9676961ca5663dd5ed030c4902c
parent1b69a16ac4fa51c24b4be8f844a7253ed62cc710 (diff)
downloadandroid_hardware_intel_common_libmix-67efa6523d593d3ebdb3e22eafb186e26d4bad74.tar.gz
android_hardware_intel_common_libmix-67efa6523d593d3ebdb3e22eafb186e26d4bad74.tar.bz2
android_hardware_intel_common_libmix-67efa6523d593d3ebdb3e22eafb186e26d4bad74.zip
change some LOGI to LOGV in videoencoder
Bug: 17417518 BZ: 223029 Change-Id: I6cbeeeaeb218fe851fe78495b16d362c9f66a134 Signed-off-by: ywan171 <yi.a.wang@intel.com>
-rw-r--r--videoencoder/VideoEncoderAVC.cpp54
-rw-r--r--videoencoder/VideoEncoderBase.cpp72
-rw-r--r--videoencoder/VideoEncoderH263.cpp18
-rw-r--r--videoencoder/VideoEncoderMP4.cpp14
-rw-r--r--videoencoder/VideoEncoderUtils.cpp56
5 files changed, 107 insertions, 107 deletions
diff --git a/videoencoder/VideoEncoderAVC.cpp b/videoencoder/VideoEncoderAVC.cpp
index 47d8174..b5eab88 100644
--- a/videoencoder/VideoEncoderAVC.cpp
+++ b/videoencoder/VideoEncoderAVC.cpp
@@ -121,7 +121,7 @@ Encode_Status VideoEncoderAVC:: derivedGetParams(VideoParamConfigSet *videoEncPa
Encode_Status VideoEncoderAVC::derivedSetConfig(VideoParamConfigSet *videoEncConfig) {
CHECK_NULL_RETURN_IFFAIL(videoEncConfig);
- LOG_I("Config type = %d\n", (int)videoEncConfig->type);
+ LOG_V("Config type = %d\n", (int)videoEncConfig->type);
switch (videoEncConfig->type) {
case VideoConfigTypeAVCIntraPeriod: {
@@ -188,7 +188,7 @@ Encode_Status VideoEncoderAVC:: derivedGetConfig(
VideoParamConfigSet *videoEncConfig) {
CHECK_NULL_RETURN_IFFAIL(videoEncConfig);
- LOG_I("Config type = %d\n", (int)videoEncConfig->type);
+ LOG_V("Config type = %d\n", (int)videoEncConfig->type);
switch (videoEncConfig->type) {
@@ -347,7 +347,7 @@ Encode_Status VideoEncoderAVC::getExtFormatOutput(VideoEncOutputBuffer *outBuffe
break;
}
- LOG_I("out size is = %d\n", outBuffer->dataSize);
+ LOG_V("out size is = %d\n", outBuffer->dataSize);
CLEAN_UP:
@@ -380,7 +380,7 @@ Encode_Status VideoEncoderAVC::getOneNALUnit(
}
*nalType = (*(inBuffer + pos)) & 0x1F;
- LOG_I ("NAL type = 0x%x\n", *nalType);
+ LOG_V ("NAL type = 0x%x\n", *nalType);
zeroByteCount = 0;
*nalOffset = pos;
@@ -477,7 +477,7 @@ Encode_Status VideoEncoderAVC::getHeader(
ret = getOneNALUnit(buf, bufSize, &nalSize, &nalType, &nalOffset, status);
CHECK_ENCODE_STATUS_RETURN("getOneNALUnit");
- LOG_I("NAL type = %d, NAL size = %d, offset = %d\n", nalType, nalSize, nalOffset);
+ LOG_V("NAL type = %d, NAL size = %d, offset = %d\n", nalType, nalSize, nalOffset);
size = nalSize + nalOffset;
// Codec_data should be SPS or PPS
@@ -853,7 +853,7 @@ Encode_Status VideoEncoderAVC::renderMaxSliceSize() {
Encode_Status VideoEncoderAVC::renderCIR(){
VAStatus vaStatus = VA_STATUS_SUCCESS;
- LOG_I( "%s Begin\n", __FUNCTION__);
+ LOG_V( "%s Begin\n", __FUNCTION__);
VABufferID miscParamBufferCIRid;
VAEncMiscParameterBuffer *misc_param;
@@ -1043,21 +1043,21 @@ Encode_Status VideoEncoderAVC::renderSequenceParams(EncodeTask *) {
avcSeqParams.max_num_ref_frames = 1;
if(avcSeqParams.ip_period > 1)
- avcSeqParams.max_num_ref_frames = 2;
+ avcSeqParams.max_num_ref_frames = 2;
LOG_V("===h264 sequence params===\n");
- LOG_I( "seq_parameter_set_id = %d\n", (uint32_t)avcSeqParams.seq_parameter_set_id);
- LOG_I( "level_idc = %d\n", (uint32_t)avcSeqParams.level_idc);
- LOG_I( "intra_period = %d\n", avcSeqParams.intra_period);
- LOG_I( "idr_interval = %d\n", avcSeqParams.intra_idr_period);
- LOG_I( "picture_width_in_mbs = %d\n", avcSeqParams.picture_width_in_mbs);
- LOG_I( "picture_height_in_mbs = %d\n", avcSeqParams.picture_height_in_mbs);
- LOG_I( "bitrate = %d\n", rcMiscParam->bits_per_second);
- LOG_I( "frame_rate = %d\n", framerateParam->framerate);
- LOG_I( "initial_qp = %d\n", rcMiscParam->initial_qp);
- LOG_I( "min_qp = %d\n", rcMiscParam->min_qp);
- LOG_I( "basic_unit_size = %d\n", rcMiscParam->basic_unit_size);
- LOG_I( "bDirect8x8Inference = %d\n",mVideoParamsAVC.bDirect8x8Inference);
+ LOG_V( "seq_parameter_set_id = %d\n", (uint32_t)avcSeqParams.seq_parameter_set_id);
+ LOG_V( "level_idc = %d\n", (uint32_t)avcSeqParams.level_idc);
+ LOG_V( "intra_period = %d\n", avcSeqParams.intra_period);
+ LOG_V( "idr_interval = %d\n", avcSeqParams.intra_idr_period);
+ LOG_V( "picture_width_in_mbs = %d\n", avcSeqParams.picture_width_in_mbs);
+ LOG_V( "picture_height_in_mbs = %d\n", avcSeqParams.picture_height_in_mbs);
+ LOG_V( "bitrate = %d\n", rcMiscParam->bits_per_second);
+ LOG_V( "frame_rate = %d\n", framerateParam->framerate);
+ LOG_V( "initial_qp = %d\n", rcMiscParam->initial_qp);
+ LOG_V( "min_qp = %d\n", rcMiscParam->min_qp);
+ LOG_V( "basic_unit_size = %d\n", rcMiscParam->basic_unit_size);
+ LOG_V( "bDirect8x8Inference = %d\n",mVideoParamsAVC.bDirect8x8Inference);
// Not sure whether these settings work for all drivers
avcSeqParams.seq_fields.bits.frame_mbs_only_flag = 1;
@@ -1188,9 +1188,9 @@ Encode_Status VideoEncoderAVC::renderPictureParams(EncodeTask *task) {
avcPicParams.last_picture = 0;
LOG_V("======h264 picture params======\n");
- LOG_I( "reference_picture = 0x%08x\n", avcPicParams.ReferenceFrames[0].picture_id);
- LOG_I( "reconstructed_picture = 0x%08x\n", avcPicParams.CurrPic.picture_id);
- LOG_I( "coded_buf = 0x%08x\n", avcPicParams.coded_buf);
+ LOG_V( "reference_picture = 0x%08x\n", avcPicParams.ReferenceFrames[0].picture_id);
+ LOG_V( "reconstructed_picture = 0x%08x\n", avcPicParams.CurrPic.picture_id);
+ LOG_V( "coded_buf = 0x%08x\n", avcPicParams.coded_buf);
//LOG_I( "picture_width = %d\n", avcPicParams.picture_width);
//LOG_I( "picture_height = %d\n\n", avcPicParams.picture_height);
@@ -1338,11 +1338,11 @@ Encode_Status VideoEncoderAVC::renderSliceParams(EncodeTask *task) {
//currentSlice->slice_flags.bits.is_long_term_ref = 0;
LOG_V("======AVC slice params======\n");
- LOG_I( "slice_index = %d\n", (int) sliceIndex);
- LOG_I( "macroblock_address = %d\n", (int) currentSlice->macroblock_address);
- LOG_I( "slice_height_in_mb = %d\n", (int) currentSlice->num_macroblocks);
- LOG_I( "slice.type = %d\n", (int) currentSlice->slice_type);
- LOG_I("disable_deblocking_filter_idc = %d\n\n", (int) currentSlice->disable_deblocking_filter_idc);
+ LOG_V( "slice_index = %d\n", (int) sliceIndex);
+ LOG_V( "macroblock_address = %d\n", (int) currentSlice->macroblock_address);
+ LOG_V( "slice_height_in_mb = %d\n", (int) currentSlice->num_macroblocks);
+ LOG_V( "slice.type = %d\n", (int) currentSlice->slice_type);
+ LOG_V("disable_deblocking_filter_idc = %d\n\n", (int) currentSlice->disable_deblocking_filter_idc);
// Not sure whether these settings work for all drivers
currentSlice->pic_parameter_set_id = 0;
diff --git a/videoencoder/VideoEncoderBase.cpp b/videoencoder/VideoEncoderBase.cpp
index b3fd3c2..f383253 100644
--- a/videoencoder/VideoEncoderBase.cpp
+++ b/videoencoder/VideoEncoderBase.cpp
@@ -188,16 +188,16 @@ Encode_Status VideoEncoderBase::start() {
}
LOG_V( "======VA Configuration======\n");
- LOG_I( "profile = %d\n", mComParams.profile);
- LOG_I( "mVAEntrypoint = %d\n", mVAEntrypoint);
- LOG_I( "vaAttrib[0].type = %d\n", vaAttrib[0].type);
- LOG_I( "vaAttrib[1].type = %d\n", vaAttrib[1].type);
- LOG_I( "vaAttrib[2].type = %d\n", vaAttrib[2].type);
- LOG_I( "vaAttrib[0].value (Format) = %d\n", vaAttrib[0].value);
- LOG_I( "vaAttrib[1].value (RC mode) = %d\n", vaAttrib[1].value);
- LOG_I( "vaAttrib[2].value (AutoReference) = %d\n", vaAttrib[2].value);
- LOG_I( "vaAttribNumber is %d\n", vaAttribNumber);
- LOG_I( "mComParams.numberOfLayer is %d\n", mComParams.numberOfLayer);
+ LOG_V( "profile = %d\n", mComParams.profile);
+ LOG_V( "mVAEntrypoint = %d\n", mVAEntrypoint);
+ LOG_V( "vaAttrib[0].type = %d\n", vaAttrib[0].type);
+ LOG_V( "vaAttrib[1].type = %d\n", vaAttrib[1].type);
+ LOG_V( "vaAttrib[2].type = %d\n", vaAttrib[2].type);
+ LOG_V( "vaAttrib[0].value (Format) = %d\n", vaAttrib[0].value);
+ LOG_V( "vaAttrib[1].value (RC mode) = %d\n", vaAttrib[1].value);
+ LOG_V( "vaAttrib[2].value (AutoReference) = %d\n", vaAttrib[2].value);
+ LOG_V( "vaAttribNumber is %d\n", vaAttribNumber);
+ LOG_V( "mComParams.numberOfLayer is %d\n", mComParams.numberOfLayer);
LOG_V( "vaCreateConfig\n");
@@ -507,7 +507,7 @@ Encode_Status VideoEncoderBase::getOutput(VideoEncOutputBuffer *outBuffer, uint3
// It is a requirement of video driver
// vaSyncSurface syncs the wrong frame when rendering the same surface multiple times,
// so use vaMapbuffer instead
- LOG_I ("block mode, vaMapBuffer ID = 0x%08x\n", mOutCodedBuffer);
+ LOG_V ("block mode, vaMapBuffer ID = 0x%08x\n", mOutCodedBuffer);
if (mOutCodedBufferPtr == NULL) {
vaStatus = vaMapBuffer (mVADisplay, mOutCodedBuffer, (void **)&mOutCodedBufferPtr);
CHECK_VA_STATUS_GOTO_CLEANUP("vaMapBuffer");
@@ -522,7 +522,7 @@ Encode_Status VideoEncoderBase::getOutput(VideoEncOutputBuffer *outBuffer, uint3
} else {
//For both block with timeout and non-block mode, query surface, if ready, output data
- LOG_I ("non-block mode, vaQuerySurfaceStatus ID = 0x%08x\n", mCurOutputTask->enc_surface);
+ LOG_V ("non-block mode, vaQuerySurfaceStatus ID = 0x%08x\n", mCurOutputTask->enc_surface);
vaStatus = vaQuerySurfaceStatus(mVADisplay, mCurOutputTask->enc_surface, &vaSurfaceStatus);
if (vaSurfaceStatus & VASurfaceReady) {
@@ -558,7 +558,7 @@ Encode_Status VideoEncoderBase::getOutput(VideoEncOutputBuffer *outBuffer, uint3
CHECK_ENCODE_STATUS_CLEANUP("getExtFormatOutput");
}
- LOG_I("out size for this getOutput call = %d\n", outBuffer->dataSize);
+ LOG_V("out size for this getOutput call = %d\n", outBuffer->dataSize);
ret = cleanupForOutput();
CHECK_ENCODE_STATUS_CLEANUP("cleanupForOutput");
@@ -689,7 +689,7 @@ Encode_Status VideoEncoderBase::prepareForOutput(
CHECK_NULL_RETURN_IFFAIL(mOutCodedBufferPtr);
}
- LOG_I ("Coded Buffer ID been mapped = 0x%08x\n", mOutCodedBuffer);
+ LOG_V("Coded Buffer ID been mapped = 0x%08x\n", mOutCodedBuffer);
mTotalSize = 0;
mOffsetInSeg = 0;
@@ -877,8 +877,8 @@ Encode_Status VideoEncoderBase::outputAllData(VideoEncOutputBuffer *outBuffer) {
while (1) {
- LOG_I("mCurSegment->size = %d, mOffsetInSeg = %d\n", mCurSegment->size, mOffsetInSeg);
- LOG_I("outBuffer->bufferSize = %d, sizeCopiedHere = %d, mTotalSizeCopied = %d\n",
+ LOG_V("mCurSegment->size = %d, mOffsetInSeg = %d\n", mCurSegment->size, mOffsetInSeg);
+ LOG_V("outBuffer->bufferSize = %d, sizeCopiedHere = %d, mTotalSizeCopied = %d\n",
outBuffer->bufferSize, sizeCopiedHere, mTotalSizeCopied);
if (mCurSegment->size < mOffsetInSeg || outBuffer->bufferSize < sizeCopiedHere) {
@@ -966,7 +966,7 @@ Encode_Status VideoEncoderBase::setParameters(
Encode_Status ret = ENCODE_SUCCESS;
CHECK_NULL_RETURN_IFFAIL(videoEncParams);
- LOG_I("Config type = %x\n", (int)videoEncParams->type);
+ LOG_V("Config type = %x\n", (int)videoEncParams->type);
if (mStarted) {
LOG_E("Encoder has been initialized, should use setConfig to change configurations\n");
@@ -1073,7 +1073,7 @@ Encode_Status VideoEncoderBase::getParameters(
Encode_Status ret = ENCODE_SUCCESS;
CHECK_NULL_RETURN_IFFAIL(videoEncParams);
- LOG_I("Config type = %d\n", (int)videoEncParams->type);
+ LOG_V("Config type = %d\n", (int)videoEncParams->type);
switch (videoEncParams->type) {
case VideoParamsTypeCommon: {
@@ -1197,7 +1197,7 @@ Encode_Status VideoEncoderBase::setConfig(VideoParamConfigSet *videoEncConfig) {
Encode_Status ret = ENCODE_SUCCESS;
CHECK_NULL_RETURN_IFFAIL(videoEncConfig);
- LOG_I("Config type = %d\n", (int)videoEncConfig->type);
+ LOG_V("Config type = %d\n", (int)videoEncConfig->type);
// workaround
#if 0
@@ -1316,7 +1316,7 @@ Encode_Status VideoEncoderBase::getConfig(VideoParamConfigSet *videoEncConfig) {
Encode_Status ret = ENCODE_SUCCESS;
CHECK_NULL_RETURN_IFFAIL(videoEncConfig);
- LOG_I("Config type = %d\n", (int)videoEncConfig->type);
+ LOG_V("Config type = %d\n", (int)videoEncConfig->type);
switch (videoEncConfig->type) {
case VideoConfigTypeFrameRate: {
@@ -1411,7 +1411,7 @@ Encode_Status VideoEncoderBase::getConfig(VideoParamConfigSet *videoEncConfig) {
void VideoEncoderBase:: PrepareFrameInfo (EncodeTask* task) {
if (mNewHeader) mFrameNum = 0;
- LOG_I( "mFrameNum = %d ", mFrameNum);
+ LOG_V( "mFrameNum = %d ", mFrameNum);
updateFrameInfo(task) ;
}
@@ -1533,16 +1533,16 @@ Encode_Status VideoEncoderBase::getNewUsrptrFromSurface(
*outsize = image.data_size;
*stride = image.pitches[0];
- LOG_I( "surface = 0x%08x\n",(uint32_t)surface);
- LOG_I("image->pitches[0] = %d\n", image.pitches[0]);
- LOG_I("image->pitches[1] = %d\n", image.pitches[1]);
- LOG_I("image->offsets[0] = %d\n", image.offsets[0]);
- LOG_I("image->offsets[1] = %d\n", image.offsets[1]);
- LOG_I("image->num_planes = %d\n", image.num_planes);
- LOG_I("image->width = %d\n", image.width);
- LOG_I("image->height = %d\n", image.height);
- LOG_I ("data_size = %d\n", image.data_size);
- LOG_I ("usrptr = 0x%p\n", *usrptr);
+ LOG_V( "surface = 0x%08x\n",(uint32_t)surface);
+ LOG_V("image->pitches[0] = %d\n", image.pitches[0]);
+ LOG_V("image->pitches[1] = %d\n", image.pitches[1]);
+ LOG_V("image->offsets[0] = %d\n", image.offsets[0]);
+ LOG_V("image->offsets[1] = %d\n", image.offsets[1]);
+ LOG_V("image->num_planes = %d\n", image.num_planes);
+ LOG_V("image->width = %d\n", image.width);
+ LOG_V("image->height = %d\n", image.height);
+ LOG_V("data_size = %d\n", image.data_size);
+ LOG_V("usrptr = 0x%p\n", *usrptr);
vaStatus = vaUnmapBuffer(mVADisplay, image.buf);
CHECK_VA_STATUS_RETURN("vaUnmapBuffer");
@@ -1647,7 +1647,7 @@ Encode_Status VideoEncoderBase::manageSrcSurface(VideoEncRawBuffer *inBuffer, VA
memset(&vinfo, 0, sizeof(ValueInfo));
if (mStoreMetaDataInBuffers.isEnabled) {
//metadatabuffer mode
- LOG_I("in metadata mode, data=%p, size=%d\n", inBuffer->data, inBuffer->size);
+ LOG_V("in metadata mode, data=%p, size=%d\n", inBuffer->data, inBuffer->size);
if (imb.UnSerialize(inBuffer->data, inBuffer->size) != IMB_SUCCESS) {
//fail to parse buffer
return ENCODE_NO_REQUEST_DATA;
@@ -1687,14 +1687,14 @@ Encode_Status VideoEncoderBase::manageSrcSurface(VideoEncRawBuffer *inBuffer, VA
if (map) {
//has mapped, get surfaceID directly and do all necessary actions
- LOG_I("direct find surface %d from value %i\n", map->getVASurface(), value);
+ LOG_V("direct find surface %d from value %i\n", map->getVASurface(), value);
*sid = map->getVASurface();
map->doMapping();
return ret;
}
//if no found from list, then try to map value with parameters
- LOG_I("not find surface from cache with value %i, start mapping if enough information\n", value);
+ LOG_V("not find surface from cache with value %i, start mapping if enough information\n", value);
if (mStoreMetaDataInBuffers.isEnabled) {
@@ -1741,7 +1741,7 @@ Encode_Status VideoEncoderBase::manageSrcSurface(VideoEncRawBuffer *inBuffer, VA
ret = map->doMapping();
if (ret == ENCODE_SUCCESS) {
- LOG_I("surface mapping success, map value %i into surface %d\n", value, map->getVASurface());
+ LOG_V("surface mapping success, map value %i into surface %d\n", value, map->getVASurface());
mSrcSurfaceMapList.push_back(map);
} else {
delete map;
@@ -1766,7 +1766,7 @@ Encode_Status VideoEncoderBase::manageSrcSurface(VideoEncRawBuffer *inBuffer, VA
ret = map->doMapping();
if (ret == ENCODE_SUCCESS) {
- LOG_I("surface mapping extravalue success, map value %i into surface %d\n", extravalues[i], map->getVASurface());
+ LOG_V("surface mapping extravalue success, map value %i into surface %d\n", extravalues[i], map->getVASurface());
mSrcSurfaceMapList.push_back(map);
} else {
delete map;
diff --git a/videoencoder/VideoEncoderH263.cpp b/videoencoder/VideoEncoderH263.cpp
index b9f3a9c..a014f1c 100644
--- a/videoencoder/VideoEncoderH263.cpp
+++ b/videoencoder/VideoEncoderH263.cpp
@@ -108,13 +108,13 @@ Encode_Status VideoEncoderH263::renderPictureParams(EncodeTask *task) {
h263PictureParams.picture_type = (task->type == FTYPE_I) ? VAEncPictureTypeIntra : VAEncPictureTypePredictive;
LOG_V("======h263 picture params======\n");
- LOG_I( "reference_picture = 0x%08x\n", h263PictureParams.reference_picture);
- LOG_I( "reconstructed_picture = 0x%08x\n", h263PictureParams.reconstructed_picture);
- LOG_I( "coded_buf = 0x%08x\n", h263PictureParams.coded_buf);
+ LOG_V( "reference_picture = 0x%08x\n", h263PictureParams.reference_picture);
+ LOG_V( "reconstructed_picture = 0x%08x\n", h263PictureParams.reconstructed_picture);
+ LOG_V( "coded_buf = 0x%08x\n", h263PictureParams.coded_buf);
// LOG_I( "coded_buf_index = %d\n", mCodedBufIndex);
- LOG_I( "picture_width = %d\n", h263PictureParams.picture_width);
- LOG_I( "picture_height = %d\n",h263PictureParams.picture_height);
- LOG_I( "picture_type = %d\n\n",h263PictureParams.picture_type);
+ LOG_V( "picture_width = %d\n", h263PictureParams.picture_width);
+ LOG_V( "picture_height = %d\n",h263PictureParams.picture_height);
+ LOG_V( "picture_type = %d\n\n",h263PictureParams.picture_type);
vaStatus = vaCreateBuffer(
mVADisplay, mVAContext,
@@ -163,9 +163,9 @@ Encode_Status VideoEncoderH263::renderSliceParams(EncodeTask *task) {
sliceParams->slice_flags.bits.disable_deblocking_filter_idc = 0;
LOG_V("======h263 slice params======\n");
- LOG_I("start_row_number = %d\n", (int) sliceParams->start_row_number);
- LOG_I("slice_height_in_mb = %d\n", (int) sliceParams->slice_height);
- LOG_I("slice.is_intra = %d\n", (int) sliceParams->slice_flags.bits.is_intra);
+ LOG_V("start_row_number = %d\n", (int) sliceParams->start_row_number);
+ LOG_V("slice_height_in_mb = %d\n", (int) sliceParams->slice_height);
+ LOG_V("slice.is_intra = %d\n", (int) sliceParams->slice_flags.bits.is_intra);
vaStatus = vaUnmapBuffer(mVADisplay, mSliceParamBuf);
CHECK_VA_STATUS_RETURN("vaUnmapBuffer");
diff --git a/videoencoder/VideoEncoderMP4.cpp b/videoencoder/VideoEncoderMP4.cpp
index b414c1d..f692163 100644
--- a/videoencoder/VideoEncoderMP4.cpp
+++ b/videoencoder/VideoEncoderMP4.cpp
@@ -197,14 +197,14 @@ Encode_Status VideoEncoderMP4::renderPictureParams(EncodeTask *task) {
mpeg4_pic_param.picture_type = (task->type == FTYPE_I) ? VAEncPictureTypeIntra : VAEncPictureTypePredictive;
LOG_V("======mpeg4 picture params======\n");
- LOG_I("reference_picture = 0x%08x\n", mpeg4_pic_param.reference_picture);
- LOG_I("reconstructed_picture = 0x%08x\n", mpeg4_pic_param.reconstructed_picture);
- LOG_I("coded_buf = 0x%08x\n", mpeg4_pic_param.coded_buf);
+ LOG_V("reference_picture = 0x%08x\n", mpeg4_pic_param.reference_picture);
+ LOG_V("reconstructed_picture = 0x%08x\n", mpeg4_pic_param.reconstructed_picture);
+ LOG_V("coded_buf = 0x%08x\n", mpeg4_pic_param.coded_buf);
// LOG_I("coded_buf_index = %d\n", mCodedBufIndex);
- LOG_I("picture_width = %d\n", mpeg4_pic_param.picture_width);
- LOG_I("picture_height = %d\n", mpeg4_pic_param.picture_height);
- LOG_I("vop_time_increment = %d\n", mpeg4_pic_param.vop_time_increment);
- LOG_I("picture_type = %d\n\n", mpeg4_pic_param.picture_type);
+ LOG_V("picture_width = %d\n", mpeg4_pic_param.picture_width);
+ LOG_V("picture_height = %d\n", mpeg4_pic_param.picture_height);
+ LOG_V("vop_time_increment = %d\n", mpeg4_pic_param.vop_time_increment);
+ LOG_V("picture_type = %d\n\n", mpeg4_pic_param.picture_type);
vaStatus = vaCreateBuffer(
mVADisplay, mVAContext,
diff --git a/videoencoder/VideoEncoderUtils.cpp b/videoencoder/VideoEncoderUtils.cpp
index 8b55bb0..6eda981 100644
--- a/videoencoder/VideoEncoderUtils.cpp
+++ b/videoencoder/VideoEncoderUtils.cpp
@@ -189,7 +189,7 @@ Encode_Status GetGfxBufferInfo(intptr_t handle, ValueInfo& vinfo){
vinfo.height = h->iHeight;
vinfo.lumaStride = h->iWidth;
- LOG_I("GetGfxBufferInfo: gfx iWidth=%d, iHeight=%d, iFormat=%x in handle structure\n", h->iWidth, h->iHeight, h->iFormat);
+ LOG_V("GetGfxBufferInfo: gfx iWidth=%d, iHeight=%d, iFormat=%x in handle structure\n", h->iWidth, h->iHeight, h->iFormat);
if (h->iFormat == HAL_PIXEL_FORMAT_NV12) {
#ifdef MRFLD_GFX
@@ -215,7 +215,7 @@ Encode_Status GetGfxBufferInfo(intptr_t handle, ValueInfo& vinfo){
vinfo.format = h->iFormat;
- LOG_I(" Actual Width=%d, Height=%d, Stride=%d\n\n", vinfo.width, vinfo.height, vinfo.lumaStride);
+ LOG_V("Actual Width=%d, Height=%d, Stride=%d\n\n", vinfo.width, vinfo.height, vinfo.lumaStride);
return ENCODE_SUCCESS;
}
@@ -322,7 +322,7 @@ Encode_Status VASurfaceMap::doMapping() {
if (gfx_alloc(width, height, HAL_PIXEL_FORMAT_NV12, usage, &mGfxHandle, &stride) != 0)
return ENCODE_DRIVER_FAIL;
- LOG_I("Create an new gfx buffer handle 0x%p for color convert, width=%d, height=%d, stride=%d\n",
+ LOG_V("Create an new gfx buffer handle 0x%p for color convert, width=%d, height=%d, stride=%d\n",
mGfxHandle, width, height, stride);
}
@@ -355,7 +355,7 @@ Encode_Status VASurfaceMap::doMapping() {
//map new gfx handle to vasurface
ret = MappingGfxHandle((intptr_t)mGfxHandle);
CHECK_ENCODE_STATUS_RETURN("MappingGfxHandle");
- LOGI("map new allocated gfx handle to vaSurface\n");
+ LOGV("map new allocated gfx handle to vaSurface\n");
} else
#endif
{
@@ -388,7 +388,7 @@ Encode_Status VASurfaceMap::MappingToVASurface() {
LOG_I("VASurface is already set before, nothing to do here\n");
return ENCODE_SUCCESS;
}
- LOG_I("MappingToVASurface mode=%d, value=%p\n", mVinfo.mode, (void*)mValue);
+ LOG_V("MappingToVASurface mode=%d, value=%p\n", mVinfo.mode, (void*)mValue);
const char *mode = NULL;
switch (mVinfo.mode) {
@@ -418,8 +418,8 @@ Encode_Status VASurfaceMap::MappingToVASurface() {
return ENCODE_NOT_SUPPORTED;
}
- LOG_I("%s: Format=%x, lumaStride=%d, width=%d, height=%d\n", mode, mVinfo.format, mVinfo.lumaStride, mVinfo.width, mVinfo.height);
- LOG_I("vaSurface 0x%08x is created for value = 0x%p\n", mVASurface, (void*)mValue);
+ LOG_V("%s: Format=%x, lumaStride=%d, width=%d, height=%d\n", mode, mVinfo.format, mVinfo.lumaStride, mVinfo.width, mVinfo.height);
+ LOG_V("vaSurface 0x%08x is created for value = 0x%p\n", mVASurface, (void*)mValue);
return ret;
}
@@ -445,10 +445,10 @@ Encode_Status VASurfaceMap::MappingSurfaceID(intptr_t value) {
&lumaOffset, &chromaUOffset, &chromaVOffset, &kBufHandle, NULL);
CHECK_VA_STATUS_RETURN("vaLockSurface");
- LOG_I("Surface incoming = 0x%p\n", (void*)value);
- LOG_I("lumaStride = %d, chromaUStride = %d, chromaVStride=%d\n", lumaStride, chromaUStride, chromaVStride);
- LOG_I("lumaOffset = %d, chromaUOffset = %d, chromaVOffset = %d\n", lumaOffset, chromaUOffset, chromaVOffset);
- LOG_I("kBufHandle = 0x%08x, fourCC = %d\n", kBufHandle, fourCC);
+ LOG_V("Surface incoming = 0x%p\n", (void*)value);
+ LOG_V("lumaStride = %d, chromaUStride = %d, chromaVStride=%d\n", lumaStride, chromaUStride, chromaVStride);
+ LOG_V("lumaOffset = %d, chromaUOffset = %d, chromaVOffset = %d\n", lumaOffset, chromaUOffset, chromaVOffset);
+ LOG_V("kBufHandle = 0x%08x, fourCC = %d\n", kBufHandle, fourCC);
vaStatus = vaUnlockSurface((VADisplay)mVinfo.handle, (VASurfaceID)value);
CHECK_VA_STATUS_RETURN("vaUnlockSurface");
@@ -468,8 +468,8 @@ Encode_Status VASurfaceMap::MappingSurfaceID(intptr_t value) {
Encode_Status VASurfaceMap::MappingGfxHandle(intptr_t value) {
- LOG_I("MappingGfxHandle %p......\n", (void*)value);
- LOG_I("format = 0x%08x, lumaStride = %d in ValueInfo\n", mVinfo.format, mVinfo.lumaStride);
+ LOG_V("MappingGfxHandle %p......\n", (void*)value);
+ LOG_V("format = 0x%08x, lumaStride = %d in ValueInfo\n", mVinfo.format, mVinfo.lumaStride);
//default value for all HW platforms, maybe not accurate
mVASurfaceWidth = mVinfo.width;
@@ -487,7 +487,7 @@ Encode_Status VASurfaceMap::MappingGfxHandle(intptr_t value) {
mVASurfaceStride = tmp.lumaStride;
#endif
- LOG_I("Mapping vasurface Width=%d, Height=%d, Stride=%d\n", mVASurfaceWidth, mVASurfaceHeight, mVASurfaceStride);
+ LOG_V("Mapping vasurface Width=%d, Height=%d, Stride=%d\n", mVASurfaceWidth, mVASurfaceHeight, mVASurfaceStride);
ValueInfo vinfo;
memset(&vinfo, 0, sizeof(ValueInfo));
@@ -504,7 +504,7 @@ Encode_Status VASurfaceMap::MappingGfxHandle(intptr_t value) {
Encode_Status VASurfaceMap::MappingKbufHandle(intptr_t value) {
- LOG_I("MappingKbufHandle value=%p\n", (void*)value);
+ LOG_V("MappingKbufHandle value=%p\n", (void*)value);
mVinfo.size = mVinfo.lumaStride * mVinfo.height * 1.5;
mVASurface = CreateSurfaceFromExternalBuf(value, mVinfo);
@@ -540,15 +540,15 @@ Encode_Status VASurfaceMap::doActionCopy() {
uint8_t *pSrcBuffer, *pDestBuffer;
intptr_t handle = 0;
- LOG_I("Copying Src Buffer data to VASurface\n");
+ LOG_V("Copying Src Buffer data to VASurface\n");
if (mVinfo.mode != MEM_MODE_MALLOC && mVinfo.mode != MEM_MODE_GFXHANDLE) {
LOG_E("Not support copy in mode %d", mVinfo.mode);
return ENCODE_NOT_SUPPORTED;
}
- LOG_I("Src Buffer information\n");
- LOG_I("Mode = %d, width = %d, stride = %d, height = %d\n",
+ LOG_V("Src Buffer information\n");
+ LOG_V("Mode = %d, width = %d, stride = %d, height = %d\n",
mVinfo.mode, mVinfo.width, mVinfo.lumaStride, mVinfo.height);
uint32_t srcY_offset, srcUV_offset;
@@ -612,14 +612,14 @@ Encode_Status VASurfaceMap::doActionCopy() {
vaStatus = vaMapBuffer(mVADisplay, destImage.buf, (void **)&pDestBuffer);
CHECK_VA_STATUS_RETURN("vaMapBuffer");
- LOG_I("\nDest VASurface information\n");
- LOG_I("pitches[0] = %d\n", destImage.pitches[0]);
- LOG_I("pitches[1] = %d\n", destImage.pitches[1]);
- LOG_I("offsets[0] = %d\n", destImage.offsets[0]);
- LOG_I("offsets[1] = %d\n", destImage.offsets[1]);
- LOG_I("num_planes = %d\n", destImage.num_planes);
- LOG_I("width = %d\n", destImage.width);
- LOG_I("height = %d\n", destImage.height);
+ LOG_V("\nDest VASurface information\n");
+ LOG_V("pitches[0] = %d\n", destImage.pitches[0]);
+ LOG_V("pitches[1] = %d\n", destImage.pitches[1]);
+ LOG_V("offsets[0] = %d\n", destImage.offsets[0]);
+ LOG_V("offsets[1] = %d\n", destImage.offsets[1]);
+ LOG_V("num_planes = %d\n", destImage.num_planes);
+ LOG_V("width = %d\n", destImage.width);
+ LOG_V("height = %d\n", destImage.height);
if (width > destImage.width || height > destImage.height) {
LOG_E("src buffer is bigger than destination buffer\n");
@@ -658,7 +658,7 @@ Encode_Status VASurfaceMap::doActionCopy() {
gfx_unlock((buffer_handle_t) handle);
}
#endif
- LOG_I("Copying Src Buffer data to VASurface Complete\n");
+ LOG_V("Copying Src Buffer data to VASurface Complete\n");
return ENCODE_SUCCESS;
}
@@ -671,7 +671,7 @@ Encode_Status VASurfaceMap::doActionColConv() {
return ENCODE_FAIL;
}
- LOG_I("doActionColConv gfx_Blit width=%d, height=%d\n", mVinfo.width, mVinfo.height);
+ LOG_V("doActionColConv gfx_Blit width=%d, height=%d\n", mVinfo.width, mVinfo.height);
if (gfx_Blit((buffer_handle_t)mValue, mGfxHandle,
mVinfo.width, mVinfo.height, 0, 0) != 0)
return ENCODE_DRIVER_FAIL;