summaryrefslogtreecommitdiffstats
path: root/libvideoeditor/vss
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2011-08-05 17:52:45 +0800
committerChih-Chung Chang <chihchung@google.com>2011-08-08 18:11:04 +0800
commit2aa01fd002bba1dde45791c1138c1f71a8d0aa53 (patch)
treedfa99a4f4d0a709a43a9b1b9cc83802c28f48f47 /libvideoeditor/vss
parent43fcc396614a587851e2b7c4cea2876ec58b8648 (diff)
downloadframeworks_av-2aa01fd002bba1dde45791c1138c1f71a8d0aa53.zip
frameworks_av-2aa01fd002bba1dde45791c1138c1f71a8d0aa53.tar.gz
frameworks_av-2aa01fd002bba1dde45791c1138c1f71a8d0aa53.tar.bz2
Rename YV12 to I420.
Change-Id: I453b7044bf46950ef67091f3417ed3e6a65086a0
Diffstat (limited to 'libvideoeditor/vss')
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/inc/VideoEditorVideoDecoder_internal.h4
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp18
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp26
3 files changed, 24 insertions, 24 deletions
diff --git a/libvideoeditor/vss/stagefrightshells/inc/VideoEditorVideoDecoder_internal.h b/libvideoeditor/vss/stagefrightshells/inc/VideoEditorVideoDecoder_internal.h
index 55d536d..9be6cbd 100755
--- a/libvideoeditor/vss/stagefrightshells/inc/VideoEditorVideoDecoder_internal.h
+++ b/libvideoeditor/vss/stagefrightshells/inc/VideoEditorVideoDecoder_internal.h
@@ -35,7 +35,7 @@
#include "M4OSA_Semaphore.h"
#include "VideoEditorBuffer.h"
#include "M4VD_Tools.h"
-#include "YV12ColorConverter.h"
+#include "I420ColorConverter.h"
#include <utils/RefBase.h>
#include <android/rect.h>
@@ -112,7 +112,7 @@ typedef struct {
M4OSA_Int32 mGivenWidth, mGivenHeight; //Used in case of
//INFO_FORMAT_CHANGED
ARect mCropRect; // These are obtained from kKeyCropRect.
- YV12ColorConverter* mYV12ColorConverter;
+ I420ColorConverter* mI420ColorConverter;
} VideoEditorVideoDecoder_Context;
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
index 42cfa65..3447c2c 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
@@ -788,7 +788,7 @@ M4OSA_ERR VideoEditorVideoDecoder_destroy(M4OSA_Context pContext) {
VIDEOEDITOR_CHECK(M4OSA_NULL != pContext, M4ERR_PARAMETER);
// Release the color converter
- delete pDecShellContext->mYV12ColorConverter;
+ delete pDecShellContext->mI420ColorConverter;
// Destroy the graph
if( pDecShellContext->mVideoDecoder != NULL ) {
@@ -943,14 +943,14 @@ M4OSA_ERR VideoEditorVideoDecoder_create(M4OSA_Context *pContext,
pDecShellContext->m_pVideoStreamhandler->m_videoHeight);
// Get the color converter
- pDecShellContext->mYV12ColorConverter = new YV12ColorConverter;
- if (pDecShellContext->mYV12ColorConverter->isLoaded()) {
- decoderOutput = pDecShellContext->mYV12ColorConverter->getDecoderOutputFormat();
+ pDecShellContext->mI420ColorConverter = new I420ColorConverter;
+ if (pDecShellContext->mI420ColorConverter->isLoaded()) {
+ decoderOutput = pDecShellContext->mI420ColorConverter->getDecoderOutputFormat();
}
if (decoderOutput == OMX_COLOR_FormatYUV420Planar) {
- delete pDecShellContext->mYV12ColorConverter;
- pDecShellContext->mYV12ColorConverter = NULL;
+ delete pDecShellContext->mI420ColorConverter;
+ pDecShellContext->mI420ColorConverter = NULL;
}
LOGI("decoder output format = 0x%X\n", decoderOutput);
@@ -1412,14 +1412,14 @@ M4OSA_ERR VideoEditorVideoDecoder_decode(M4OSA_Context context,
break;
}
default:
- if (pDecShellContext->mYV12ColorConverter) {
- if (pDecShellContext->mYV12ColorConverter->convertDecoderOutputToYV12(
+ if (pDecShellContext->mI420ColorConverter) {
+ if (pDecShellContext->mI420ColorConverter->convertDecoderOutputToI420(
(uint8_t *)pDecoderBuffer->data(),// ?? + pDecoderBuffer->range_offset(), // decoderBits
pDecShellContext->mGivenWidth, // decoderWidth
pDecShellContext->mGivenHeight, // decoderHeight
pDecShellContext->mCropRect, // decoderRect
tmpDecBuffer->pData /* dstBits */) < 0) {
- LOGE("convertDecoderOutputToYV12 failed");
+ LOGE("convertDecoderOutputToI420 failed");
}
} else {
LOGW("VideoDecoder_decode: unexpected color format 0x%X",
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp
index c05aa41..abfd16b 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp
@@ -29,7 +29,7 @@
#include "M4SYS_AccessUnit.h"
#include "VideoEditorVideoEncoder.h"
#include "VideoEditorUtils.h"
-#include <YV12ColorConverter.h>
+#include <I420ColorConverter.h>
#include "utils/Log.h"
#include "utils/Vector.h"
@@ -455,7 +455,7 @@ typedef struct {
sp<MediaSource> mEncoder;
OMX_COLOR_FORMATTYPE mEncoderColorFormat;
VideoEditorVideoEncoderPuller* mPuller;
- YV12ColorConverter* mYV12ColorConverter;
+ I420ColorConverter* mI420ColorConverter;
uint32_t mNbInputFrames;
double mFirstInputCts;
@@ -628,13 +628,13 @@ M4OSA_ERR VideoEditorVideoEncoder_init(M4ENCODER_Format format,
pEncoderContext->mPuller = NULL;
// Get color converter and determine encoder input format
- pEncoderContext->mYV12ColorConverter = new YV12ColorConverter;
- if (pEncoderContext->mYV12ColorConverter->isLoaded()) {
- encoderInput = pEncoderContext->mYV12ColorConverter->getEncoderInputFormat();
+ pEncoderContext->mI420ColorConverter = new I420ColorConverter;
+ if (pEncoderContext->mI420ColorConverter->isLoaded()) {
+ encoderInput = pEncoderContext->mI420ColorConverter->getEncoderInputFormat();
}
if (encoderInput == OMX_COLOR_FormatYUV420Planar) {
- delete pEncoderContext->mYV12ColorConverter;
- pEncoderContext->mYV12ColorConverter = NULL;
+ delete pEncoderContext->mI420ColorConverter;
+ pEncoderContext->mI420ColorConverter = NULL;
}
pEncoderContext->mEncoderColorFormat = (OMX_COLOR_FORMATTYPE)encoderInput;
LOGI("encoder input format = 0x%X\n", encoderInput);
@@ -704,8 +704,8 @@ M4OSA_ERR VideoEditorVideoEncoder_close(M4ENCODER_Context pContext) {
delete pEncoderContext->mPuller;
pEncoderContext->mPuller = NULL;
- delete pEncoderContext->mYV12ColorConverter;
- pEncoderContext->mYV12ColorConverter = NULL;
+ delete pEncoderContext->mI420ColorConverter;
+ pEncoderContext->mI420ColorConverter = NULL;
// Set the new state
pEncoderContext->mState = CREATED;
@@ -928,8 +928,8 @@ M4OSA_ERR VideoEditorVideoEncoder_processInputBuffer(
VIDEOEDITOR_CHECK(M4NO_ERROR == err, err);
// Convert MediaBuffer to the encoder input format if necessary
- if (pEncoderContext->mYV12ColorConverter) {
- YV12ColorConverter* converter = pEncoderContext->mYV12ColorConverter;
+ if (pEncoderContext->mI420ColorConverter) {
+ I420ColorConverter* converter = pEncoderContext->mI420ColorConverter;
int actualWidth = pEncoderContext->mCodecParams->FrameWidth;
int actualHeight = pEncoderContext->mCodecParams->FrameHeight;
@@ -944,13 +944,13 @@ M4OSA_ERR VideoEditorVideoEncoder_processInputBuffer(
MediaBuffer* newBuffer = new MediaBuffer(encoderBufferSize);
- if (converter->convertYV12ToEncoderInput(
+ if (converter->convertI420ToEncoderInput(
pData, // srcBits
actualWidth, actualHeight,
encoderWidth, encoderHeight,
encoderRect,
(uint8_t*)newBuffer->data() + newBuffer->range_offset()) < 0) {
- LOGE("convertYV12ToEncoderInput failed");
+ LOGE("convertI420ToEncoderInput failed");
}
// switch to new buffer