Loading include/camera/CameraParameters.h +19 −0 Original line number Diff line number Diff line Loading @@ -750,12 +750,26 @@ public: static const char SCENE_DETECT_ON[]; #endif static const char PIXEL_FORMAT_YUV422SP[]; #ifdef STE_HARDWARE static const char PIXEL_FORMAT_YUV420P[]; // YV12 #endif static const char PIXEL_FORMAT_YUV420SP[]; // NV21 #ifdef STE_HARDWARE static const char PIXEL_FORMAT_YUV420SPNV12[]; // NV12 #endif #ifdef QCOM_HARDWARE static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO #endif static const char PIXEL_FORMAT_YUV422I[]; // YUY2 #ifndef STE_HARDWARE static const char PIXEL_FORMAT_YUV420P[]; // YV12 #else static const char PIXEL_FORMAT_YVU422SP[]; static const char PIXEL_FORMAT_YVU422P[]; static const char PIXEL_FORMAT_YVU420SP[]; static const char PIXEL_FORMAT_YVU420P[]; static const char PIXEL_FORMAT_YUV420MB[]; #endif static const char PIXEL_FORMAT_RGB565[]; static const char PIXEL_FORMAT_RGBA8888[]; static const char PIXEL_FORMAT_JPEG[]; Loading Loading @@ -819,6 +833,11 @@ public: // other modes. static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; #ifdef STE_HARDWARE // keys for record stride and slice height static const char KEY_RECORD_STRIDE[]; static const char KEY_RECORD_SLICE_HEIGHT[]; #endif #ifdef QCOM_HARDWARE static const char FOCUS_MODE_CONTINUOUS_CAMERA[]; Loading include/gui/SurfaceTexture.h +57 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ #include <utils/Vector.h> #include <utils/threads.h> #ifdef STE_HARDWARE #include <hardware/copybit.h> #endif #define ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID "mSurfaceTexture" namespace android { Loading @@ -47,6 +50,9 @@ public: }; enum { NUM_BUFFER_SLOTS = 32 }; enum { NO_CONNECTED_API = 0 }; #ifdef STE_HARDWARE enum { NUM_BLIT_BUFFER_SLOTS = 2 }; #endif struct FrameAvailableListener : public virtual RefBase { // onFrameAvailable() is called from queueBuffer() each time an Loading Loading @@ -136,12 +142,26 @@ public: // connected to the specified client API. virtual status_t disconnect(int api); #ifndef STE_HARDWARE // updateTexImage sets the image contents of the target texture to that of // the most recently queued buffer. // // This call may only be made while the OpenGL ES context to which the // target texture belongs is bound to the calling thread. status_t updateTexImage(bool isComposition = false); #else status_t updateTexImage(); // A surface that uses a non-native format requires conversion of // its buffers. This conversion can be deferred until the layer // based on this surface is drawn. status_t updateTexImage(bool deferConversion); // convert() performs the deferred texture conversion as scheduled // by updateTexImage(bool deferConversion). // The method returns immediately if no conversion is necessary. status_t convert(); #endif // setBufferCountServer set the buffer count. If the client has requested // a buffer count using setBufferCount, the server-buffer count will Loading Loading @@ -267,6 +287,13 @@ private: EGLImageKHR createImage(EGLDisplay dpy, const sp<GraphicBuffer>& graphicBuffer); #ifdef STE_HARDWARE // returns TRUE if buffer needs color format conversion bool conversionIsNeeded(const sp<GraphicBuffer>& graphicBuffer); // converts buffer to a suitable color format status_t convert(sp<GraphicBuffer> &srcBuf, sp<GraphicBuffer> &dstBuf); #endif status_t setBufferCountServerLocked(int bufferCount); // computeCurrentTransformMatrix computes the transform matrix for the Loading Loading @@ -516,6 +543,36 @@ private: // with the surface Texture. uint64_t mFrameCounter; #ifdef STE_HARDWARE // mBlitEngine is the handle to the copybit device which will be used in // case color transform is needed before the EGL image is created. copybit_device_t* mBlitEngine; // mBlitSlots contains several buffers which will // be rendered alternately in case color transform is needed (instead // of rendering the buffers in mSlots). BufferSlot mBlitSlots[NUM_BLIT_BUFFER_SLOTS]; // mNextBlitSlot is the index of the blitter buffer (in mBlitSlots) which // will be used in the next color transform. int mNextBlitSlot; // mConversionSrcSlot designates the slot where source buffer // for the last deferred updateTexImage is located. int mConversionSrcSlot; // mConversionBltSlot designates the slot where destination buffer // for the last deferred updateTexImage is located. int mConversionBltSlot; // mNeedsConversion indicates that a format conversion is necessary // before the layer based on this surface is drawn. // This flag is set whenever updateTexImage() with deferred conversion // is called. It is cleared once the layer is drawn, // or when updateTexImage() w/o deferred conversion is called. bool mNeedsConversion; #endif #ifdef QCOM_HARDWARE // s3dFormat is the S3D format specified by the client. int mS3DFormat; Loading include/media/stagefright/ColorConverter.h +4 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,10 @@ private: status_t convertQCOMYUV420SemiPlanar( const BitmapParams &src, const BitmapParams &dst); #ifdef STE_HARDWARE status_t convertSTEYUV420PackedSemiPlanarMB( const BitmapParams &src, const BitmapParams &dst); #endif status_t convertYUV420SemiPlanar( const BitmapParams &src, const BitmapParams &dst); Loading include/media/stagefright/MediaDefs.h +6 −0 Original line number Diff line number Diff line Loading @@ -27,8 +27,14 @@ extern const char *MEDIA_MIMETYPE_VIDEO_VPX; extern const char *MEDIA_MIMETYPE_VIDEO_AVC; extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4; extern const char *MEDIA_MIMETYPE_VIDEO_H263; #ifdef STE_HARDWARE extern const char *MEDIA_MIMETYPE_VIDEO_H263_SW; #endif extern const char *MEDIA_MIMETYPE_VIDEO_MPEG2; extern const char *MEDIA_MIMETYPE_VIDEO_RAW; #ifdef STE_HARDWARE extern const char *MEDIA_MIMETYPE_VIDEO_VC1; #endif extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB; extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB; Loading include/media/stagefright/OMXCodec.h +3 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,9 @@ private: kAvoidMemcopyInputRecordingFrames = 2048, kRequiresLargerEncoderOutputBuffer = 4096, kOutputBuffersAreUnreadable = 8192, #ifdef STE_HARDWARE kRequiresStoreMetaDataBeforeIdle = 16384, #endif #ifdef QCOM_HARDWARE kStoreMetaDataInInputVideoBuffers = 16384, kRequiresGlobalFlush = 0x20000000, // 2^29 Loading Loading
include/camera/CameraParameters.h +19 −0 Original line number Diff line number Diff line Loading @@ -750,12 +750,26 @@ public: static const char SCENE_DETECT_ON[]; #endif static const char PIXEL_FORMAT_YUV422SP[]; #ifdef STE_HARDWARE static const char PIXEL_FORMAT_YUV420P[]; // YV12 #endif static const char PIXEL_FORMAT_YUV420SP[]; // NV21 #ifdef STE_HARDWARE static const char PIXEL_FORMAT_YUV420SPNV12[]; // NV12 #endif #ifdef QCOM_HARDWARE static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO #endif static const char PIXEL_FORMAT_YUV422I[]; // YUY2 #ifndef STE_HARDWARE static const char PIXEL_FORMAT_YUV420P[]; // YV12 #else static const char PIXEL_FORMAT_YVU422SP[]; static const char PIXEL_FORMAT_YVU422P[]; static const char PIXEL_FORMAT_YVU420SP[]; static const char PIXEL_FORMAT_YVU420P[]; static const char PIXEL_FORMAT_YUV420MB[]; #endif static const char PIXEL_FORMAT_RGB565[]; static const char PIXEL_FORMAT_RGBA8888[]; static const char PIXEL_FORMAT_JPEG[]; Loading Loading @@ -819,6 +833,11 @@ public: // other modes. static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; #ifdef STE_HARDWARE // keys for record stride and slice height static const char KEY_RECORD_STRIDE[]; static const char KEY_RECORD_SLICE_HEIGHT[]; #endif #ifdef QCOM_HARDWARE static const char FOCUS_MODE_CONTINUOUS_CAMERA[]; Loading
include/gui/SurfaceTexture.h +57 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ #include <utils/Vector.h> #include <utils/threads.h> #ifdef STE_HARDWARE #include <hardware/copybit.h> #endif #define ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID "mSurfaceTexture" namespace android { Loading @@ -47,6 +50,9 @@ public: }; enum { NUM_BUFFER_SLOTS = 32 }; enum { NO_CONNECTED_API = 0 }; #ifdef STE_HARDWARE enum { NUM_BLIT_BUFFER_SLOTS = 2 }; #endif struct FrameAvailableListener : public virtual RefBase { // onFrameAvailable() is called from queueBuffer() each time an Loading Loading @@ -136,12 +142,26 @@ public: // connected to the specified client API. virtual status_t disconnect(int api); #ifndef STE_HARDWARE // updateTexImage sets the image contents of the target texture to that of // the most recently queued buffer. // // This call may only be made while the OpenGL ES context to which the // target texture belongs is bound to the calling thread. status_t updateTexImage(bool isComposition = false); #else status_t updateTexImage(); // A surface that uses a non-native format requires conversion of // its buffers. This conversion can be deferred until the layer // based on this surface is drawn. status_t updateTexImage(bool deferConversion); // convert() performs the deferred texture conversion as scheduled // by updateTexImage(bool deferConversion). // The method returns immediately if no conversion is necessary. status_t convert(); #endif // setBufferCountServer set the buffer count. If the client has requested // a buffer count using setBufferCount, the server-buffer count will Loading Loading @@ -267,6 +287,13 @@ private: EGLImageKHR createImage(EGLDisplay dpy, const sp<GraphicBuffer>& graphicBuffer); #ifdef STE_HARDWARE // returns TRUE if buffer needs color format conversion bool conversionIsNeeded(const sp<GraphicBuffer>& graphicBuffer); // converts buffer to a suitable color format status_t convert(sp<GraphicBuffer> &srcBuf, sp<GraphicBuffer> &dstBuf); #endif status_t setBufferCountServerLocked(int bufferCount); // computeCurrentTransformMatrix computes the transform matrix for the Loading Loading @@ -516,6 +543,36 @@ private: // with the surface Texture. uint64_t mFrameCounter; #ifdef STE_HARDWARE // mBlitEngine is the handle to the copybit device which will be used in // case color transform is needed before the EGL image is created. copybit_device_t* mBlitEngine; // mBlitSlots contains several buffers which will // be rendered alternately in case color transform is needed (instead // of rendering the buffers in mSlots). BufferSlot mBlitSlots[NUM_BLIT_BUFFER_SLOTS]; // mNextBlitSlot is the index of the blitter buffer (in mBlitSlots) which // will be used in the next color transform. int mNextBlitSlot; // mConversionSrcSlot designates the slot where source buffer // for the last deferred updateTexImage is located. int mConversionSrcSlot; // mConversionBltSlot designates the slot where destination buffer // for the last deferred updateTexImage is located. int mConversionBltSlot; // mNeedsConversion indicates that a format conversion is necessary // before the layer based on this surface is drawn. // This flag is set whenever updateTexImage() with deferred conversion // is called. It is cleared once the layer is drawn, // or when updateTexImage() w/o deferred conversion is called. bool mNeedsConversion; #endif #ifdef QCOM_HARDWARE // s3dFormat is the S3D format specified by the client. int mS3DFormat; Loading
include/media/stagefright/ColorConverter.h +4 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,10 @@ private: status_t convertQCOMYUV420SemiPlanar( const BitmapParams &src, const BitmapParams &dst); #ifdef STE_HARDWARE status_t convertSTEYUV420PackedSemiPlanarMB( const BitmapParams &src, const BitmapParams &dst); #endif status_t convertYUV420SemiPlanar( const BitmapParams &src, const BitmapParams &dst); Loading
include/media/stagefright/MediaDefs.h +6 −0 Original line number Diff line number Diff line Loading @@ -27,8 +27,14 @@ extern const char *MEDIA_MIMETYPE_VIDEO_VPX; extern const char *MEDIA_MIMETYPE_VIDEO_AVC; extern const char *MEDIA_MIMETYPE_VIDEO_MPEG4; extern const char *MEDIA_MIMETYPE_VIDEO_H263; #ifdef STE_HARDWARE extern const char *MEDIA_MIMETYPE_VIDEO_H263_SW; #endif extern const char *MEDIA_MIMETYPE_VIDEO_MPEG2; extern const char *MEDIA_MIMETYPE_VIDEO_RAW; #ifdef STE_HARDWARE extern const char *MEDIA_MIMETYPE_VIDEO_VC1; #endif extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB; extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB; Loading
include/media/stagefright/OMXCodec.h +3 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,9 @@ private: kAvoidMemcopyInputRecordingFrames = 2048, kRequiresLargerEncoderOutputBuffer = 4096, kOutputBuffersAreUnreadable = 8192, #ifdef STE_HARDWARE kRequiresStoreMetaDataBeforeIdle = 16384, #endif #ifdef QCOM_HARDWARE kStoreMetaDataInInputVideoBuffers = 16384, kRequiresGlobalFlush = 0x20000000, // 2^29 Loading