Zhao Halley [Sat, 20 Apr 2013 07:54:16 +0000 (15:54 +0800)]
Refine code for seek fix
1. There are 'try_again' in two level
The 1st one is (condition wait) wake up when a surface is available,
in gstvaapidecode.c
The 2nd one is (potentially) 'try_again' for the first time decode_step()
when asking for a decoded video surface (gst_vaapi_decoder_get_surface).
in gstvaapidecoder.c
2. The 1st one pass 'try_again' to the second one, not reverse. So:
The 1st one needn't pass address of 'try_again' to the 2nd one.
The 2nd one needn't check GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE to
set 'try_again'. it's the 1st's role and responsibility.
Zhao Halley [Sat, 20 Apr 2013 07:35:53 +0000 (15:35 +0800)]
Update fix for seek
1. Use GST_EVENT_FLUSH_START to help decoder escape from waiting for
an availabe surface; correspondingly, GST_EVENT_FLUSH_STOP disables
such special exception.
2. Remove such escape by GST_STATE_CHANGE_PAUSED_TO_READY
during seek, the status/event happens as following order:
GST_STATE_CHANGE_PLAYING_TO_PAUSED -> GST_EVENT_FLUSH_START ->
GST_EVENT_FLUSH_STOP -> GST_STATE_CHANGE_PAUSED_TO_PLAYING
3. Remove such escape by GST_EVENT_EOS.
EOS is the symptom caused by no surface available, not the reason.
I'm afraid the original code will miss some frames if EOS comes
earlier than decoder finishes decoding the sent data.
Zhao Halley [Fri, 19 Apr 2013 11:06:51 +0000 (19:06 +0800)]
defunc _buffer_alloc when direct_rendering is not supported
When SW decoder request buffer to write to avoid additional memory copy,
it is NOT ok when SW decoder and HW renering have different stride for
the same video frame size (direct_rendering=0).
Zhao Halley [Fri, 19 Apr 2013 08:10:22 +0000 (16:10 +0800)]
Fix memory leak when doing YUV data upload
Indirect set surface to video buffer will leak memory,
- when video buffer is destroy, the surface is not returned back to surface pool.
- gst_vaapi_video_buffer_set_surface_from_pool() is correct,
- while the following is incorrect:
surface = gst_vaapi_video_pool_get_object(priv->surfaces);
gst_vaapi_video_buffer_set_surface(vbuffer, surface);
Zhao Halley [Thu, 18 Apr 2013 11:49:42 +0000 (19:49 +0800)]
do more check in _set_caps of vaapisink when _buffer_alloc is not called
in webkit video ogg stream, _buffer_alloc isn't called,
do more check in _set_caps to initialized image/surface pool
for uploading raw yuv frame to vaSurface
Wind Yuan [Thu, 18 Apr 2013 07:16:57 +0000 (15:16 +0800)]
change gstreamer-codecparser to git://gitorious.org/gst-plugins-vaapi/gstreamer-codecparsers.git
Gwenole Beauchesne [Tue, 20 Nov 2012 17:21:41 +0000 (18:21 +0100)]
vaapiupload: reset direct-rendering to zero when changing caps.
Make sure to reset direct-rendering flag to zero when caps are changed,
and only derive it to one when the next checks succeed.
Gwenole Beauchesne [Tue, 20 Nov 2012 13:42:24 +0000 (14:42 +0100)]
vaapiupload: fix sink caps to report the supported set of YUV caps.
Try to allocate the GstVaapiUploader helper object prior to listing the
supported image formats. Otherwise, only a single generic caps is output
with no particular pixel format referenced in there.
Zhao Halley [Tue, 20 Nov 2012 13:32:40 +0000 (14:32 +0100)]
vaapiupload: use new GstVaapiUploader helper.
Use GstVaapiUploader helper that automatically handles direct rendering
mode, thus making the "direct-rendering" property obsolete and hence it
is now removed.
The "direct-rendering" level 2, i.e. exposing VA surface buffers, was never
really well supported and it could actually trigger degraded performance.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Tue, 20 Nov 2012 14:50:56 +0000 (15:50 +0100)]
vaapisink: compute and expose the supported set of YUV caps.
Make vaapisink expose only the set of supported caps for raw YUV buffers.
Add gst_vaapi_uploader_get_caps() helper function to determine the set
of supported YUV caps as source (for images). This function actually
tries to zero and upload each image to a 64x64 test surface. Of course,
this relies on VA drivers to not claim success if vaPutImage() is not
correctly supported.
Gwenole Beauchesne [Tue, 20 Nov 2012 13:28:55 +0000 (14:28 +0100)]
vaapisink: add support for raw YUV buffers.
Add new GstVaapiUploader helper to upload raw YUV buffers to VA surfaces.
It is up to the caller to negotiate source caps (for images) and output
caps (for surfaces). gst_vaapi_uploader_has_direct_rendering() is available
to help decide between the creation of a GstVaapiVideoBuffer or a regular
GstBuffer on sink pads.
Signed-off-by: Zhao Halley <halley.zhao@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Zhao Halley [Mon, 18 Mar 2013 09:14:48 +0000 (17:14 +0800)]
implemented Tizen customized message 'prepare-xid' for webkit-efl
- it is similar to 'prepare-xwindow-id' message
- with additional information required from app side (for pixmap creation):
video-width, video-height, display-width, display-height
Zhao Halley [Mon, 18 Mar 2013 09:10:31 +0000 (17:10 +0800)]
support renders to Pixmap for vaapisink
- supports render to Pixmap for vaapisink
- supports multiple Pixmap with an array in vaapisink
- add 'is-pixmap' attribute to vaapisink
- reset sink->window when _stop
Zhao Halley [Mon, 15 Apr 2013 01:16:39 +0000 (09:16 +0800)]
Add configure options for jpeg/mpeg4
some platforms may or may not support jpeg/mpeg4 decoder,
add configure options for these feature
Li Xiaowei [Tue, 16 Apr 2013 00:24:29 +0000 (08:24 +0800)]
Add RGB surface allocation supporting
Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
Zhong Cong [Tue, 9 Apr 2013 08:33:03 +0000 (16:33 +0800)]
vaapidecode: fix surface timeout error
Wind Yuan [Mon, 1 Apr 2013 08:38:59 +0000 (16:38 +0800)]
compile: getenv need header of stdlib.h
64-bit system need include <stdlib.h> first
Zhao Halley [Mon, 1 Apr 2013 02:22:45 +0000 (10:22 +0800)]
add help scripts set-vaapi-env.sh for build vaapi packages
Wind Yuan [Fri, 15 Mar 2013 08:52:51 +0000 (16:52 +0800)]
h264encoder: sps and pps settings
Wind Yuan [Fri, 15 Mar 2013 07:48:38 +0000 (15:48 +0800)]
h264encoder: calculate level_idc according pic size
Wind Yuan [Wed, 9 Jan 2013 02:02:11 +0000 (10:02 +0800)]
encoder: simplify gst_vaapi_encoder buffer ref_count
Prepare for other buffer types support, make buffer check simple
Wind Yuan [Mon, 24 Dec 2012 02:19:01 +0000 (10:19 +0800)]
encoder: split another thread to do encoded buffer wrapper
mmap driver buffer and scanning may cost long time,
these actions better to be done in another thread
Wind Yuan [Fri, 16 Nov 2012 05:07:27 +0000 (13:07 +0800)]
encoder: reduce locks and extract rendering function
some locks in gstvaapiencoder is not quite necessary
Wind Yuan [Thu, 14 Mar 2013 05:45:20 +0000 (13:45 +0800)]
vaapidownload: fix frame rate to avoid assert issue in set_caps
Wind Yuan [Wed, 13 Mar 2013 09:44:52 +0000 (17:44 +0800)]
vaapidownload: fix src caps format error
zhongcong [Thu, 14 Mar 2013 09:31:00 +0000 (17:31 +0800)]
mpeg2: fix set quant_table to driver error
Li Xiaowei [Wed, 30 Jan 2013 06:21:36 +0000 (14:21 +0800)]
support H264 monochroma stream decoding
one workaround to help YUV400 pass the chroma
type check, actually the render surface is still set to
YUV420 mandatorily and the UV components are ignored.
Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
Wind Yuan [Thu, 28 Feb 2013 07:26:36 +0000 (15:26 +0800)]
h264: support process for gaps in frame_num
Follow 8.2.5.2 when frame_num is not equeal to
PreRefFrameNum and is not equal to
(PreRefFrameNum+1)%MaxFrameNum, there would be
"non-existing" picture "used for short-term reference".
Wind Yuan [Thu, 28 Feb 2013 08:06:13 +0000 (16:06 +0800)]
h264: remove reference if picture frame_num is same
Wind Yuan [Wed, 30 Jan 2013 05:23:03 +0000 (13:23 +0800)]
h264: fix reference list count less than num_ref
Sometimes RefPicListX_count may be less than num_ref_idx_lX.
There's not enough reference pictures in dpb.
Wind Yuan [Fri, 30 Nov 2012 05:09:40 +0000 (13:09 +0800)]
h264: clear buffers on GST_EVENT_FLUSH_STOP
Change-Id: I4a9978a50bc6f6011f3ca037b9b9e8b295369b86
Wind Yuan [Wed, 5 Dec 2012 07:04:25 +0000 (15:04 +0800)]
mpeg2: clear buffers and PTSGenerator on GST_EVENT_FLUSH_STOP
Change-Id: I7f7561805f9efd1513d5f1a04308c2b39ce986c8
Wind Yuan [Fri, 30 Nov 2012 05:06:10 +0000 (13:06 +0800)]
vaapidecode: support seek actions
vaapidecode need clear all decoder's buffers when
GST_EVENT_FLUSH_STOP/GST_EVENT_NEWSEGMENT happened
Change-Id: I83606f6b619c4501b43bf868bc92787b670fab88
Gwenole Beauchesne [Tue, 5 Feb 2013 13:03:39 +0000 (14:03 +0100)]
codecparsers: update to gst-vaapi-branch commit b8efe57.
b8efe57 mpeg2: add helpers to convert quantization matrices
f8c2672 mpeg2: store quantization matrices in zigzag-order
Wind Yuan [Wed, 23 Jan 2013 02:31:30 +0000 (10:31 +0800)]
rate_control: compatible with old libva versions
Zhong Cong [Wed, 16 Jan 2013 06:17:50 +0000 (14:17 +0800)]
vaapipostproc: warn when framerate failed to be parsed.
Zhong Cong [Mon, 24 Dec 2012 06:28:45 +0000 (14:28 +0800)]
modify the DEBUG function name "vaapi_encoder_dump_bytes" to "gst_vaapi_encoder_dump_bytes",because only symbols with the gst-vaapi_* prefix will be exported
Wind Yuan [Mon, 5 Nov 2012 07:34:24 +0000 (15:34 +0800)]
encoders: h263, mpeg4 change bitrate attributes to unit kbps
Wind Yuan [Mon, 5 Nov 2012 07:22:28 +0000 (15:22 +0800)]
h264encoder: implement bitrate control for CBR and VBR
Wind Yuan [Mon, 12 Nov 2012 09:04:07 +0000 (17:04 +0800)]
decoder context: rate_control unset to GST_VAAPI_RATECONTROL_NONE
Wind Yuan [Wed, 14 Nov 2012 08:35:48 +0000 (16:35 +0800)]
h264encoder: add rate-control attribute
encoder create context with special rate-control config
Wind Yuan [Fri, 2 Nov 2012 08:55:13 +0000 (16:55 +0800)]
vaapicontext: support rate-control attribute
encoder need rate-control on context creation
Wind Yuan [Thu, 1 Nov 2012 07:27:32 +0000 (15:27 +0800)]
encoder: h264 support multiple slices
Wind Yuan [Thu, 18 Oct 2012 09:58:04 +0000 (17:58 +0800)]
encoder: PVR only need seq paramerter set once
Wind Yuan [Tue, 25 Sep 2012 07:37:43 +0000 (15:37 +0800)]
configure.ac: check old/new h264 encoder API
Wind Yuan [Tue, 25 Sep 2012 05:31:51 +0000 (13:31 +0800)]
encoder: h264 compatible with old libva by macro HAVE_OLD_H264_ENCODER
Wind Yuan [Fri, 21 Sep 2012 09:03:35 +0000 (17:03 +0800)]
encoder: align formats to gstreamer code style
Wind Yuan [Thu, 20 Sep 2012 06:41:53 +0000 (14:41 +0800)]
encoder: reduce function parameters and change variable names
Wind Yuan [Thu, 2 Aug 2012 07:29:05 +0000 (03:29 -0400)]
encoders: remove encoders image upload and simplify parts code
Wind Yuan [Mon, 30 Jul 2012 07:34:55 +0000 (03:34 -0400)]
h264 encoder: worked in staging branch
Wind Yuan [Mon, 30 Jul 2012 02:03:08 +0000 (22:03 -0400)]
h264 encoder: compiling passed with libva staging branch
Wind Yuan [Fri, 20 Jul 2012 07:27:57 +0000 (03:27 -0400)]
encoder(h264,h263,mpeg4): changed styles, names
current h264 encoder works in branch of 'vaapiext' of libva/intel-driver in GEN platform.
other encoders(h263,mpeg4) only tested in pvr long ago.
encoder need be configured with '--enable-encoders' explicitly.
Wind Yuan [Thu, 21 Jun 2012 06:46:43 +0000 (14:46 +0800)]
h264encoder: auto-detect stream-format: avc/byte-stream by next linked-pad's caps
Wind Yuan [Wed, 18 Jan 2012 11:02:43 +0000 (19:02 +0800)]
fix compile issue after rebase
Wind Yuan [Thu, 22 Dec 2011 13:02:10 +0000 (21:02 +0800)]
add Intel Copyright
Wind Yuan [Thu, 22 Dec 2011 06:42:40 +0000 (14:42 +0800)]
compiling passed in for new vaapiencode
Wind Yuan [Tue, 29 Nov 2011 02:31:44 +0000 (10:31 +0800)]
change encoder log output format, support GST log
Wind Yuan [Mon, 28 Nov 2011 06:17:52 +0000 (01:17 -0500)]
support B frames
Wind Yuan [Wed, 23 Nov 2011 07:04:42 +0000 (02:04 -0500)]
Support h264encoder on SandyBridge platform(lots libva h264 encoding parameters changed)
Wind Yuan [Thu, 20 Oct 2011 07:24:30 +0000 (15:24 +0800)]
supports mpeg4 encoder
Wind Yuan [Thu, 13 Oct 2011 07:32:22 +0000 (15:32 +0800)]
change h264encoder.x to gstvaapih264encoder.x
Wind Yuan [Thu, 13 Oct 2011 07:17:54 +0000 (15:17 +0800)]
support h263 encoder(vah263encode) in mrst "gst-launch videotestsrc num-buffers=100 pattern=18 ! video/x-raw-yuv,format='(fourcc)'NV12,width=640,height=480,framerate=30/1 ! vaapiconvert ! vah263encode ! qtmux faststart=true ! filesink location=263.mp4"
Wind Yuan [Mon, 10 Oct 2011 02:24:02 +0000 (10:24 +0800)]
extract vaapiencoder structure to make other encoders possible
Wind Yuan [Fri, 30 Sep 2011 06:33:44 +0000 (14:33 +0800)]
support multiple h264 slices, auto calculate bitrate(=w*h*fps/4) add properties : min-qp, slice-num
Wind Yuan [Thu, 29 Sep 2011 14:08:26 +0000 (22:08 +0800)]
add properties in gsth264encode; profile, level,bitrate, intra-period, init-qp
Wind Yuan [Tue, 27 Sep 2011 05:24:05 +0000 (13:24 +0800)]
vah264encode co-work with vaapiconvert passed "gst-launch videotestsrc ! video/x-raw-yuv,format='(fourcc)'NV12,width=1280,height=720,framerate=30/1 ! vaapiconvert ! vah264encode ! fakesink"
Wind Yuan [Mon, 19 Sep 2011 01:47:36 +0000 (09:47 +0800)]
change h264encoder
Wind Yuan [Thu, 5 Jan 2012 03:17:33 +0000 (11:17 +0800)]
vaapiconvert: change direct-rendering=0 to vaPutImage and support YUY2 colorspace to vaImage
Wind Yuan [Thu, 22 Dec 2011 13:02:10 +0000 (21:02 +0800)]
add Intel Copyright
Wind Yuan [Thu, 22 Dec 2011 06:42:40 +0000 (14:42 +0800)]
compiling passed in 3.0 for vaapiencode
Wind Yuan [Thu, 22 Dec 2011 06:41:42 +0000 (14:41 +0800)]
vaapiconvert support multiple YUV colorspace
Wind Yuan [Fri, 9 Dec 2011 07:55:01 +0000 (15:55 +0800)]
Add FPS log print in vaapiencode
Wind Yuan [Wed, 7 Dec 2011 04:58:10 +0000 (12:58 +0800)]
Use config.h to vaapiencode
Wind Yuan [Tue, 6 Dec 2011 01:19:56 +0000 (20:19 -0500)]
add fps caculation macro
Wind Yuan [Mon, 5 Dec 2011 06:23:10 +0000 (01:23 -0500)]
support YUY2 convert to surface
Wind Yuan [Thu, 1 Dec 2011 18:07:31 +0000 (13:07 -0500)]
vaapiconvert: try directly copy buffer to derived surface first
Wind Yuan [Tue, 29 Nov 2011 02:31:44 +0000 (10:31 +0800)]
change encoder log output format, support GST log
Wind Yuan [Tue, 29 Nov 2011 02:31:02 +0000 (10:31 +0800)]
support multiple threads for vaapivideopool
Wind Yuan [Thu, 24 Nov 2011 08:35:09 +0000 (03:35 -0500)]
support raw-buffer directly converted to surface in vaapiconvert
Wind Yuan [Wed, 23 Nov 2011 07:01:30 +0000 (02:01 -0500)]
Add context API <gst_vaapi_context_get_surface_pool>
Wind Yuan [Mon, 19 Sep 2011 01:47:36 +0000 (09:47 +0800)]
add h264encoder
Wind Yuan [Wed, 12 Sep 2012 08:58:06 +0000 (04:58 -0400)]
caps: vaapi doesn't need framerate
Zhao,Halley [Mon, 22 Oct 2012 16:56:45 +0000 (00:56 +0800)]
fix typo do not create color-balance filter when not needed
Zhao Halley [Mon, 17 Sep 2012 08:25:52 +0000 (16:25 +0800)]
remove _get_caps for postproc srcpad caps will retrieve from pad template, suppress a gst warning
Zhao Halley [Fri, 14 Sep 2012 09:49:43 +0000 (17:49 +0800)]
add color balance support in vpp
hue/brightness/contrast/saturation
auto-brightness/auto-contrast/auto-saturation
Zhao Halley [Fri, 14 Sep 2012 09:44:20 +0000 (17:44 +0800)]
share property operation code between GstVaapiPostproc and GstVaapiPostprocess
Zhao Halley [Fri, 31 Aug 2012 09:13:25 +0000 (17:13 +0800)]
add vpp process in gstvaapipostproc
Zhao Halley [Wed, 12 Sep 2012 09:08:31 +0000 (17:08 +0800)]
add vpp process in gstvaapipostprocess
denoise, deinterlace, surface fromat conversion, scaling
Zhao Halley [Fri, 31 Aug 2012 07:57:44 +0000 (15:57 +0800)]
check vpp support in configure.ac
Zhao Halley [Wed, 12 Sep 2012 09:05:29 +0000 (17:05 +0800)]
Add new object GstVaapiPostProcess for post-processing
separate some enum from gstvaapipostproc to gstvaapipostprocess
Zhao Halley [Fri, 31 Aug 2012 06:59:48 +0000 (14:59 +0800)]
add fourcc for GstVaapiSurface
surface creation with dedicate fourcc is supported after VA API 0.34
legacy interface still works on lower version VA API
Zhao Halley [Tue, 8 Jan 2013 21:40:46 +0000 (05:40 +0800)]
h264: reset got_{sps,pps} when corrupted SPS/PPS headers are parsed.
Reset got_{sps,pps} when corrupted SPS/PPS headers are parsed. This means
that no frame will be decoded until valid SPS/PPS headers are parsed again.
This also prevents from parsing slice headers with invalid data, and avoids
potential crashes.
https://bugs.freedesktop.org/show_bug.cgi?id=57902
Gwenole Beauchesne [Wed, 23 Jan 2013 10:11:25 +0000 (11:11 +0100)]
vc1: handle CLOSED_ENTRY.
When CLOSED_ENTRY == 0, and if the B pictures that follow an entry-point
lack a reference anchor picture, these B pictures shall be discarded.
https://bugs.freedesktop.org/show_bug.cgi?id=59505
Wind Yuan [Fri, 11 Jan 2013 09:08:00 +0000 (17:08 +0800)]
vc1: fix decoding of WMV3 videos in AVI format.
The AVI demuxer (avidemux) does not set a proper "format" attribute
to the generated caps. So, try to recover the video codec format from
the "wmvversion" property instead.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Tue, 22 Jan 2013 12:28:13 +0000 (13:28 +0100)]
vc1: review and report errors accordingly.
Use GST_ERROR() to report real errors instead of hiding them into
GST_DEBUG().
Gwenole Beauchesne [Wed, 23 Jan 2013 09:25:52 +0000 (10:25 +0100)]
vc1: cope with latest codecparser changes.
Fix build with newer VC-1 codecparser where dqsbedge was renamed to
dqbedge, and now represents either DQSBEDGE or DQDBEDGE depending on
the actual value of DQPROFILE.
Gwenole Beauchesne [Fri, 25 Jan 2013 09:40:18 +0000 (10:40 +0100)]
codecparsers: update to gst-vaapi-branch commit 35053b8.
aeb898b vc1: fix bitplanes decoding (DIFF6 or NORM6 residual bytes)
63e3344 vc1: fix bitplanes decoding (DIFF6 or NORM6)
b0a9372 vc1: add API to parse slice headers
773f3d1 vc1: fix bitplanes decoding
870e083 vc1: simplify GstVC1VopDquant structure
bc0d65e vc1: fix VOPDQUANT parser for DQUANT == 2
dcd3abd vc1: fix calculation of ALTPQUANT
73ca0b7 vc1: fix parser for DQPROFILE in VOPDQUANT
8840c2d h264: zero-initialize SPS VUI parameters
Gwenole Beauchesne [Mon, 14 Jan 2013 15:06:54 +0000 (16:06 +0100)]
codecparsers: update to gst-vaapi-rebased commit b47983a.
b47983a h264: add inferred value for slice_beta_offset_div2
Gwenole Beauchesne [Tue, 18 Dec 2012 09:32:20 +0000 (10:32 +0100)]
Bump version for development.
Gwenole Beauchesne [Tue, 18 Dec 2012 09:31:52 +0000 (10:31 +0100)]
0.4.2.