Re: [FFmpeg-devel] [PATCH] qsvenc: do not re-execute encoding on all positive status codes

2016-11-04 Thread Ivan Uskov
Hello Mark, Thursday, November 3, 2016, 10:55:05 PM, you wrote: > From: Anton Khirnov > It should only be done for DEVICE_BUSY/IN_EXECUTION > (cherry picked from commit 0956fd460681e8ccbdae19f135f0d3970bf95c2f) > Fixes ticket #5924. > --- > libavcodec/qsvenc.c | 2 +- > 1 file changed, 1 inse

Re: [FFmpeg-devel] [PATCH] hwcontext: add a QSV implementation

2016-09-19 Thread Ivan Uskov
Hello nablet, Saturday, September 17, 2016, 11:32:26 AM, you wrote: > From: Anton Khirnov > Signed-off-by: nablet developer > --- > libavutil/Makefile | 3 + > libavutil/hwcontext.c | 3 + > libavutil/hwcontext.h | 1 + > libavutil/hwcontext_internal.h |

Re: [FFmpeg-devel] [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop issue

2016-08-16 Thread Ivan Uskov
Hello Jun, Thursday, August 11, 2016, 10:59:51 AM, you wrote: > From cafa70e97ce48b65e2a4a99782f6ce3557fef755 Mon Sep 17 00:00:00 2001 > From: Jun Zhao > Date: Thu, 11 Aug 2016 15:34:01 +0800 > Subject: [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop > issue. > the merge co

Re: [FFmpeg-devel] Subject: [PATCH] libavcodec/qsvdec_h2645.c: switch to the new BSF API

2016-08-14 Thread Ivan Uskov
Hello Michael, Sunday, August 7, 2016, 8:18:54 PM, you wrote: > On Sun, Jul 24, 2016 at 10:05:27PM +0300, Ivan Uskov wrote: >> Hello All, >> >> This patch applies same changes as commit >> e3dfef8e3c85a64dbe6388117303f5819fa3c6a2 >> of libav: instead obsolete

Re: [FFmpeg-devel] [PATCH] Fix null dereferences in the qsv decoder

2016-08-07 Thread Ivan Uskov
Hello Yuli, Friday, July 29, 2016, 6:00:44 PM, you wrote: > This patch fixes the h264_qsv decoder issues mentioned > in https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=2962. > The patch may be tested by specifying h264_qsv as the decoder to ffplay > for an h264 encoded file. > ffplay

Re: [FFmpeg-devel] [PATCH] Fix double free and null dereferences in the qsv decoder

2016-07-29 Thread Ivan Uskov
Hello Yuli, Wednesday, July 27, 2016, 6:21:41 PM, you wrote: > This patch fixes the h264_qsv decoder issues mentioned > in https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=2962. > The patch may be tested by specifying h264_qsv as the decoder to ffplay > for an h264 encoded file. > ffpl

Re: [FFmpeg-devel] ffmpeg stuck in transcoding H264 using QSV

2016-07-26 Thread Ivan Uskov
Hello Chao, Tuesday, July 26, 2016, 9:04:49 AM, you wrote: > I tried to debug it a bit by comparing ffmpeg code with intel media SDK. > There is sth. I don't understand. Not sure whether it's related.. > In ffmpeg, we decode the frame in a loop >

Re: [FFmpeg-devel] A question regarding dangerous call inside libavformat\utils.c::has_decode_delay_been_guessed()

2016-07-25 Thread Ivan Uskov
Hello Michael, Sunday, July 24, 2016, 11:25:29 PM, you wrote: MN> On Sun, Jul 24, 2016 at 11:18:38PM +0300, Ivan Uskov wrote: >> Hello Michael, >> >> Sunday, July 24, 2016, 11:11:32 PM, you wrote: >> >> MN> On Sun, Jul 24, 2016 at 09:55:21PM +030

Re: [FFmpeg-devel] A question regarding dangerous call inside libavformat\utils.c::has_decode_delay_been_guessed()

2016-07-24 Thread Ivan Uskov
Hello Michael, Sunday, July 24, 2016, 11:25:29 PM, you wrote: MN> On Sun, Jul 24, 2016 at 11:18:38PM +0300, Ivan Uskov wrote: >> Hello Michael, >> >> Sunday, July 24, 2016, 11:11:32 PM, you wrote: >> >> MN> On Sun, Jul 24, 2016 at 09:55:21PM +030

Re: [FFmpeg-devel] A question regarding dangerous call inside libavformat\utils.c::has_decode_delay_been_guessed()

2016-07-24 Thread Ivan Uskov
Hello Michael, Sunday, July 24, 2016, 11:11:32 PM, you wrote: MN> On Sun, Jul 24, 2016 at 09:55:21PM +0300, Ivan Uskov wrote: >> Hello All, >> >> I have discovered the following issue: >> Latest builds of ffmpeg crashes into the h264.c when *hardware* qsv-based &

[FFmpeg-devel] Subject: [PATCH] libavcodec/qsvdec_h2645.c: switch to the new BSF API

2016-07-24 Thread Ivan Uskov
Hello All, This patch applies same changes as commit e3dfef8e3c85a64dbe6388117303f5819fa3c6a2 of libav: instead obsolete AVBitStreamFilterContext now new AVBSFContext filter uses to restore annex-B prefixes. Please review. -- Best regards, Ivan mailto:ivan.us...@n

[FFmpeg-devel] A question regarding dangerous call inside libavformat\utils.c::has_decode_delay_been_guessed()

2016-07-24 Thread Ivan Uskov
Hello All, I have discovered the following issue: Latest builds of ffmpeg crashes into the h264.c when *hardware* qsv-based h264 decoder uses. The crash does appear inside the int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; return h && h

Re: [FFmpeg-devel] [PATCH] avcodec/qsv: remove MFX_EXTBUFF_CODING_OPTION3

2016-07-24 Thread Ivan Uskov
Hello Zeranoe, Saturday, June 18, 2016, 7:33:12 AM, you wrote: zgc> From: Kyle Schwarz zgc> 4th generation Intel CPUs don't support MFX_EXTBUFF_CODING_OPTION3. zgc> This patch fixes bug #5324. zgc> --- zgc> libavcodec/qsvenc.c | 18 -- zgc> 1 file changed, 18 deletions(-) zgc

[FFmpeg-devel] [PATCH] qsvdec.c: Revert "Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'"

2016-07-24 Thread Ivan Uskov
Hello All, This reverts commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e, reversing changes made to acc155ac55baa95d1c16c0364b02244bc04d83a8. The commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e provided irrelevant code complexity and decoding slowdown. But main disadvantage of this commit is deco

Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-24 Thread Ivan Uskov
Hello Michael, Sunday, July 24, 2016, 12:16:59 AM, you wrote: MN> On Sat, Jul 23, 2016 at 11:19:59PM +0300, Ivan Uskov wrote: >> Hello 张玉晓, >> >> Friday, July 22, 2016, 4:10:36 AM, you wrote: >> >> 张> I have a question when learning ffmpeg qsv decoder and

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-24 Thread Ivan Uskov
Hello Mark, Saturday, July 23, 2016, 11:42:46 PM, you wrote: MT> On 23/07/16 20:33, Ivan Uskov wrote: >> If you are use qsv, I would like to recommend to roll-back to version before >> d30cf57a7b2097b565db02ecfffbdc9c16423d0e >> Really the d30cf57a7b2097b565db02ecfffbdc

Re: [FFmpeg-devel] Questions about Video Memory in qsv decoders

2016-07-23 Thread Ivan Uskov
Hello 张玉晓, Friday, July 22, 2016, 4:10:36 AM, you wrote: 张> I have a question when learning ffmpeg qsv decoder and Intel media sdk. 张> The intel media sdk suggest to use Video Memory while doing Hardware 张> decoding, use System Memory while doing Software decoding. 张> FFmpeg only used System Me

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-07-23 Thread Ivan Uskov
Hello Mark, Friday, July 15, 2016, 1:37:54 PM, you wrote: MT> On 15/07/16 07:15, Chao Liu wrote: >> Ivan Uskov nablet.com> writes: >> >>> >>> Hello All, >>> >>> After commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e qsv-based >>

Re: [FFmpeg-devel] [PATCH] avcodec/qsv: fix coding options

2016-05-30 Thread Ivan Uskov
Hello Kyle, Saturday, May 28, 2016, 8:07:07 AM, you wrote: zgc> From: Kyle Schwarz zgc> --- zgc> libavcodec/qsvenc.c | 34 ++ zgc> 1 file changed, 2 insertions(+), 32 deletions(-) zgc> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c zgc> index 132cf47..b

Re: [FFmpeg-devel] [PATCH] Bug fixed: wrong ticks_per_frame. For H.264 stream ticks_per_frame should be 2

2016-04-27 Thread Ivan Uskov
Hello Derek, Tuesday, April 26, 2016, 7:13:19 PM, you wrote: DB> On 4/26/2016 4:45 PM, wm4 wrote: >> I can see that this code is run only for h264, and I can see that you >> set the field to 2. The added comment adds no new information and is >> useless. DB> The ticks_per_frame docu literally sa

[FFmpeg-devel] [PATCH] Bug fixed: wrong ticks_per_frame. For H.264 stream ticks_per_frame should be 2

2016-04-26 Thread Ivan Uskov
Hello All, Monday, April 25, 2016, 6:50:18 PM, you wrote: HL> On Mon, Apr 25, 2016 at 5:44 PM, Ivan Uskov wrote: >> Hello Derek, >> >> Monday, April 25, 2016, 4:50:28 PM, you wrote: >> >> DB> On 4/25/2016 2:14 PM, Ivan Uskov wrote: >>>> The atta

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h2645.c Bug fixed: wrong ticks_per_frame.

2016-04-25 Thread Ivan Uskov
Hello Derek, Monday, April 25, 2016, 4:50:28 PM, you wrote: DB> On 4/25/2016 2:14 PM, Ivan Uskov wrote: >> The attached patch does fixes the issue of frames duplication when >> elementary h.264 stream decodes by qsvdec. DB> Could you perhaps elaborate in the commit m

[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h2645.c Bug fixed: wrong ticks_per_frame.

2016-04-25 Thread Ivan Uskov
Hello All, The attached patch does fixes the issue of frames duplication when elementary h.264 stream decodes by qsvdec. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsvdec_h2645.c-Bug-fixed-wrong-ticks_per_.patch Desc

[FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.

2016-04-25 Thread Ivan Uskov
Hello All, After commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e qsv-based decoding aborts with crash, there are many incorrect places appeared. The attached patch fixes the issues but keeps new method of the 'sync' variable allocation introduced in commit d30cf57a7b2097b565db02ecfffbdc9c

Re: [FFmpeg-devel] Cyrillic devices name support in libavdevice/dshow

2015-12-16 Thread Ivan Uskov
Hello All, Wednesday, December 16, 2015, 11:36:17 PM, you wrote: IU> Hello Derek, IU> Wednesday, December 16, 2015, 8:24:33 PM, you wrote: DB>> On 12/16/2015 4:29 PM, Roger Pack wrote: >>> Still mulling over why this would be needed...hm DB>> It makes sense that CP_OEMCP is needed for devi

Re: [FFmpeg-devel] Cyrillic devices name support in libavdevice/dshow

2015-12-16 Thread Ivan Uskov
Hello Derek, Wednesday, December 16, 2015, 8:24:33 PM, you wrote: DB> On 12/16/2015 4:29 PM, Roger Pack wrote: >> Still mulling over why this would be needed...hm DB> It makes sense that CP_OEMCP is needed for device names, in my mind, DB> after reading https://support.microsoft.com/en-us/kb

[FFmpeg-devel] [PATCH] avcodec/qsv: export session management functionality (variant #3)

2015-12-15 Thread Ivan Uskov
Hello All, There is updated patch version initially introduced by Sven Dueking This patch expose 3 QSV functions as public. This is needed because the VPP needs access to these functions too. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-a

Re: [FFmpeg-devel] [PATCH 1/2] qsvenc: Use scene-change hints from source frame if available

2015-12-14 Thread Ivan Uskov
Hello Will, Friday, December 11, 2015, 6:47:28 PM, you wrote: WK> Since adaptive_i support is broken, this allows the QSV encoder to use scene- WK> change hints from the input stream if force_key_frames = source is used. The WK> result will be improved transcoding quality at scene change bound

Re: [FFmpeg-devel] [PATCH] QSV : making three qsv routines public

2015-12-10 Thread Ivan Uskov
Hello Hendrik, Thursday, December 10, 2015, 2:00:51 PM, you wrote: >> What is wrong then? HL> The public qsv.h uses config.h, thats not allowed. ah, got it, thank. -- Best regards, Ivanmailto:ivan.us...@nablet.com ___ ffm

Re: [FFmpeg-devel] [PATCH] QSV : making three qsv routines public

2015-12-10 Thread Ivan Uskov
Hello Hendrik, Thursday, December 10, 2015, 1:10:59 PM, you wrote: This patch expose 3 QSV functions as public. This is needed because the VPP needs access to these functions too. Please review. >> >> HL> public API is not allowed to use config.h, it needs to be config an

Re: [FFmpeg-devel] [PATCH] QSV : making three qsv routines public

2015-12-10 Thread Ivan Uskov
Hello Hendrik, Thursday, December 10, 2015, 12:19:23 PM, you wrote: HL> On Thu, Dec 10, 2015 at 10:16 AM, Sven Dueking wrote: >> This patch expose 3 QSV functions as public. >> This is needed because the VPP needs access to these functions too. >> >> Please review. >> HL> public API is not allo

Re: [FFmpeg-devel] QSV

2015-11-27 Thread Ivan Uskov
Hello All, Friday, November 27, 2015, 11:34:52 AM, you wrote: IU> Hello Michael, IU> Thursday, November 26, 2015, 11:13:45 PM, you wrote: MN>> Hi MN>> are there any QSV patches which have been reviewed and have no MN>> objections raised against them ? MN>> that is patches i should apply/push f

Re: [FFmpeg-devel] QSV

2015-11-27 Thread Ivan Uskov
ld discuss any QSV issues or questions or patches or ... MN> iam asking as it was asked on IRC a few days ago MN> "Nov 22 18:51:46 * Daemon404 wonders if "Ivan Uskov" is on irc" Ok, I will try to connect to channel and be online. -- Best regards, Ivan

Re: [FFmpeg-devel] [PATCH] qsv.c: making qsv session routines common for libavcodec and libavfilter modules.

2015-11-13 Thread Ivan Uskov
Hello wm4, Friday, November 13, 2015, 11:28:46 AM, you wrote: >> HL> avutil is not a place we dump stuff that should be shared between >> HL> avcodec and avfilter, or similar, avutil should generally be public >> HL> useful API. >> I believe 3 of 4 functions here can be published as useful API.

Re: [FFmpeg-devel] [PATCH] qsv.c: making qsv session routines common for libavcodec and libavfilter modules.

2015-11-12 Thread Ivan Uskov
Hello Hendrik, Friday, November 13, 2015, 12:55:38 AM, you wrote: HL> On Thu, Nov 12, 2015 at 10:15 PM, Ivan Uskov wrote: >> Hello All, >> >> As it turned out, a suggested recently libavfilter/vf_qsv_vpp.c may not >> use >> ff_qsv_init_internal_sessio

[FFmpeg-devel] [PATCH] qsv.c: making qsv session routines common for libavcodec and libavfilter modules.

2015-11-12 Thread Ivan Uskov
Hello All, As it turned out, a suggested recently libavfilter/vf_qsv_vpp.c may not use ff_qsv_init_internal_session() from libavcodec/qsv.c. The attached patch moves qsv.c and qsv_internal.h to libavutil subdir to make corresponded routines common for codecs and filters. First argument of ff

Re: [FFmpeg-devel] [PATCH] qsvenc: write a53 caption data to SEI

2015-11-12 Thread Ivan Uskov
Hello Will, Thursday, November 12, 2015, 12:53:46 AM, you wrote: WK> On 11/07, Ivan Uskov wrote: >> Although the code looks ok by itself, I believe it is bad idea to place >> H.264-specific codeto the function which is commonfor all >> encod

Re: [FFmpeg-devel] [PATCHv3] Added QSV based VPP filter

2015-11-12 Thread Ivan Uskov
Hello All, Thursday, November 12, 2015, 1:33:28 PM, you wrote: SD> Attached an updated version of the VPP filter. SD> SD> Changes to v2 : SD> SD> -Copy input frame if not aligned SD> -Proper use of AVERROR(ENOMEM) SD> -Removed unneeded pointer checks SD> -

Re: [FFmpeg-devel] [PATCH] qsvenc: Add adaptive_i and adaptive_b toggles

2015-11-11 Thread Ivan Uskov
Hello Hendrik, Wednesday, November 11, 2015, 11:56:49 AM, you wrote: HL> On Tue, Nov 10, 2015 at 9:41 PM, Will Kelleher wrote: >> Signed-off-by: Will Kelleher >> --- >> libavcodec/qsvenc.c | 2 ++ >> libavcodec/qsvenc.h | 2 ++ >> libavcodec/qsvenc_h264.c | 2 ++ >> 3 files changed,

Re: [FFmpeg-devel] [PATCH] qsvenc: Add adaptive_i and adaptive_b toggles

2015-11-11 Thread Ivan Uskov
Hello Will, Tuesday, November 10, 2015, 11:41:19 PM, you wrote: WK> Signed-off-by: Will Kelleher WK> --- WK> libavcodec/qsvenc.c | 2 ++ WK> libavcodec/qsvenc.h | 2 ++ WK> libavcodec/qsvenc_h264.c | 2 ++ WK> 3 files changed, 6 insertions(+) WK> diff --git a/libavcodec/qsvenc.c b/li

Re: [FFmpeg-devel] [PATCH] qsvenc: write a53 caption data to SEI

2015-11-07 Thread Ivan Uskov
Hello Will, Saturday, November 7, 2015, 5:29:15 PM, you wrote: WK> --- WK> libavcodec/qsvenc.c | 114 WK> +-- WK> libavcodec/qsvenc.h | 2 +- WK> libavcodec/qsvenc_h264.c | 2 +- WK> 3 files changed, 113 insertions(+), 5 deletions(-) WK>

Re: [FFmpeg-devel] [PATCH] Added QSV based VPP filter - second try

2015-11-05 Thread Ivan Uskov
Hello wm4, Thursday, November 5, 2015, 5:07:08 PM, you wrote: >> >> >> > > +} else if (ret == MFX_WRN_DEVICE_BUSY) { >> >> > > +av_usleep(500); >> >> > >> >> > What. Use proper event-based waiting. >> It is not possible. >> >> >> >> That´s the same behavior as

Re: [FFmpeg-devel] [PATCH] Added QSV based VPP filter - second try

2015-11-05 Thread Ivan Uskov
Hello wm4, Thursday, November 5, 2015, 3:42:30 PM, you wrote: w> On Thu, 5 Nov 2015 12:49:50 +0100 w> "Sven Dueking" wrote: >> > > +} else if (ret == MFX_WRN_DEVICE_BUSY) { >> > > +av_usleep(500); >> > >> > What. Use proper event-based waiting. It is not possible.

Re: [FFmpeg-devel] QSV dynamically linked on linux

2015-10-16 Thread Ivan Uskov
Hello Julien, Thursday, October 15, 2015, 7:08:10 PM, you wrote: JF> Hi all, JF> I'm using QuickSync and FFmpeg on linux. JF> It works well for encoding and decoding when I build it with JF> --enable-static. JF> But when I build it with --enable-shared, it hangs. JF> So my question is: is it su

Re: [FFmpeg-devel] [RFC] QSV support clarifications

2015-10-13 Thread Ivan Uskov
Hello Stefano, Monday, October 12, 2015, 9:10:04 PM, you wrote: SS> 2. The mfx_dispatch library compiles fine on my system, but then I SS> wonder how it is supposed to reference the Intel Media library: SS> https://software.intel.com/en-us/intel-media-server-studio SS> ... SS> I'm able to compil

Re: [FFmpeg-devel] [PATCH] configure: disabling --enable-libmfx and --enable-gpl combination

2015-10-09 Thread Ivan Uskov
Hello Hendrik, Thursday, October 8, 2015, 11:43:37 PM, you wrote: HL> We're not talking about dynamic linking here though, but runtime loading. HL> Can I not use VAAPI because the underlying driver behind it may be closed HL> source? I do not know I'm not expert. But most likely VAAPI tre

Re: [FFmpeg-devel] [PATCH] configure: disabling --enable-libmfx and --enable-gpl combination

2015-10-08 Thread Ivan Uskov
Hello Timothy, Thursday, October 8, 2015, 8:29:31 PM, you wrote: >> HL> That doesn't seem correct to me. The mfx dispatcher library has the BSD >> HL> license plastered all over it. BSD is compatible with the GPL. >> Dispatcher, yes, but mfx library by itself which loaded by dispatcher is >> not.

Re: [FFmpeg-devel] [PATCH] configure: disabling --enable-libmfx and --enable-gpl combination

2015-10-08 Thread Ivan Uskov
Hello Hendrik, Thursday, October 8, 2015, 7:03:36 PM, you wrote: HL> That doesn't seem correct to me. The mfx dispatcher library has the BSD HL> license plastered all over it. BSD is compatible with the GPL. Dispatcher, yes, but mfx library by itself which loaded by dispatcher is not. HL> On top

[FFmpeg-devel] [PATCH] configure: disabling --enable-libmfx and --enable-gpl combination

2015-10-08 Thread Ivan Uskov
Hello All, Since libmfx is not under GPL, Intel asked to correct "configure" behavior for --enable-libmfx option to avoid licenses violation: ./configure --enable-libmfx - allowed ./configure --enable-libmfx --enable-gpl -prohibited, error message ./configure --enable-libmfx --enable-gpl --enabl

Re: [FFmpeg-devel] [PATCH] libavcodec/qsv.c: Re-design session control and internal allocation

2015-10-07 Thread Ivan Uskov
Hello wm4, Wednesday, October 7, 2015, 7:40:45 PM, you wrote: w> There's no automagic way to get this done. w> Hardware accelerators like vaapi and vdpau need the same thing. These w> have special APIs to set an API context on the decoder. Some APIs use w> hwaccel_context, vdpau uses av_vdpau_bi

Re: [FFmpeg-devel] [PATCH] libavcodec/qsv.c: Re-design session control and internal allocation

2015-10-07 Thread Ivan Uskov
Hello Hendrik, Wednesday, October 7, 2015, 5:58:25 PM, you wrote: HL> On Wed, Oct 7, 2015 at 4:41 PM, Ivan Uskov wrote: HL> Global static variables are not acceptable, sorry. HL> You'll have to find another way to solve your problem, but global HL> state is not the way to go.

[FFmpeg-devel] [PATCH] libavcodec/qsv.c: Re-design session control and internal allocation

2015-10-07 Thread Ivan Uskov
Hello All, The attached patch represents new design for qsv session control and internal allocation. All qsv modules now uses instance of AVQSVContext so now session allocates by external application and session allocates internally by ffmpeg itself handles by unified way. For the case of int

Re: [FFmpeg-devel] [PATCH] qsvenc.c: use query function to catch all kind of setting issues

2015-10-01 Thread Ivan Uskov
Hello Sven, >> fatal: corrupt patch at line 10 SD> Sorry, no idea what went wrong ... anyway - patch attached. I have tested this patch, looks good to me. -- Best regards, Ivanmailto:ivan.us...@nablet.com ___ ffmpeg-deve

Re: [FFmpeg-devel] Some questions about ffmpeg h264_qsv decoder

2015-09-16 Thread Ivan Uskov
Hello Ron, Wednesday, September 16, 2015, 9:00:02 AM, you wrote: R> a) qsv decode h264 file found many duplicated frames. I have posted the patch "[PATCH] libavcodec/qsvdec_h2645.c Bug fixed: wrong ticks_per_frame." to this list, please try to apply it the issue should be solved. R> b) A 19

[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h2645.c Bug fixed: wrong ticks_per_frame.

2015-09-16 Thread Ivan Uskov
Hello All, The attached patch does fixes the issue of frames duplication when elementary h.264 stream decodes by qsvdec. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsvdec_h2645.c-Bug-fixed-wrong-ticks_per_.patch Descr

Re: [FFmpeg-devel] [PATCH] QSV : Added look ahead rate control mode

2015-08-30 Thread Ivan Uskov
Hello Michael, Thursday, August 27, 2015, 6:47:43 PM, you wrote: MN> On Thu, Aug 27, 2015 at 11:02:44AM +0200, Sven Dueking wrote: >> > -Ursprüngliche Nachricht- >> > Von: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] Im Auftrag >> > von Sven Dueking >> > Gesendet: Freitag, 21. Au

Re: [FFmpeg-devel] [PATCH 1/3] libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored

2015-08-11 Thread Ivan Uskov
Hello Hendrik, Tuesday, August 11, 2015, 11:33:41 AM, you wrote: HL> On Sun, Aug 9, 2015 at 5:32 PM, Ivan Uskov wrote: >> Hello All, >> >> This patch, next two patches and also the patch posted by me a August 4 >> are fixing all issues about QSV-accelerated decodi

Re: [FFmpeg-devel] [PATCH 1/3] libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored

2015-08-09 Thread Ivan Uskov
Hello Ivan, Sunday, August 9, 2015, 6:32:55 PM, you wrote: IU> This patch, next two patches and also the patch posted by me a August 4 IU> are fixing all issues about QSV-accelerated decoding. all *known* issues of course. :-) -- Best regards, Ivanmailto:ivan.us..

[FFmpeg-devel] [PATCH 3/3] libavcodec/qsvdec.c: correct flush() handler has been implemented

2015-08-09 Thread Ivan Uskov
Hello All, The attached patch does add correct processing for the flush(), including QSV decoder resetting an internal buffers discarding. -- Best regards, Ivanmailto:ivan.us...@nablet.com 0003-libavcodec-qsvdec.c-correct-flush-handler-has-been-i.patch Description:

[FFmpeg-devel] PATCH 2/3] libavcodec/qsvdec.c: Extended error messages for MFXVideoDECODE_Init() result

2015-08-09 Thread Ivan Uskov
Hello all, the attached patch does extend error codes processing to give exact message when input format is not supported by QSV (for example mpeg 422 or avc 10 bit). -- Best regards, Ivanmailto:ivan.us...@nablet.com 0002-libavcodec-qsvdec.c-Extended-error-messages-

[FFmpeg-devel] [PATCH 1/3] libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored

2015-08-09 Thread Ivan Uskov
Hello All, This patch, next two patches and also the patch posted by me a August 4 are fixing all issues about QSV-accelerated decoding. I will absent two next weeks since August 11 and will not accessible by e-mail. But even if these patches will not applied to master repository are can be used

Re: [FFmpeg-devel] Questions about ffmpeg h264_qsv

2015-08-06 Thread Ivan Uskov
Hello Ron, Thursday, August 6, 2015, 5:34:51 AM, you wrote: R> Hi, R> I have some questions about ffmpeg h264_qsv with Intel media sdk. R> R> 1. The command 'ffmpeg -i in.mp4 -an -c:v h264_qsv out.mp4' to R> encode sucessful, how can I make the qsv decoder work? Just use the following syntax

[FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: correct handling of dynamic frame size changing has been implemented

2015-08-04 Thread Ivan Uskov
Hello All, This patch for libavcodec/qsvdec.c does implement a correct handling of a case when frame dimensions were changed somewhere in middle of stream. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsvdec.c-correct-handling-of

Re: [FFmpeg-devel] QSV Decoding - Issues and Regressions

2015-08-04 Thread Ivan Uskov
Hello Ronald, Tuesday, August 4, 2015, 5:24:45 AM, you wrote: RSB> Hi Ivan, RSB> On Mon, Aug 3, 2015 at 4:50 PM, Ivan Uskov wrote: >> Hello Ronald, >> >> Monday, August 3, 2015, 11:37:22 PM, you wrote: >> >> RSB> On Mon, Aug 3, 2015 at 3:25 PM, Ivan Usko

Re: [FFmpeg-devel] QSV Decoding - Issues and Regressions

2015-08-03 Thread Ivan Uskov
Hello Ronald, Monday, August 3, 2015, 11:37:22 PM, you wrote: RSB> On Mon, Aug 3, 2015 at 3:25 PM, Ivan Uskov wrote: >> By the way, about old implementation which "worked fine". >> It just did drop all buffered frames at decoder re-init on new >> sequence heade

Re: [FFmpeg-devel] QSV Decoding - Issues and Regressions

2015-08-03 Thread Ivan Uskov
Hello wm4, Monday, August 3, 2015, 10:33:30 PM, you wrote: w> I was under the impression that the original Libav code handled this w> correctly. Unfortunately not, you can still see this comment at line 371 https://git.libav.org/?p=libav.git;a=blob;f=libavcodec/qsvdec.c and there is no any flush

Re: [FFmpeg-devel] QSV Decoding - Issues and Regressions

2015-08-03 Thread Ivan Uskov
Hello Michael, Hendrik, I would like to make sure about following moment regarding handling of sequence header changing. The decoder has buffering of decoded frames, so when new frame dimensions are detected we can not just reset decoder, we should to deffer re-init and switch decoder to some "fl

Re: [FFmpeg-devel] QSV Decoding - Issues and Regressions

2015-08-03 Thread Ivan Uskov
Hello Hendrik, Thank you very much for the bugreport, I believe I will able to fix all these issues quick. In general all these issues are known and in my todo list. Monday, August 3, 2015, 3:18:04 PM, you wrote: HL> Hey, HL> after a discussion on IRC about the declining quality of the QSV HL

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-03 Thread Ivan Uskov
Hello Michael, Monday, August 3, 2015, 12:14:39 PM, you wrote: MN> On Mon, Aug 03, 2015 at 11:36:09AM +0300, Ivan Uskov wrote: >> Hello Hendrik, >> >> Monday, August 3, 2015, 12:45:36 AM, you wrote: >> >> >> HL> The decoder should depend on the heade

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-03 Thread Ivan Uskov
Hello Hendrik, Monday, August 3, 2015, 12:58:28 AM, you wrote: >> Because if it's missing, ff_get_format() refuses to return the QSV >> opaque format. I think. So you need AVHWAccels for every codec/decoder >> combination. HL> But if you use the normal h264 decoder and select the QSV format in H

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-03 Thread Ivan Uskov
Hello Hendrik, Monday, August 3, 2015, 12:45:36 AM, you wrote: HL> The decoder should depend on the header in configure directly already, HL> so its not built at all when the header is not available. In general I do not understanding why it necessary at all. All necessary headers currently avail

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-02 Thread Ivan Uskov
Hello Michael, Sunday, August 2, 2015, 9:46:23 PM, you wrote: >> MN> it appears the file was not in mfx_dispatch previously >> MN> so a check in confgure might be needed >> As I can see here >> https://github.com/lu-zero/mfx_dispatch/tree/master/mfx >> The mfxjpeg.h was added 17 days ago and marke

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-02 Thread Ivan Uskov
Hello wm4, Sunday, August 2, 2015, 9:38:33 PM, you wrote: >> w> Is mjpeg decoding so important that we need QSV decoding of it? >> Why not? It is for free. w> Having to maintain additional code has a cost, though. Near about zero, since qsv core common for all formats. -- Best regards, Ivan

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-02 Thread Ivan Uskov
Hello wm4, Sunday, August 2, 2015, 9:27:17 PM, you wrote: w> Is mjpeg decoding so important that we need QSV decoding of it? Why not? It is for free. -- Best regards, Ivanmailto:ivan.us...@nablet.com ___ ffmpeg-devel mai

Re: [FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-02 Thread Ivan Uskov
Hello Michael, Sunday, August 2, 2015, 8:55:45 PM, you wrote: >> +#if QSV_VERSION_ATLEAST(1, 3) >> +#include >> +#endif MN> this seems not working MN> CC libavcodec/qsv.o MN> libavcodec/qsv.c:33:25: fatal error: mfx/mfxjpeg.h: No such file or directory MN> #include MN>

[FFmpeg-devel] [PATCH] QSV MJPEG video decoder has been added.

2015-08-02 Thread Ivan Uskov
Hello All, The attached patch adds QSV-based mjpeg video decoder. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-QSV-MJPEG-video-decoder-has-been-added.patch Description: Binary data ___ ffmpeg-deve

Re: [FFmpeg-devel] [PATCH 1/2] libavcodec/qsvenc.c delay in 1 microsecond replaced to more appropriate 500 microseconds

2015-07-28 Thread Ivan Uskov
Hello wm4, Tuesday, July 28, 2015, 6:39:22 PM, you wrote: >> Official MFX/QSV samples by Intel are use 1 millisecond (i.e. 1000 >> microseconds) everywhere where MFX_WRN_DEVICE_BUSY does appear. >> So 500us is much more optimal value than 1us. w> Are you 100% sure that there is no event-based way

[FFmpeg-devel] [PATCH 2/2] libavcodec/qsvdec.c delay in 1 microsecond replaced to more appropriate 500 microseconds

2015-07-28 Thread Ivan Uskov
Hello All, There is same patch as 1/2 but for decoder part. -- Best regards, Ivanmailto:ivan.us...@nablet.com 0002-libavcodec-qsvdec.c-delay-in-1-microsecond-replaced-.patch Description: Binary data ___ ffmpeg-devel maili

[FFmpeg-devel] [PATCH 1/2] libavcodec/qsvenc.c delay in 1 microsecond replaced to more appropriate 500 microseconds

2015-07-28 Thread Ivan Uskov
Hello All, The attached patch replaces 1 microsecond delay to 500 microsecond for case when MFX library does return MFX_WRN_DEVICE_BUSY status. In general this warning never appears for simple encoding or transcoding session because GPU so fast so almost always not busy and any delay value just no

[FFmpeg-devel] [PATCH] libavcodec/hevc_mp4toannexb_bsf.c: Optional argument "private_spspps_buf" to avoid extradata modification.

2015-07-28 Thread Ivan Uskov
Hello All, This patch implements optional mode which disables context extradata modification by bsf. The modification of extradata become an issue when bsf restarts (after stream detection for example). Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com

[FFmpeg-devel] [PATCH 2/2] libavcodec/qsvdec_h264.c: using "private_spspps_buf" argument for av_bitstream_filter_filter() to avoid failure after decoder re-initialization.

2015-07-25 Thread Ivan Uskov
Hello All This patch uses new "private_spspps_buf" argument of h264_mp4toannexb_bsf.c. This allow to fix bug when the qsvdec_h264.c decoder is not able to decode mp4 and mkv. Please review. -- Best regards, Ivanmailto:ivan.us...@nablet.com 0002-libavcodec-qsvdec_h26

[FFmpeg-devel] [PATCH 1/2] libavcodec/h264_mp4toannexb_bsf.c: Optional argument "private_spspps_buf" to avoid extradata modification.

2015-07-25 Thread Ivan Uskov
Hello all, This patch implements optional mode which disables context extradata modification by bsf. The modification of extradata become an issue when bsf restarts (after stream detection for example). Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.co

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-25 Thread Ivan Uskov
Hello Michael, Saturday, July 25, 2015, 9:11:34 PM, you wrote: >> MN> if it avoids just a rare or small case then its not worth it >> I believe this trick will no give visible improvement in performance. >> Just small win in some rare cases. MN> then its better to avoid duplicating the bitstream

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-25 Thread Ivan Uskov
Hello Michael, Saturday, July 25, 2015, 8:21:44 PM, you wrote: >> MN> would this be faster ? >> MN> avoid a copy/malloc ? >> If it implemented inside libavcodec/qsvdec_h264.c then it will use >> about same code like current bsf implementation uses but with using of >> private buffer for sps/pps in

[FFmpeg-devel] [PATCH] avcodec: Add QSV VC-1 video decoder.

2015-07-25 Thread Ivan Uskov
Hello all, This patch adds QSV-based VC-1 video decoder. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-avcodec-Add-QSV-VC-1-video-decoder.patch Description: Binary data ___ ffmpeg-devel mailing lis

Re: [FFmpeg-devel] [PATCH] QSV MPEG-2 video decoder has been added.

2015-07-25 Thread Ivan Uskov
Hello Michael, Saturday, July 25, 2015, 6:30:14 PM, you wrote: MN> btw, if qsv_decode_init/qsv_decode_flush arent intended to be used MN> in the future they can be removed and the function pointers left at MN> NULL Ok, thank. -- Best regards, Ivanmailto:ivan.us..

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-25 Thread Ivan Uskov
Hello Michael, Saturday, July 25, 2015, 6:14:20 PM, you wrote: >> I can implement necessary functions to generate annex-b prefixes just into >> libavcodec/qsvdec_h264.c if Michael will agree this way. MN> would this be faster ? MN> avoid a copy/malloc ? If it implemented inside libavcodec/qsvdec

[FFmpeg-devel] [PATCH] QSV MPEG-2 video decoder has been added.

2015-07-25 Thread Ivan Uskov
Hello all, The attached patch adding the QSV-based MPEG2 video decoder. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-QSV-MPEG-2-video-decoder-has-been-added.patch Description: Binary data ___ ffmp

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-25 Thread Ivan Uskov
Hello Hendrik, Saturday, July 25, 2015, 3:13:38 PM, you wrote: HL> I'm slightly confused by the entire concept here. HL> - Why does the decoder need to re-init anyway? Each time when I launch a command line like: ./ffmpeg -c:v h264_qsv -i hd.mp4 -y result.yuv I can see that: 1. decoder opens, 2.

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-25 Thread Ivan Uskov
Hello Michael, Saturday, July 25, 2015, 12:51:36 PM, you wrote: >> Looks like no any parameters to avoid extradata substitution by >> h264_mp4toannexb_bsf. MN> yes, h264_mp4toannexb_bsf needs to be changed to optionally support MN> not doing that. MN> One way is to use the args for that and for

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-25 Thread Ivan Uskov
Hello Michael, Friday, July 24, 2015, 11:24:30 PM, you wrote: MN> it should be possible to add a parameter (passed through args) MN> which disables extradata mangling to h264_mp4toannexb_bsf I'm sorry, I do not see this possibility. The h264_extradata_to_annexb() into h264_mp4toannexb_bsf repla

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-24 Thread Ivan Uskov
Hello Hendrik, Friday, July 24, 2015, 2:37:11 PM, you wrote: >> The attached patch solves this issue. The corresponded code was taken >> from \libavcodec\crystalhd.c which also uses the h264_mp4toannexb_bsf >> filter. HL> I don't think this is safe. avctx->extradata is user-managed and HL> alloca

[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

2015-07-24 Thread Ivan Uskov
Hello All, The current implementation of libavcodec/qsvdec_h264.c does not store original extradata buffer. At the same time the \libavcodec\h264_mp4toannexb_bsf filter does modify extradata buffer inplace and fails to process it next time if decoder reinitializes. So it is not possible to decode

Re: [FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.

2015-07-24 Thread Ivan Uskov
Hello Michael, Friday, July 24, 2015, 12:26:27 PM, you wrote: MN> yes, it seems simpler, MN> and its only structs, not bitmaps so space wise it should not be a MN> problem Ok, really makes sense. There is modified patch attached with following changes: 1. static pre-allocation for 17 elements u

Re: [FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.

2015-07-24 Thread Ivan Uskov
Hello Michael, Friday, July 24, 2015, 2:50:49 AM, you wrote: >> The reason of replacing of av_usleep(1) to av_usleep(500) is >> following: I believe it is bad idea to ask hardware 100 times per >> second if it is busy, especially in main decoding loop. >> Peak qsv decoding performance is about

Re: [FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.

2015-07-24 Thread Ivan Uskov
Hello Michael, Friday, July 24, 2015, 2:48:45 AM, you wrote: >> +/* A decoder's latency depends not only by async_depth >> + but by DPB size too. The latency may acheve 16 frames. >> + So it is necessary to handle the size of async_fifo >> dynamically: >> +

Re: [FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.

2015-07-23 Thread Ivan Uskov
Hello Michael, Thursday, July 23, 2015, 11:47:28 PM, you wrote: >> For several test streams I'm observing that 2-3 bytes copying appear >> only at begin of decoding, for first 5-10 frames. MN> what are these additional bytes? MN> why are they not consumed ? At least for h.264 looks like absolute

Re: [FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.

2015-07-23 Thread Ivan Uskov
Hello Michael, Thursday, July 23, 2015, 6:29:13 PM, you wrote: >> +} else { >> +bs.Data = avpkt->data; >> +bs.DataLength = avpkt->size; >> +} MN> Does this mean that each packet will be memcpy-ed ? MN> this would slow things down Exactly not. Copying

Re: [FFmpeg-devel] [PATCH 3/4] libavcodec/qsvdec.c: The ff_qsv_decode() now guarantees the consumption of whole packet.

2015-07-23 Thread Ivan Uskov
Hello All , There is updated version of patch which should be applied without conflicts. Also here couple wrong places have been corrected into ff_qsv_decode(). Tuesday, July 21, 2015, 4:08:47 PM, you wrote: IU> Hello all, IU> Actual implementation of ff_qsv_decode() is not reliable, it may IU>

Re: [FFmpeg-devel] [PATCH 2/4] libavcodec/qsvdec_h264.c: refactoring: functional of qsv_process_data() has been moved into qsvdec.c

2015-07-23 Thread Ivan Uskov
Hello Michael, I have replaced 'ready' flag name to 'engine_ready' and added a corresponded comment. Regarding ff_qsv_prepare() looks like it is need not at all, I have modified ff_qsv_decode_init() instead. So patch become even simple, thank. Please review. NOTE The ff_qsv_decode_init() should

  1   2   >