summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-09libs: decoder: h265: remove spurious codeHEADmasterVíctor Manuel Jáquez Leal1-6/+1
Coverity scan: Logically dead code: The indicated dead code may have performed some action; that action will never occur. By using pointer arithmetic is impossible to get NULL.
2017-08-08libs: context: use attribs index instead pointersVíctor Manuel Jáquez Leal1-10/+18
Coverity scan bug: Out-of-bounds write. This could cause an immediate crash or incorrect computations. Coverity basically found that it is possible to assign more than 4 attribs in the array. In my opinion this was produced because code pattern used pointer arithmetic, which is not readable nor maintainable. This patch refactors config_create() to use an array index rather than pointer arithmetic. Also a run-time check for index size was added.
2017-08-08vaapiencode: h264: remove spurious codeVíctor Manuel Jáquez Leal1-1/+1
Coverity scan bug: An unsigned value can never be negative, so this test will always evaluate the same way. As len is guint32, there is no need to check it if it is equal or bigger than zero.
2017-08-08vaapidecode: initialize variableVíctor Manuel Jáquez Leal1-1/+1
Coverity scan bug: The variable will contain an arbitrary value left from earlier computations. Variable base_only is fetched from base-only property, and it may be not assigned. It needs to be initialized.
2017-08-08libs: windows: wayland: fail if cannot remove last frameVíctor Manuel Jáquez Leal1-4/+7
Converity scan bug: If the function returns an error value, the error value may be mistaken for a normal value. If g_atomic_pointer_compare_and_exchange() fails because the frame is not the last one, the function fails. Thus, logging an info message.
2017-08-08libs: utils: glx: check return valueVíctor Manuel Jáquez Leal1-3/+7
Coverity scan bug: If the function returns an error value, the error value may be mistaken for a normal value. Function sscanf returns the number of assignations done. Validate this return value with the number of expected variables to match.
2017-08-08libs: vaapi: object: remove unrequired NULL checkVíctor Manuel Jáquez Leal1-1/+1
Coverity scan bug: Dereference after null check: Either the check against null is unnecessary, or there may be a null pointer dereference. Variable klass has been validated as non-NULL several time before in gst_vaapi_object_new() function, so there is no need to check it again.
2017-08-08libs: encoder: h265: remove spurious assignationVíctor Manuel Jáquez Leal1-1/+0
Coverity scan bug: An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring. ip_period is assigned first to be rewritter inmediatly after. The first assignation is spurious.
2017-08-08libs: encoder: h264: fix copy & paste errorVíctor Manuel Jáquez Leal1-1/+1
Coverity scan bug: The copied code will not have its intended effect. This is a bug from commit cdaf15b2, where the intention is to initialize RefPicList1 while setting RefPicList0.
2017-08-08libs: encoder: h265: fix possible integer overflowVíctor Manuel Jáquez Leal2-2/+4
Coverity scan bug: Unintentional integer overflow. The expression's value may not be what the programmer intended, because the expression is evaluated using a narrow (i.e. few bits) integer type. Cast operator to guint64 before computation to avoid narrowing. merge with 3c5a6add
2017-08-08libs: decoder: mpeg4: fail if return value is not OKVíctor Manuel Jáquez Leal1-0/+6
Coverity scan bug: An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring. In the return value of decode_slice() or gst_mpeg4_parse_video_packet_header() are not success, thus fail decode_packet() function.
2017-08-08libs: decoder: h265: check for nullVíctor Manuel Jáquez Leal1-2/+4
Coverity scan bug: Dereference after null check: Either the check against null is unnecessary, or there may be a null pointer dereference. While looking for hte lowest poc, according to rest of the code, the picture in the dbp (decoded picture buffer) might be NULL, thus we could check for a NULL picture before assigned as found. Also, split a comma operator because it is considered as a bad practice because it possible side effects.
2017-08-08libs: decoder: h265: untaint loop control variableVíctor Manuel Jáquez Leal1-1/+11
Coverity scan bug: Scalars (for example, integers) are not properly bounds-checked (sanitized) before being used as array or pointer indexes, loop boundaries, or function arguments are considered as tainted. In this case, num_nals were not checked before used as loop control.
2017-08-08libs: decoder: h264: remove unrequired NULL checkVíctor Manuel Jáquez Leal1-5/+2
Coverity scan bug: Dereference after null check: Either the check against null is unnecessary, or there may be a null pointer dereference. In the original commit for fill_picture_gaps() (commit 5abd2b90) the prev_picture could be NULL, that's why the code did a null check. But, since commit 52adebe7, the previous reference frames are tracked, thus there is no need to check null anymore.
2017-08-03vaapidecode: fix gst_caps_new_simple callorestisf1-1/+2
https://bugzilla.gnome.org/show_bug.cgi?id=732265
2017-08-03vaapidecode: force add h264 MVC profiles in capsorestisf1-0/+33
When vaapih264dec's base-only profile is set to TRUE, fake MVC profile support in caps. https://bugzilla.gnome.org/show_bug.cgi?id=732265
2017-08-03libs: decoder: h264: decode MVC base view onlyorestisf1-4/+3
If processed SPS has mvc profile and the configuration is set to base-only, the frame is drop. https://bugzilla.gnome.org/show_bug.cgi?id=732265
2017-08-03vaapidecode: set h264 base-only to decoderorestisf2-0/+5
Set the base-only value when property is set and the internal decoder is already instantiated or when the internal decoder is created. https://bugzilla.gnome.org/show_bug.cgi?id=732265
2017-08-03libs: decoder: h264: add setter for base-only modeorestisf2-0/+23
https://bugzilla.gnome.org/show_bug.cgi?id=732265
2017-08-03vaapidecode_props: h264: add base-only propertyorestisf2-0/+13
https://bugzilla.gnome.org/show_bug.cgi?id=732265
2017-08-02libs: encoder: h264: missing property enum documentationVíctor Manuel Jáquez Leal1-0/+1
2017-08-02libs: encoder: h264: add multi reference supportHyunjun Ko1-19/+17
Using num_ref_frames provided and the result of the Query VAConfigAttribEncMaxRefFrames, it determines the size of reference list and perform encoding with multi reference frames as the following: 1\ The num_ref_frames is being considered as the number of reference picture list0 2\ Encoder adds 1 reference frame more to the reference picture list1 internally if b-frame encoding. 3\ If num_ref_frames is bigger than the number of refrence frames supported in the driver, it will be lowered. https://bugzilla.gnome.org/show_bug.cgi?id=783803
2017-08-02libs: encoder: h264: add refs propertyHyunjun Ko2-0/+18
Users can provide the number of reference frame by this property. The value of the property will be considered as the number of reference picture list0 and will add 1 reference frame more to the reference picture list1 internally if b-frame encoding. If the value provided is bigger than the number of refrence frames supported in the driver, it will be lowered. https://bugzilla.gnome.org/show_bug.cgi?id=783803
2017-08-02libs: encoder: implements gst_vaapi_encoder_ensure_max_num_ref_framesHyunjun Ko2-0/+53
This function will query VAConfigAttribEncMaxRefFrames to get the maximum number of reference frames supported in the driver. This will be used for h264/h265 encoding. https://bugzilla.gnome.org/show_bug.cgi?id=783803
2017-08-01vaapiencode: h265: compare an unsigned int if not zeroVíctor Manuel Jáquez Leal1-1/+1
An unsigned value can never be negative, so this test (greater than zero) will always evaluate the same way. Thus change it to just if it's not zero.
2017-08-01plugins: check gst_gl_ensure_element_data() return valueVíctor Manuel Jáquez Leal1-8/+14
Refactor gst_vaapi_plugin_base_create_gl_context() in order to check the return value of gst_gl_ensure_element_data(). The result is a code bit cleaner.
2017-08-01plugins: avoid dead code detectionVíctor Manuel Jáquez Leal1-2/+1
By using #elif macro, the static code analysis would stop to detect these lines as dead code. Also it is inforced the mutually exclusive environments.
2017-08-01vaapivideobufferpool: don't shift by negative since it's undefinedVíctor Manuel Jáquez Leal1-3/+6
The function g_bit_nth_lsf() may return -1 if the request bit position is not avaible. Thus, this patch check if the return value is not -1 in order to continue.
2017-08-01vaapisink: fix memory leakVíctor Manuel Jáquez Leal1-2/+3
2017-08-01vaapipostproc: fix memory leaksVíctor Manuel Jáquez Leal1-3/+9
2017-08-01libs: display: when appending formats change pointers to indexesTomas Rataj1-12/+12
Thus, it fixes an invalid read when YV12 or I420 are not supported by the driver. https://bugzilla.gnome.org/show_bug.cgi?id=785085
2017-08-01libs: encoder: h264: Add uncompliant mode reducing coded buffer sizeSreerenj Balachandran2-0/+71
Added a new property "compliance-mode", which default is the normal strict compliant mode. The second mode, "restrict-buf-alloc", is to limit the coded buffer allocation size to improve performance in some specific Intel platforms (there is asignificant performance improvement in parallel encodings). Under this new mode, we use the MinCR field in A.3.1 for pre-calculating the coded-buffer size. https://bugzilla.gnome.org/show_bug.cgi?id=784590
2017-08-01libs: utils_h264: Extend LevelLimit table with MinCR fieldSreerenj Balachandran2-18/+20
Add MinCR(Minimum Compression Ratio) field to GstVaapiH264LevelLimits based on Annex A.3 https://bugzilla.gnome.org/show_bug.cgi?id=784590
2017-07-31libs: utils: libva 1.0 changed the loggingVíctor Manuel Jáquez Leal1-4/+35
The logging mechanism in libva has changed it's functions signatures. This patch updates that for libva versions >= 1.0 https://bugzilla.gnome.org/show_bug.cgi?id=784398
2017-07-31libs: decoder: h264: libva 1.0 deprecated baselineVíctor Manuel Jáquez Leal1-0/+3
libva 1.0 deprecated H.264 baseline profile and FMO support (commit b4f332b3). https://bugzilla.gnome.org/show_bug.cgi?id=784398
2017-07-31build: check for libva-2.0Víctor Manuel Jáquez Leal3-10/+43
Check for libva-2.0 since libva's developers decided to increase the library's version number. https://bugzilla.gnome.org/show_bug.cgi?id=784398
2017-07-31build: blacklist only libva 0.99.0Víctor Manuel Jáquez Leal2-2/+3
Intel's MSDK uses libva 0.99.0, meanwhile open source libva bumped its API version to 1.0.0. Thus we have to blacklist only the MSDK's libva (0.99.0) https://bugzilla.gnome.org/show_bug.cgi?id=784398
2017-07-26build: meson: remove gstvaapidisplaycache.cVíctor Manuel Jáquez Leal1-1/+0
This is a missing bit of commit ec3e10f6
2017-07-26configure: do not break configure if gtk+-3.0 devel missingU. Artie Eoff1-1/+1
Fix PKG_CHECK_MODULES rule for with_gtk=check condition to set USE_GTK=0 if gtk+-3.0 is not available. Since commit 85856c29a70d6de4aea5b708e04e9eb418190623 Author: Hyunjun Ko <zzoon@igalia.com> Date: Wed Jul 5 15:59:43 2017 +0900 tests: elements: add testsuite of vaapi context ...configure fails if gtk+-3.0 development files are missing. The "with_gtk" option defaults to "check" in configure.ac which implies that if it is not explicitly requested then configure will only enable it if it's available on the system. However, the PKG_CHECK_MODULES rule that get's activated on "check" condition did not provide default when gtk+-3.0 devel packages are not found on the system. Thus, it resulted in configure failure. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=785452
2017-07-26tests: elements: add testsuite of vaapi contextHyunjun Ko3-0/+355
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> https://bugzilla.gnome.org/show_bug.cgi?id=766704
2017-07-26vaapisink: fail if surface display is differentHyunjun Ko1-2/+10
Replacing GstVaapiDisplay during rendering might be hiding problems at some cases, even though it's safe currently since we use cache of GstVaapidisplay. Play safe by failing if this happens. https://bugzilla.gnome.org/show_bug.cgi?id=766704
2017-07-18videocontext: support "gst.vaapi.app.Display" contextHyunjun Ko2-6/+37
Through "gst.vaapi.app.Display" context, users can set their own VADisplay and native display of their backend. Attributes: - display : pointer of VADisplay - x11-display : pointer of X11 display (Display *), if they're using. This patch creates GstVaapidisplayX11 if information provided through "gst.vaapi.app.Display" https://bugzilla.gnome.org/show_bug.cgi?id=766704
2017-07-18libs: display: x11: add gst_vaapi_display_x11_new_with_va_display()Hyunjun Ko2-0/+19
Implements new API function so that users could create GstVaapiDisplay with their own VADisplay within a native display as backend. https://bugzilla.gnome.org/show_bug.cgi?id=766704
2017-07-18libs: display: pass display info when foreign displayHyunjun Ko1-13/+27
When creating a GstVaapiDisplay using a foreign VADisplay, and render with that display, it also requires native display of the backend. https://bugzilla.gnome.org/show_bug.cgi?id=766704
2017-07-18libs: display: remove cacheVíctor Manuel Jáquez Leal8-758/+16
Remove a bunch of code that handles the VADisplay cache, since the context sharing should be doing this correctly. https://bugzilla.gnome.org/show_bug.cgi?id=747946
2017-07-18tests: elements: add test for vaapipostprocHyunjun Ko2-0/+162
https://bugzilla.gnome.org/show_bug.cgi?id=754885
2017-07-18postproc: reconfigure when width or height changesHyunjun Ko1-1/+10
https://bugzilla.gnome.org/show_bug.cgi?id=754885
2017-07-17libs: encoder: vp9: array terminated in zerosVíctor Manuel Jáquez Leal1-1/+2
There is a crash when setting ref-pic-mode since the #GEnumValue array is not terminated with a structured with all memvers being zero. https://bugzilla.gnome.org/show_bug.cgi?id=785032
2017-07-13vaapiencode: h264: add plugin documentationVíctor Manuel Jáquez Leal1-0/+25
Comment how the profile is set and other parameters.
2017-07-10libs: decoder: h264: push frames as soon as possibleMatt Staples1-5/+68
Push frames downstream as soon as possible instead of waiting until they are ejected from the DPB. This patch makes the decoder not comply with the H.264 specification, but it is required for some video cameras. https://bugzilla.gnome.org/show_bug.cgi?id=762509 Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>