pesintta / vdr-plugin-vaapidevice Goto Github PK
View Code? Open in Web Editor NEWVDR VAAPIDevice Plug-in
VDR VAAPIDevice Plug-in
Please implemente needed Patches, related on the based softhddevice Fork:
--- softhddevice/codec.c.orig 2014-04-17 14:33:12.000000000 +0200
+++ softhddevice/codec.c 2014-04-28 20:58:15.850120324 +0200
@@ -59,6 +59,7 @@
#include <alsa/iatomic.h>
#include <libavcodec/avcodec.h>
+#include <libavutil/channel_layout.h>
#include <libavutil/mem.h>
// support old ffmpeg versions <1.0
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,18,102)
and
--- softhddevice-2014.04.17/Makefile.orig 2014-05-14 10:38:23.106431350 +0200
+++ softhddevice-2014.04.17/Makefile 2014-05-15 21:42:06.570275744 +0200
@@ -68,6 +68,7 @@
export CFLAGS = $(call PKGCFG,cflags)
export CXXFLAGS = $(call PKGCFG,cxxflags)
+export PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig
ifeq ($(CFLAGS),)
$(warning CFLAGS not set)
System: Kernel: 4.15.9-041509-generic x86_64 bits: 64 gcc: 7.2.0
Console: tty 0 Distro: Ubuntu Bionic Beaver (development branch)
Machine: Device: laptop System: Acer product: Aspire ES1-533 v: V1.12 serial: <filter>
Mobo: Acer model: Stego_AP v: V1.12 serial: <filter>
UEFI: Insyde v: V1.12 date: 10/18/2017
CPU: Quad core Intel Pentium N4200 (-MCP-) arch: N/A cache: 1024 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 8755
clock speeds: max: 2500 MHz 1: 1789 MHz 2: 1927 MHz 3: 1813 MHz
4: 1870 MHz
Graphics: Card: Intel Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller
bus-ID: 00:02.0
Display Server: X.Org 1.19.6 driver: i915
Resolution: [email protected]
OpenGL: renderer: Mesa DRI Intel HD Graphics 505 (Broxton)
version: 4.5 Mesa 18.0.0-rc4 Direct Render: Yes
Audio: Card Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster
driver: snd_hda_intel bus-ID: 00:0e.0
Sound: Advanced Linux Sound Architecture v: k4.15.9-041509-generic
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
ffmpeg version 3.4.git-1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-5ubuntu1)
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 11.101 / 7. 11.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
7
220 <filter> SVDRP VideoDiskRecorder 2.3.8; Sun Mar 11 19:46:12 2018; UTF-8
900- Frames: missed(0) duped(720) dropped(0) total(209) PTS( 8:00:30.592) drift(175) audio(441) video(0)
900- Video: h264/vaapi_vld 1280x720p 16:9 @ 1389x759 - Intel i965 driver for Intel(R) Broxton - 2.0.0
900- Audio: mp2 48000Hz 2 channels
900 Command: vaapidevice -d :0.0 -v va-api -a pulse -c softvol -w alsa-driver-broken
221 <filter> closing connection
Also include any additional information (screen shots, log messages, etc) that could help with identifying and resolving the issue.
this was show up for the first time
WARNING: invalid surface provided for second field
vdr: gen8_mfd.c:558: gen8_mfd_avc_directmode_state: Assertion `obj_surface->bo && obj_surface->private_data' failed.
Magick: abort due to signal 6 (SIGABRT) "Abort"...
Aborted (core dumped)
Hi,
if I cut SD Videos, e.g. seek Start and Stop of the movie with (1, 3, 4 and 6), I'll get an unscaled SD Picture in the top / left corner with some picture artifacts filling the rest of screen. Occasionally I too loose OSD temporary or completely.
Seems too me, as this is the same effect, that makes the HD picture "jumpy" in cutting mode...
Nevertheless, thanks for the plugin!
Regards,
Stefan
I currently run two VDRs, one based on Intel and the other with an AMD Radeon HD6450 graphics. I also gave now vaapidevice a try on the AMD one, but it only showed the OSD (which was "hanging"/not disappearing anymore) and no picture or sound. I have not done any further research (like checking the logs) so far since I am not sure if vaapidevice is supposed to work on AMD or not. Would be great if one of the devs can clarify if this plugin aims at supporting also AMD or if it is purely restricted to Intel graphics (which would be OK since the old softhddevice plugin with vdpau works reasonably well for AMD).
vdr-plugin-vaapidevice/video.c
Line 1845 in 337bf07
Mar 15 21:53:56 acer533 vdr: [10512] VAAPI: video/vaapi: allocating 1 forward reference surfaces for postprocessing
Mar 15 21:53:56 acer533 vdr: [10512] VAAPI: video/vaapi: allocating 0 backward reference surfaces for postprocessing
Mar 15 21:53:56 acer533 vdr: [10512] VAAPI: Changing to 0 forward reference surfaces for postprocessing
The commit rofafor@45a7d48 is original from j1rie/softhddevice@5708242
It helped once during my experiments two years ago, but I never invested time to find out, if it was needed under regular conditions. That's why I did not propose it in my previous series of pull requests.
Just wanted to mention this.
When I resize the vaapidevice window, sometimes the image becomes cluttered with strange artefacts on it. As soon as I either display the OSD, or change window size again, the artefacts disappear again and everything seems normal.
P.S. I should add that this issue has appeared recently. It was not present in the old softhddevice pesintta code (before the project was renamed to vaapidevice and a lot of code was changed).
System: Kernel: 4.13.0-36-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9) Distro: Linux Mint 18.3 Sylvia
Machine: Mobo: MSI model: B150M MORTAR (MS-7972) v: 2.0
Bios: American Megatrends v: C.90 date: 11/03/2016
CPU: Quad core Intel Core i5-7500 (-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27264
clock speeds: max: 3800 MHz 1: 3400 MHz 2: 3400 MHz 3: 3400 MHz
4: 3400 MHz
Graphics: Card: Intel Device 5912 bus-ID: 00:02.0
Display Server: X.Org 1.18.4 drivers: (unloaded: fbdev,vesa)
Resolution: [email protected]
GLX Renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2)
GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes
Audio: Card-1 Intel Sunrise Point-H HD Audio
driver: snd_hda_intel bus-ID: 00:1f.3
Card-2 Micronas Composite USB-Device
driver: USB Audio usb-ID: 001-003
Sound: Advanced Linux Sound Architecture v: k4.13.0-36-generic
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 02:00.0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kabylake - 1.7.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --prefix=/opt/ffmpeg-3.4.2 --enable-shared --enable-gpl
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
The original softhddevice plugin has code to turn off DPMS and some screensavers (e.g. the gnome screensaver). Apparently this code was removed from vaapidevice.
I believe it would be good to add again code to inhibit screensavers (maybe it can be done more generically, since the code in softhddevice seems only to tackle DPMS and some screensavers, but not all)-
codec.c: In function ‘CodecVideoDecode’:
codec.c:617:5: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations]
used = avcodec_decode_video2(video_ctx, frame, &got_frame, pkt);
^
this can fully replace it
--- codec.c.orig 2018-02-03 20:52:17.250388421 +0100
+++ codec.c 2018-02-03 20:53:22.678721937 +0100
@@ -612,8 +612,25 @@
*pkt = *avpkt; // use copy
next_part:
+#if 0
// FIXME: this function can crash with bad packets
used = avcodec_decode_video2(video_ctx, frame, &got_frame, pkt);
+#else
+ if (video_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
+ video_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
+ used = avcodec_send_packet(video_ctx, pkt);
+ if (used < 0 && used != AVERROR(EAGAIN) && used != AVERROR_EOF) {
+ } else {
+ if (used >= 0)
+ pkt->size = 0;
+ used = avcodec_receive_frame(video_ctx, frame);
+ if (used >= 0)
+ got_frame = 1;
+// if (used == AVERROR(EAGAIN) || used == AVERROR_EOF)
+// used = 0;
+ }
+ }
+#endif
Debug(4, "%s: %p %d -> %d %d\n", __FUNCTION__, pkt->data, pkt->size, used,
got_frame);
--- softhddevice.cpp.orig 2018-02-04 12:57:36.165055247 +0100
+++ softhddevice.cpp 2018-02-04 12:59:10.080184504 +0100
@@ -3345,6 +3345,7 @@
}
if (!strcasecmp(name, "AudioBufferTime")) {
ConfigAudioBufferTime = atoi(value);
+ AudioSetBufferTime(ConfigAudioBufferTime);
return true;
}
if (!strcasecmp(name, "AudioAutoAES")) {
Hi,
while opening a recording (as usual) pressing 9 - 7 to check cutting it is ok,
vdr already vanishes pressing just "9" (jump to end):
kernel: [111280.279359] vdr[15926]: segfault at d8 ip 00007f3ef0166899 sp 00007f3e62ffc190 error 4 in libdrm_intel.so.1.0.0[7f3ef0160000+22000]
[and again and ...]
kernel: [111751.696539] vdr[16491] segfault at d8 ip 00007f18f79dc899 sp 00007f18837fd190 error 4 in libdrm_intel.so.1.0.0[7f18f79d6000+22000]
with SD and/or HD recordings.
System-Info
System: Kernel: 4.14.10-dvb x86_64 bits: 64 gcc: 7.2.0 Console: tty 2 Distro: Debian GNU/Linux buster/sid
Machine: Device: desktop Mobo: ASRock model: J3160-ITX serial: <filter>
UEFI [Legacy]: American Megatrends v: P1.30 date: 03/30/2016
CPU: Quad core Intel Celeron J3160 (-MCP-) arch: Airmont rev.4 cache: 1024 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 12800
clock speeds: max: 2240 MHz 1: 1600 MHz 2: 1600 MHz 3: 1600 MHz 4: 1600 MHz
Graphics: Card: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller
bus-ID: 00:02.0
Display Server: X.Org 1.19.6 driver: i915 Resolution: 1920x1080
OpenGL: renderer: Mesa DRI Intel HD Graphics 400 (Braswell)
version: 4.5 Mesa 17.3.6 Direct Render: Yes
Audio: Card Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.14.10-dvb
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
ffmpeg version 3.4.2-1+b1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Debian 7.3.0-4)
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
7
220 <filter> SVDRP VideoDiskRecorder 2.3.8; Thu Mar 15 01:03:06 2018; UTF-8
900- Frames: missed(0) duped(299) dropped(6) total(7438) PTS(10:32:40.783) drift(-10) audio(442) video(0)
900- Video: h264/vaapi_vld 1920x1080i 16:9 @ 1920x1080 - Intel i965 driver for Intel(R) CherryView - 2.0.0
900- Audio: ac3 48000Hz 6 channels
900 Command: vaapidevice -a stereo -p hdmi:CARD=PCH,DEV=2,AES0=0x06 -g 1920x1080+0+0 -v va-api -w alsa-driver-broken -w alsa-close-open-delay
221 <filter> closing connection
Hello
I need use this plugin on Intel HD 4000. Does this plugin support vaapi?
Hi,
softhddevice does not play video smoothly on the Orange Pi Zero (is a 32-bit armhf SoC with vdpau).
Here is an example output:
http://sgerwk.altervista.org/output.mpg
The transport stream coming from the dvb stick looks like this:
http://sgerwk.altervista.org/input.ts
(same channels, a few seconds later).
mpv has no problem playing dvb:// with vdpau.
Maybe the problem is with the timing of playing of the frames. A quick hack is to increase the delay from 1 * 1000 to 18 * 1000 in video.c:
if (!decoded) { // nothing decoded, sleep
// FIXME: sleep on wakeup
usleep(18 * 1000);
}
This only avoid frames being shown too quickly, is not a real solution. Maybe the problem is with the SoC being 32 bits.
can someone confirm the bad deinterlace issue on:
EURONEWS GERMAN SD;Globecast:12226:HC34M2S0:S19.2E:27500:2440=2:2445=deu@3:0:0:31230:1:1091:0
with the old softhddevice it's perfectly fine but did log
[softhddev] too short PES video packet
last: 3
last: 3
last: 3
last: 3
Hi Antti, Hi Rolf,
thanks for all your hard work on vaapidevice. I just noticed one issue. If I FastForward or Rewind then the "position" clock is not updating and if you press play again you are at the same time where you started FastForward / Rewind ... even if you let FF/Rew run for quite some time ...
Not sure where this started ... my last "known good" commit (6372704) is also affected ...
Thanks and best regards,
Jochen
it's form the BSD port
https://linux.die.net/man/3/pthread_yield
--- a/PLUGINS/src/softhddevice/audio.c
+++ b/PLUGINS/src/softhddevice/audio.c
@@ -48,6 +48,7 @@
#include <inttypes.h>
#include <string.h>
#include <math.h>
+#include <sched.h>
#include <libintl.h>
#define _(str) gettext(str) ///< gettext shortcut
@@ -1584,7 +1585,7 @@
if (err < 0) { // underrun error
return -1;
}
- pthread_yield();
+ sched_yield();
usleep(OssFragmentTime * 1000); // let fill/empty the buffers
return 0;
}
As per @pesintta's comment in #79 ColorBalance filter "is currently always enabled and you cannot disable it from settings or from setup.conf."
Actually, it would be good to add the missing option to switch this filter on or off, same as it is possible for the other filters.
As a side effect, this would also make vaapidevice work out of the box with Ubuntu Xenial (their current LTS version) and distros based on Ubuntu Xenial (such as the current version of Mint). At the moment, these distros ship a pretty outdated version of libva that has a bug in the ColorBalance filter that produces "funny" line artefacts in the picture.
UHD channels have only still image and blinking green screen here (8bit hevc channels in 1080p are fine)
issue did start here 192789d if remember right
could not get a better screenshot showing the green flashing
--- video.c.orig 2018-02-16 21:03:16.727705393 +0100
+++ video.c 2018-02-16 21:04:46.180034575 +0100
@@ -1725,7 +1725,7 @@
if (vaCreateSurfaces(decoder->VaDisplay, VA_RT_FORMAT_YUV420, width, height, decoder->PostProcSurfacesRb,
POSTPROC_SURFACES_MAX, NULL, 0) != VA_STATUS_SUCCESS) {
- Fatal("video/vaapi: can't create %d postproc surfaces", VIDEO_SURFACES_MAX);
+ Fatal("video/vaapi: can't create %d postproc surfaces", POSTPROC_SURFACES_MAX);
}
}
vdr-plugin-vaapidevice/video.c
Line 1649 in 9da06d6
When switching to ZDF based transponder there is silence for several seconds, then the picture stops for a brief moment and then both sound and picture are available (in this case at 18:01:45):
Mar 11 18:01:37 [vdr] [10462] switching to channel 2 S19.2E-1-1011-11110 (ZDF HD)
Mar 11 18:01:37 [vdr] [10496] VAAPI: audio/alsa: using device 'hw:0,7'
Mar 11 18:01:37 [vdr] [10496] VAAPI: audio/alsa: start delay 336ms
Mar 11 18:01:45 [vdr] [10496] VAAPI: audio/alsa: using device 'hw:0,7'
Mar 11 18:01:45 [vdr] [10496] VAAPI: audio/alsa: start delay 336ms
Mar 11 18:01:45 [vdr] [10723] ERROR: TS packet not accepted in Transfer Mode
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8983/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8984/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8985/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8986/440) 5
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8987/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8988/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8989/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8990/440) 0
Mar 11 18:01:45 [vdr] [10505] VAAPI-ERROR: video: display buffer empty, duping frame (8991/440) 5
Best regards,
Jochen
Resuming in non X mode: xdpyinfo not found. For package install advice run: inxi --recommends
System: Kernel: 4.15.8-gentoo x86_64 bits: 64 gcc: 6.4.0 Console: tty 0
Distro: Gentoo Base System release 2.4.1
Machine: Device: desktop Mobo: ASUSTeK model: J3455M-E v: Rev X.0x serial: <filter>
UEFI: American Megatrends v: 0604 date: 09/29/2017
CPU: Quad core Intel Celeron J3455 (-MCP-) arch: N/A cache: 1024 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11980
clock speeds: max: 2300 MHz 1: 1616 MHz 2: 1889 MHz 3: 1988 MHz
4: 1582 MHz
Graphics: Card: Intel Device 5a85 bus-ID: 00:02.0
Display Server: X.org 1.19.5 driver: intel
tty size: 140x50 Advanced Data: N/A for root
Audio: Card Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster
driver: snd_hda_intel bus-ID: 00:0e.0
Sound: Advanced Linux Sound Architecture v: k4.15.8-gentoo
ffmpeg version 3.3.6 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.4.0 (Gentoo 6.4.0-r1 p1.3)
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
6.4.0
220 <filter> SVDRP VideoDiskRecorder 2.3.8; Sun Mar 11 18:07:04 2018; UTF-8
900- Frames: missed(0) duped(24896) dropped(20) total(15907) PTS(22:41:30.581) drift(146) audio(423) video(0)
900- Video: h264/vaapi_vld 1280x720p 16:9 @ 1920x1080 - Intel i965 driver for Intel(R) Broxton - 2.1.0
900- Audio: mp2 48000Hz 2 channels
900 Command: vaapidevice -d :0.0 -v va-api -a hw:0,7 -f
221 <filter> closing connection
Hi,
I've a problem with sharpening support on Intel J3160 (CherryView 2):
If I enable Sharpening, e.g. switch from 0 -> 1, I'll get something like a frozen not-deinterlaced flickering picture (seems like three frames joined), crashing GPU some moments later. Need to detach/attach to resume.
vainfo:
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
Logs:
[21959] VDR version 2.3.8 started
[21959] loading plugin: /usr/lib/vdr/plugins/libvdr-vaapidevice.so.2.3.8
video/vaapi: libva 1.0 (Intel i965 driver for Intel(R) CherryView - 2.0.0) initialized
video/vaapi: background-color is unsupported
video/vaapi: supports video processing
video/vaapi: supports unscaled osd
[vaapidevice] ready
..
codec: YUV 420 supported
Using entrypoint for vpp: 10
video/vaapi: can't destroy postproc context!
can't destroy config!
video/vaapi: noise reduction supported
video/vaapi: 0,00 - 1,00 ++ 0,03 = 0,50
Enabling denoise filter (pos = 0)
video/vaapi: deinterlacing supported
video/vaapi: bob deinterlace supported
motion adaptive deinterlace supported
motion compensated deinterlace supported
Enabling Deint (pos = 1)
video/vaapi: sharpening supported
video/vaapi: 0,00 - 1,00 ++ 0,03 = 0,50
Enabling sharpening filter (pos = 0)
video/vaapi: enabling color balance filters
Supported color balance filter count: 4
Hue (-180,00 - 180,00 ++ 1,00 = 0,00) (pos = 2)
Saturation (0,00 - 10,00 ++ 0,10 = 1,00) (pos = 2)
Brightness (-100,00 - 100,00 ++ 1,00 = 0,00) (pos = 2)
Contrast (0,00 - 10,00 ++ 0,10 = 1,00) (pos = 2)
video/vaapi: skin tone enhancement supported
video/vaapi: 0,00 - 4,00 ++ 1,00 = 0,00
Enabling skin tone filter (pos = 3)
Allocating 1 forward reference surfaces for postprocessing
Allocating 0 backward reference surfaces for postprocessing
video: display buffer empty, duping frame (46/0) 0
Surface 0 query status = 0x6: invalid VASurfaceID
Surface 0 query status = 0x6: invalid VASurfaceID
...
While switching on sharpening via menu
video/vaapi: gpu hung -4294949ms 78208
kernel: [53772.319113] [drm] GPU HANG: ecode 8:0:0x85ddfffb, in vdr [21959], reason: Hang on rcs0, action: reset
kernel: [53772.319118] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
kernel: [53772.319120] [drm] Please file a new bug report on bugs.freedesktop.org against DRI -> DRM/Intel
kernel: [53772.319121] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
kernel: [53772.319122] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
kernel: [53772.319123] [drm] GPU crash dump saved to /sys/class/drm/card0/error
kernel: [53772.319136] i915 0000:00:02.0: Resetting rcs0 after gpu hang
kernel: [53776.454505] asynchronous wait on fence i915:vdr[21959]/0:38eff timed out
kernel: [53780.294596] i915 0000:00:02.0: Resetting rcs0 after gpu hang
kernel: [53788.294494] i915 0000:00:02.0: Resetting rcs0 after gpu hang
kernel: [53796.294490] i915 0000:00:02.0: Resetting rcs0 after gpu hang
`
Kernel is a 4.14.10.
video.c: In function ‘VideoSetPts’:
video.c:359:5: warning: ‘av_frame_get_pkt_duration’ is deprecated [-Wdeprecated-declarations]
Debug8("video: %d/%d %" PRIx64 " -> %d", video_ctx->framerate.den, video_ctx->framerate.num,
^~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38:0,
from video.c:52:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:591:9: note: declared here
int64_t av_frame_get_pkt_duration (const AVFrame *frame);
^~~~~~~~~~~~~~~~~~~~~~~~~
as there is no easy way to replace it could this be usesd to quiet the compile
FF_DISABLE_DEPRECATION_WARNINGS
Debug8("video: %d/%d %" PRIx64 " -> %d", video_ctx->fram.....
FF_ENABLE_DEPRECATION_WARNINGS
Hi,
I see different error messages ... I get (with latest commit):
Mar 05 00:11:24 [vdr] [18025] VAAPI: Device ready
Mar 05 00:11:24 [vdr] [18067] VAAPI-ERROR: video/vaapi: no osd subpicture yet
Mar 05 00:11:24 [vdr] [18067] VAAPI-ERROR: video: display buffer empty, duping frame (1/0) 0
Mar 05 00:11:24 [vdr] [18067] VAAPI-ERROR: video/vaapi: no osd subpicture yet
Mar 05 00:11:24 [vdr] [18067] VAAPI-ERROR: video: display buffer empty, duping frame (2/0) 0
Mar 05 00:11:24 [vdr] [18067] VAAPI-ERROR: video/vaapi: no osd subpicture yet
And after some time:
Mar 05 00:11:25 [vdr] [18067] VAAPI-ERROR: video/vaapi: no osd subpicture yet
Mar 05 00:11:25 [vdr] [18067] VAAPI-ERROR: video: display buffer empty, duping frame (585/0) 6
Mar 05 00:11:25 [vdr] [18067] VAAPI-ERROR: video/vaapi: can't destroy 8 surfaces
Mar 05 00:11:25 [vdr] [18067] VAAPI-ERROR: video/vaapi: can't destroy postproc context!
Mar 05 00:11:25 [vdr] [18067] VAAPI-ERROR: video/vaapi: can't destroy config!
Mar 05 00:11:25 [vdr] [18067] VAAPI: video/vaapi: supports video processing
Mar 05 00:11:25 [vdr] [18067] VAAPI-ERROR: video/vaapi: no osd subpicture yet
Mar 05 00:11:25 [vdr] [18067] VAAPI: video/vaapi: noise reduction supported
Best regards,
Space #
cc -g -O3 -Wall -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/alsa -I/usr/include/x86_64-linux-gnu -DPLUGIN_NAME_I18N='"vaapidevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DGIT_REV='"15b6190"' -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -Wno-unused-parameter -std=c99 -c -o audio.o audio.c
audio.c: In function ‘AudioInit’:
audio.c:2154:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (AudioChannelsInHw[4]) {
^
audio.c:2158:7: note: here
case 4:
^~~~
audio.c:2159:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (AudioChannelsInHw[5]) {
^
audio.c:2163:7: note: here
case 5:
^~~~
audio.c:2164:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (AudioChannelsInHw[6]) {
^
audio.c:2168:7: note: here
case 6:
^~~~
audio.c:2169:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (AudioChannelsInHw[7]) {
^
audio.c:2173:7: note: here
case 7:
^~~~
audio.c:2174:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (AudioChannelsInHw[8]) {
^
audio.c:2178:7: note: here
case 8:
^~~~
sorry for bring this up again but it looks not nice at compile time
vdr-plugin-vaapidevice/video.c
Line 1511 in f034f46
should we not use AV_PIX_FMT_VAAPI from now on
Hi, I didn't get a picture anymore.
For me, the last working commit is 6372704
Mar 10 16:52:30 vdr vdr: [4170] VAAPI: video/vaapi: supports unscaled osd
Mar 10 16:52:30 vdr vdr: [4170] VAAPI: audio: 'alsa' output module used
Mar 10 16:52:30 vdr vdr: [4170] VAAPI: audio/alsa: supports pause: yes
Mar 10 16:52:30 vdr vdr: [4365] VAAPI-ERROR: video/vaapi: can't destroy 8 surfaces
Mar 10 16:52:30 vdr vdr: [4365] VAAPI-ERROR: video/vaapi: can't destroy postproc context!
Mar 10 16:52:30 vdr vdr: [4365] VAAPI-ERROR: video/vaapi: can't destroy config!
VAAPIDEVICE SYSTEM DEBUG INFORMATION REPORT
System: Kernel: 4.15.0-11-generic x86_64 bits: 64 gcc: 7.3.0 Console: tty 1
Distro: Ubuntu Bionic Beaver (development branch)
Machine: Device: desktop Mobo: ASRock model: J3455M serial: N/A UEFI: American Megatrends v: P1.40 date: 07/14/2017
CPU: Quad core Intel Celeron J3455 (-MCP-) arch: N/A cache: 1024 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11980
clock speeds: max: 2300 MHz 1: 1618 MHz 2: 1768 MHz 3: 2018 MHz 4: 1523 MHz
Graphics: Card: Intel Device 5a85 bus-ID: 00:02.0
Display Server: N/A drivers: modesetting (unloaded: fbdev,vesa)
tty size: 136x28 Advanced Data: N/A out of X
Audio: Card Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster
driver: snd_hda_intel bus-ID: 00:0e.0
Sound: Advanced Linux Sound Architecture v: k4.15.0-11-generic
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 01:00.0
Info: Processes: 239 Uptime: 1:04 Memory: 3664.5/7386.2MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
Client: Shell (generate_system) inxi: 2.3.56
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
INCLUDE THIS REPORT INTO YOUR GITHUB ISSUE
if possible on the hardware create the surfaces in 10Bit
I'm not sure where this comes from, but it's maybe usefull
--- softhddevice.orig/video.c 2015-10-04 14:52:35.676357063 +0200
+++ softhddevice/video.c 2015-10-06 12:09:51.572035914 +0200
@@ -3347,6 +3347,10 @@
vaSyncSurface(VaDisplay, frefs[*num_frefs - 1]);
/* Skip postprocessing if queue is not deinterlaceable */
+ if (!*num_brefs) {
+ //Error("vaapi/vpp: Postprocessing without Backward Reference\n");
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
+ }
for (i = 0; i < *num_brefs; ++i) {
va_status = vaQuerySurfaceStatus(VaDisplay, brefs[i], &va_surf_status);
if (va_status != VA_STATUS_SUCCESS) {
I detected another issue that was not present for me with the old softhddevice/pesintta code before the rename to vaapidevice.
For DVB-T2 channels which are broadcast here in HEVC with 1080p resolution, in windowed mode, there are line artefacts in the picture. They disappear in fullscreen. Also in windowed mode, when I resize the window, sometimes they appear, sometimes they disappear (until I resize again the window). The problem does not happen with channels in other resolutions such as 1080i, 720p or SDTV. Only 1080p seems affected.
With current GIT state, vaapidevice does not scale the video to the needed size (of window or fullscreen) in a case when no postprocessing filters are running.
I am not sure where exactly the scaling should happen in video.c. With current state, it seems to happen only within the function VaapiApplyFilters(). In that function, there are two checks
if (!decoder->filter_n)
return NULL;
[...]
if (!filter_count)
return NULL; /* no postprocessing if no filters applied */
If at any of these, the condition is true, we return from the function. As a result, then the picture is shown in an unscaled way. Which means we only see the upper left extract.
When in fullscreen and the screensize is larger than the video (like for me in 720p videos), then the video does not use the full screen anymore and there are strange artifacts around it.
Please note that I believe that the code in VaapiApplyFilters() is likely correct. I believe somewhere else there is code missing or wrong that causes the scaling not to happen in any case.
I believe #86 and maybe also #89 are potentially consequences of this issue here.
vdr-plugin-vaapidevice/video.c
Line 2712 in 9da06d6
Hi,
center cut-out is broken in the latest Versions, this happens with HD and SD recordings.
I have updated my vaapidevice installation from 1.0.0-GIT6372704 to 1.0.0-GIT7ef6ad5. I have recognized that center cut-out is broken.
I have attached 3 Pictures from a SD recording, this recording is a TS recording, but it also happens with PES recordings.
vdr-plugin-vaapidevice/video.c
Line 2713 in 9da06d6
did not make a difference here with and without
After updating to the latest set of commits, OSD is not longer shown with skindesigner.
VDR-native OSD (i.e. LCARS) is ok.
Digging in the log, this may give a hint.
Mar 04 20:07:36 vdrtwo vdr[6575]: [6575] ERROR: cOsd::SetAreas returned 5 (wrong alignment)
Mar 04 20:07:36 vdrtwo vdr[6575]: [6575] skindesigner: Error initiating displaychannel view - aborting
vdr-plugin-vaapidevice/video.c
Line 2132 in 9da06d6
flags = alloca(format_n * sizeof(*flags));
Hi,
after getting vaapi 2.0 by debian buster update, softhddevice stops working and recompiling fails with:
[..]
In file included from video.c:172:0:
/usr/include/x86_64-linux-gnu/libavcodec/vaapi.h:56:29: note: declared here
struct attribute_deprecated vaapi_context {
^~~~~~~~~~~~~
video.c: In function ‘VaapiInit’:
video.c:2772:5: error: too few arguments to function ‘vaSetErrorCallback’
vaSetErrorCallback(NULL);
^~~~~~~~~~~~~~~~~~
In file included from /usr/include/va/va_x11.h:27:0,
from video.c:136:
/usr/include/va/va.h:270:19: note: declared here
VAMessageCallback vaSetErrorCallback(VADisplay dpy, VAMessageCallback callback, void *user_context);
^~~~~~~~~~~~~~~~~~
video.c:2773:5: error: too few arguments to function ‘vaSetInfoCallback’
vaSetInfoCallback(NULL);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/va/va_x11.h:27:0,
from video.c:136:
/usr/include/va/va.h:276:19: note: declared here
VAMessageCallback vaSetInfoCallback(VADisplay dpy, VAMessageCallback callback, void *user_context);
^~~~~~~~~~~~~~~~~
If I play old *.vdr (1.6.x recordings), I only get about top 10% of picture, rest is more or less light grey.
It worked surely with git from around new year 2018, playing "A dinner for one" without problems.
Maybe caused by the new TS-Parser, as that are PES recordings?
Feb 12 01:05:15 vdr: video: slow down video, duping frame
Feb 12 01:05:15 vdr: video: 0:50:42.525 +65 625 0/\ms 182+5 v-buf
Feb 12 01:05:15 vdr: video: speed up video, droping frame
Feb 12 01:05:15 vdr: video: 0:50:42.525 +26 681 0/\ms 182+3 v-buf
Feb 12 01:05:15 vdr: audio/alsa: using device 'stereo'
Feb 12 01:05:15 vdr: audio/alsa: start delay 336ms
Feb 12 01:05:15 vdr: video: slow down video, duping frame
Feb 12 01:05:15 vdr: video: 0:51:42.285 +300 427 0/\ms 59+5 v-buf
Feb 12 01:05:15 vdr: [vaapidevice] empty video packet 56 bytes
Feb 12 01:05:15 vdr: video/vaapi: synced after 25 frames
Feb 12 01:05:15 vdr: video: slow down video, duping frame
Feb 12 01:05:15 vdr: video: speed up video, droping frame
Feb 12 01:05:15 vdr: video: 0:51:42.565 +20 587 0/\ms 182+3 v-buf
Feb 12 01:05:15 vdr: video: slow down video, duping frame
Feb 12 01:05:15 vdr: video: 0:51:42.645 +60 571 0/\ms 182+5 v-buf
Feb 12 01:05:16 vdr: video: speed up video, droping frame
Feb 12 01:05:16 vdr: video: 0:51:42.645 +20 675 0/\ms 182+3 v-buf
Feb 12 01:05:16 vdr: video: slow down video, duping frame
Feb 12 01:05:16 vdr: video: 0:51:42.725 +60 659 0/\ms 182+5 v-buf
Feb 12 01:05:16 vdr: video: speed up video, droping frame
Feb 12 01:05:16 vdr: video: 0:51:42.725 +20 643 0/\ms 182+3 v-buf
Feb 12 01:05:16 vdr: [vaapidevice] empty video packet 2048 bytes
Feb 12 01:05:16 vdr: [vaapidevice] empty video packet 1137 bytes
Feb 12 01:05:16 vdr: video: slow down video, duping frame
Feb 12 01:05:16 vdr: video: 0:51:42.805 +59 626 0/\ms 182+5 v-buf
Feb 12 01:05:16 vdr: [vaapidevice] empty video packet 2048 bytes
Feb 12 01:05:16 vdr: video: speed up video, droping frame
Feb 12 01:05:16 vdr: video: 0:51:42.805 +20 587 0/\ms 182+3 v-buf
Feb 12 01:05:16 vdr: [vaapidevice] empty video packet 2048 bytes
Feb 12 01:05:16 vdr: [vaapidevice] empty video packet 1498 bytes
Feb 12 01:05:16 vdr: video: slow down video, duping frame
Feb 12 01:05:16 vdr: video: 0:51:42.885 +60 619 0/\ms 182+5 v-buf
Feb 12 01:05:16 vdr: video: speed up video, droping frame
Feb 12 01:05:16 vdr: video: 0:51:42.885 +20 627 0/\ms 182+3 v-buf
Feb 12 01:05:16 vdr: audio/alsa: using device 'stereo'
Feb 12 01:05:16 vdr: video: slow down video, duping frame
Feb 12 01:05:16 vdr: video: 0:52:42.765 +256 360 0/\ms 45+5 v-buf
Feb 12 01:05:16 vdr: audio/alsa: start delay 336ms
Feb 12 01:05:16 vdr: [vaapidevice] empty video packet 26 bytes
[..]
vdr-plugin-vaapidevice/video.c
Line 3900 in 9da06d6
is the logic right here or should it be ||
Hi,
vaapidevice.<res>.Sharpness = 0
-1000 .. 1000 noise reduction level (0 off, -1000 max blur,
1000 max sharp)
Sharpness is probably not noise reduction :)
Hi,
I just noticed something "weird" ... I have prepared the marks to cut the movie and wanted to check if the marks are correct. So I jumped via 7 to the first mark and it showed the first picture of the movie. About 1-2s later the last picture of the movie is shown and it remains there ... so I jumped to the end of the movie via 9 and it shows the end of the movie ... 1-2s later it showed the first picture.
Maybe it shows the picture that was in the buffer for deinterlacing? I need to double check if it happens on SD recordings as well but I noticed it on HD recording from ARD where I have deinterlacing set to NONE.
Sorry for filing so many issues at the moment. I thought it is good filing everything that I noticed. This should be the last one for the moment :)
I noticed that for DVB-T2 channels, which are sent here in 1080p resolution, the picture is influenced by the settings that I do for 1080i. I was surprised that the settings for an interlaced resolution are actually applied here for a progressive one (even if the number of lines are the same). Actually, I thought the UHD settings would apply, although 1080p is also not UHD, so this would also not be the best fit. Maybe there should be separate settings for 1080p, or alternatively the 1080i section should be renamed to "1080i/1080p".
Hi,
when compiling vdr-vaapidevice on fedora 28, i get this error message:
+ make 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -fPIC' 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -fPIC' -j2
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -fPIC -I/usr/include/alsa -I/usr/include/libdrm -I/usr/include/ffmpeg -I/usr/include/ffmpeg -DPLUGIN_NAME_I18N='"vaapidevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_GLX -g -W -Wall -Wextra -Winit-self -Werror=overloaded-virtual -Wno-unused-parameter -c -o vaapidevice.o vaapidevice.cpp
cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -fPIC -I/usr/include/alsa -I/usr/include/libdrm -I/usr/include/ffmpeg -I/usr/include/ffmpeg -DPLUGIN_NAME_I18N='"vaapidevice"' -D_GNU_SOURCE -DAV_INFO -DAV_INFO_TIME=3000 -DUSE_GLX -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement -Wno-unused-parameter -std=c99 -c -o vaapidev.o vaapidev.c
vaapidev.c: In function 'VideoNextPacket':
vaapidev.c:649:50: error: 'FF_INPUT_BUFFER_PADDING_SIZE' undeclared (first use in this function); did you mean 'AV_INPUT_BUFFER_PADDING_SIZE'?
memset(avpkt->data + avpkt->stream_index, 0, FF_INPUT_BUFFER_PADDING_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
AV_INPUT_BUFFER_PADDING_SIZE
vaapidev.c:649:50: note: each undeclared identifier is reported only once for each function it appears in
vaapidev.c: In function 'PesInit':
vaapidev.c:1197:49: error: 'FF_INPUT_BUFFER_PADDING_SIZE' undeclared (first use in this function); did you mean 'AV_INPUT_BUFFER_PADDING_SIZE'?
pesdx->Buffer = av_malloc(PES_MAX_PAYLOAD + FF_INPUT_BUFFER_PADDING_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
AV_INPUT_BUFFER_PADDING_SIZE
make: *** [<builtin>: vaapidev.o] Error 1
installed software:
gcc-c++-8.0.1-0.14.fc28.x86_64
compat-ffmpeg28-2.8.13-3.fc28.x86_64
ffmpeg-3.5-0.3.20180211git.fc28.x86_64
libva-2.1.0-1.fc28.x86_64
libva-intel-driver-2.1.0-1.fc28.x86_64
vdr-plugin-vaapidevice/video.c
Line 2725 in 9da06d6
it can be replaced like
--- codec.c.orig 2018-02-03 20:52:17.250388421 +0100
+++ codec.c 2018-02-03 21:00:52.741757882 +0100
@@ -1497,7 +1497,32 @@
if (!frame)
return AVERROR(ENOMEM);
+#if 0
ret = avcodec_decode_audio4(avctx, frame, &got_frame, avpkt);
+#else
+// SUGGESTION
+// Now that avcodec_decode_audio4 is deprecated and replaced
+// by 2 calls (receive frame and send packet), this could be optimized
+// into separate routines or separate threads.
+// Also now that it always consumes a whole buffer some code
+// in the caller may be able to be optimized.
+ ret = avcodec_receive_frame(avctx,frame);
+ if (ret == 0)
+ got_frame = true;
+ if (ret == AVERROR(EAGAIN))
+ ret = 0;
+ if (ret == 0)
+ ret = avcodec_send_packet(avctx, avpkt);
+ if (ret == AVERROR(EAGAIN))
+ ret = 0;
+ else if (ret < 0)
+ {
+ Debug(3, "codec/audio: audio decode error: %1 (%2)\n",av_make_error_string(error, sizeof(error), ret),got_frame);
+ return ret;
+ }
+ else
+ ret = avpkt->size;
+#endif
if (ret >= 0 && got_frame) {
int i, ch;
int planar = av_sample_fmt_is_planar(avctx->sample_fmt);
@@ -1885,9 +1910,34 @@
#endif
got_frame = 0;
+#if 0
n = avcodec_decode_audio4(audio_ctx, frame, &got_frame,
- (AVPacket *) avpkt);
-
+ (AVPacket *) avpkt);
+#else
+// SUGGESTION
+// Now that avcodec_decode_audio4 is deprecated and replaced
+// by 2 calls (receive frame and send packet), this could be optimized
+// into separate routines or separate threads.
+// Also now that it always consumes a whole buffer some code
+// in the caller may be able to be optimized.
+ ret = avcodec_receive_frame(audio_ctx,frame);
+ if (ret == 0)
+ got_frame = 1;
+ if (ret == AVERROR(EAGAIN))
+ ret = 0;
+ if (ret == 0)
+ ret = avcodec_send_packet(audio_ctx, avpkt);
+ if (ret == AVERROR(EAGAIN))
+ ret = 0;
+ else if (ret < 0)
+ {
+ Debug(3, "codec/audio: audio decode error: %1 (%2)\n",av_make_error_string(error, sizeof(error), ret),got_frame);
+ return;
+ }
+ else
+ ret = avpkt->size;
+ n = ret; //FIXME: why n and not ret??
+#endif
if (n != avpkt->size) {
if (n == AVERROR(EAGAIN)) {
Error(_("codec/audio: latm\n"));
Hi,
the following patch makes vaapidevice compile with earlier version of libva (for me it compiles with this with libva 1.7.0):
--- video.c.orig 2018-02-21 10:59:01.807698117 +0100
+++ video.c 2018-02-21 14:51:50.527644830 +0100
@@ -81,9 +81,9 @@
#endif
#include <va/va_x11.h>
-#if !VA_CHECK_VERSION(1,0,0)
-#error "libva is too old - please, upgrade!"
-#endif
+//#if !VA_CHECK_VERSION(1,0,0)
+//#error "libva is too old - please, upgrade!"
+//#endif
#include <va/va_vpp.h>
#ifdef USE_GLX
#include <va/va_glx.h>
@@ -2291,9 +2291,11 @@
setenv("DISPLAY", display_name, 1);
#ifndef DEBUG
+#if VA_CHECK_VERSION(0,40,0)
vaSetErrorCallback(VaDisplay, NULL, NULL);
vaSetInfoCallback(VaDisplay, NULL, NULL);
#endif
+#endif
if (vaInitialize(VaDisplay, &major, &minor) != VA_STATUS_SUCCESS) {
Error("video/vaapi: Can't inititialize VA-API on '%s'", display_name);
vaTerminate(VaDisplay);
@@ -2426,7 +2428,7 @@
// intel: NV12 is native format for H.264 decoded surfaces
case AV_PIX_FMT_YUV420P:
case AV_PIX_FMT_YUVJ420P:
- fourcc = VA_FOURCC_I420; // aka. VA_FOURCC_IYUV
+ fourcc = VA_FOURCC_IYUV; // orig. VA_FOURCC_I420
break;
case AV_PIX_FMT_NV12:
fourcc = VA_FOURCC_NV12;
@@ -4417,7 +4419,7 @@
= frame->data[2][i * frame->linesize[2] + x];
}
}
- } else if (decoder->Image->format.fourcc == VA_FOURCC_I420) {
+ } else if (decoder->Image->format.fourcc == VA_FOURCC_IYUV) {
picture->data[0] = va_image_data + decoder->Image->offsets[0];
picture->linesize[0] = decoder->Image->pitches[0];
picture->data[1] = va_image_data + decoder->Image->offsets[1];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.