android h264 hardware encoding
cee1
fykcee1 at gmail.com
Tue Oct 22 06:00:48 CEST 2013
2013/10/22 cee1 <fykcee1 at gmail.com>:
> It reported two supported color formats:
> * 2130706688: that is COLOR_TI_FormatYUV420PackedSemiPlanar
> * 7f000789: that is COLOR_FormatAndroidOpaque
>
> Non of them is supported by gstamcvideoencoder yet.
Sorry, I lied.
The color format COLOR_TI_FormatYUV420PackedSemiPlanar may work with a
input width which can be divided exactly by 4.
The original problem is:
a) In generating caps of encoder's sink_pad,
COLOR_TI_FormatYUV420PackedSemiPlanar is mapped to
GST_VIDEO_FORMAT_NV12 by gst_amc_color_format_to_video_format.
b) In set_format() GST_VIDEO_FORMAT_NV12 is mapped back to
COLOR_FormatYUV420SemiPlanar by gst_amc_video_format_to_color_format.
c) The value of COLOR_FormatYUV420SemiPlanar is 21, which is not
recognized by media codec configuration routine.
You may modify gstamc.c:
static const struct
{
gint color_format;
GstVideoFormat video_format;
} color_format_mapping_table[] = {
{
COLOR_FormatYUV420Planar, GST_VIDEO_FORMAT_I420}, {
COLOR_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_TI_FormatYUV420PackedSemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced, GST_VIDEO_FORMAT_NV12}, {
COLOR_QCOM_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka, GST_VIDEO_FORMAT_NV12}
};
Move COLOR_TI_FormatYUV420PackedSemiPlanar up to make it as the first
mapping to GST_VIDEO_FORMAT_NV12.
Then let's see whether it works.
--
Regards,
- cee1
More information about the gstreamer-devel
mailing list