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] 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] 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-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-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

[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] [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] 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

[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

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 &

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-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] 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] [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] [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] 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] 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] [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 |

[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

[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

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] 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] 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

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] Intel QSV MPEG2 video decoder

2015-06-29 Thread Ivan Uskov
Hello Hendrik, Thank you very much for the review, we will try to split one big invalid patch to sequence of small valid changes. Tuesday, June 30, 2015, 12:03:10 AM, you wrote: HL> On Mon, Jun 29, 2015 at 10:57 PM, Ivan Uskov wrote: >> Hello All, >> >> I'm softwar

[FFmpeg-devel] Patch to enable QSV acceleration under linux platform

2015-06-30 Thread Ivan Uskov
Hello All, Unlike Windows, under linux a valid display handle should be specified to open a QSV/MFX session. The attached patch does find appropriate display handle and transfers it to Intel's MFX library. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-Ad

Re: [FFmpeg-devel] Patch to enable QSV acceleration under linux platform

2015-06-30 Thread Ivan Uskov
:24:54PM +0300, Ivan Uskov wrote: >> + >> +/** >> + * @brief translate MSDK error codes to ffmpeg error codes >> + */ >> int ff_qsv_error(int mfx_err) >> { >> switch (mfx_err) { >> @@ -77,6 +89,22 @@ int ff_qsv_error(int mfx_err) >> }

Re: [FFmpeg-devel] Patch to enable QSV acceleration under linux platform

2015-06-30 Thread Ivan Uskov
Hello Michael, Thank you very much, there is fixed patch attached, please look. Tuesday, June 30, 2015, 7:21:53 PM, you wrote: MN> On Tue, Jun 30, 2015 at 06:28:08PM +0300, Ivan Uskov wrote: >> Hello Michael, >> >> I'm sorry, what exactly documentation should be add

[FFmpeg-devel] Patch to correct QSV encoder's quality presets set

2015-07-02 Thread Ivan Uskov
Hello All, There is a patch attached to more correct map QSV encoder quality presets. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-The-set-of-performance-presets-has-been-corrected-to.patch Description: Binary data

[FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: More correct selection of alignment of a frame height depending whether an encoded sequence progressive or not.

2015-07-04 Thread Ivan Uskov
Hello All, There is patch which fixes too strong frame height rounding for case when progressive frame sequence encodes by QSV. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsvenc.c.patch Description: Binary data __

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: More correct selection of alignment of a frame height depending whether an encoded sequence progressive or not.

2015-07-04 Thread Ivan Uskov
libxavs.c mpegvideo_enc.c nvenc.c Why it can not be used by similar way in qsvenc.c? Saturday, July 4, 2015, 4:34:32 PM, you wrote: HL> On Sat, Jul 4, 2015 at 2:38 PM, Ivan Uskov wrote: >> Hello All, >> >> There is patch which fixes too strong frame height rounding for cas

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: More correct selection of alignment of a frame height depending whether an encoded sequence progressive or not.

2015-07-06 Thread Ivan Uskov
Hello Michael, For any case there is need a way to encode h.264 with or without active frame_mbs_only_flag into SPS. If I understanding correct, the purpose of CODEC_FLAG_INTERLACED_DCT is exactly for this. Monday, July 6, 2015, 3:26:16 AM, you wrote: MN> the CODEC_FLAG_INTERLACED_DCT flag is i

[FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: A warning message when library will work at partial hardware acceleration

2015-07-06 Thread Ivan Uskov
Hello All, There is the patch attached which add warning message for case when QSV/MFX encoder has been initialized to work with partial hardware acceleration. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsvenc.c-A-warning-message-when-library-w.

[FFmpeg-devel] Subject: [PATCH] libavcodec/qsv.c: Linux-only code part has been moved to separate function in order to avoid the "ISO C90 forbids mixed declarations and code" compiler warning.

2015-07-06 Thread Ivan Uskov
Hello All, Unfortunately, previous patch for libavcodec/qsv.c at the commit db89f45535aa3e99bceb5f6bf957c90e7ca39841 does initiate the compiler warning "ISO C90 forbids mixed declarations and code" under linux platform, because there is declaration block under preprocessor condition. Looks like i

[FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: incorrect loop condition has been fixed.

2015-07-07 Thread Ivan Uskov
Hello All, For example, the encoder may return MFX_WRN_INCOMPATIBLE_VIDEO_PARAM warning i.e. ret==5 old loop implementation will repeat several times until output buffer overflow. New implementation explicitly uses loop only for device busy case. -- Best regards, Ivan

[FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: Fix for too agressive height alignment during frame encoding which may be reason of superflous frame copying.

2015-07-09 Thread Ivan Uskov
Hello All, There is another place into libavcodec/qsvenc.c where height may be aligned to 32 for the case when alignment to 16 is enough. It can be reason of superfluous frame copying. The attached patch does solve this issue. Please review. -- Best regards, Ivan mai

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: Fix for too agressive height alignment during frame encoding which may be reason of superflous frame copying.

2015-07-09 Thread Ivan Uskov
t in latest Intel's samples is always 16... Thursday, July 9, 2015, 3:18:58 PM, you wrote: MN> On Thu, Jul 09, 2015 at 02:24:43PM +0300, Ivan Uskov wrote: >> Hello All, >> >> There is another place into libavcodec/qsvenc.c where height may be >> aligned to 32 for

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: Fix for too agressive height alignment during frame encoding which may be reason of superflous frame copying.

2015-07-09 Thread Ivan Uskov
Hello Michael, Ok, I will take care. Thursday, July 9, 2015, 5:47:22 PM, you wrote: MN> Its not my code nor my change, i do not know what the correct value MN> is. MN> This change was merged by me and originates from libav. I tried to MN> merge things so they work, apparently i failed for ‘ff_he

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: Fix for too agressive height alignment during frame encoding which may be reason of superflous frame copying.

2015-07-09 Thread Ivan Uskov
Hello Michael, Please review the attached updated patch about height alignment. The qsvenc_hevc.c compiles now thanks. But same command line that I use for h264_qsv does fail for hevc_qsv with error "[hevc_qsv @ 0x25a7620] Unexpected NAL type in the extradata: 52" Here can be lot reasons includin

[FFmpeg-devel] [PATCH] libavcodec/qsvenc.c: improving handling for return codes of MFXVideoENCODE_EncodeFrameAsync

2015-07-09 Thread Ivan Uskov
Hello All, Current implementation of handling MFXVideoENCODE_EncodeFrameAsync() return codes allows unhanded silent warnings and unclear error reporting if the function return some non-successful code. The attached patch solves this issue and makes troubleshooting more easy. Please review. --

[FFmpeg-devel] [PATCH] libavcodec/qsv.c: Issue fixed: QSV engine does not release display handler under linux platform.

2015-07-13 Thread Ivan Uskov
Hello All, Current QSV engine implementation does allocate but never does release a display handler under linux platforms. The attached patch solved this issue, please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsv.c-Issue-fixed-QSV-e

Re: [FFmpeg-devel] [PATCH] libavcodec/qsv.c: Issue fixed: QSV engine does not release display handler under linux platform.

2015-07-14 Thread Ivan Uskov
Hello Gwenole, As I can see the current implementation of qsv-accelerated components already allows to use external MXF session created by main application. Please look the AVQSVContext structure into \libavcodec\qsv.h, example of its allocation into the \doc\examples\qsvdec.c and how AVCodecConte

[FFmpeg-devel] [PATCH] Refactoring to move common QSV-related code part into libavcodec/qsvdec.c

2015-07-14 Thread Ivan Uskov
Hello All, Current implementation of qsvdec_h264.c does contain initialization code which is common for all qsv-based decoders. The attached patch moves common code into qsvdec.c. The declaration ff_qsv_decode_init has been unified with ff_qsv_encode_init. Please review. -- Best regards, Iv

[FFmpeg-devel] libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-16 Thread Ivan Uskov
Hello All, Current implementation of libavcodec/qsvdec_h264.c does use external SPS parser. It does not optimal since MFX library has own unified way to parse headers of all supported formats. This performs by one MFXVideoDECODE_DecodeHeader() call. The suggested patch does replace stream specific

Re: [FFmpeg-devel] libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-16 Thread Ivan Uskov
Hello Hendrik, Ok, no problem. I will ask. But in general it makes no sense. I have got enough experience for MXF using and common transcoding developing to see that current implementation is not good and dangerous. I should to say that actually I see lot minor issues and quite ugly code pieces i

Re: [FFmpeg-devel] libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-16 Thread Ivan Uskov
Hello Michael, Usually I'm use annex-b streams to test. Since this functions calls after bitstream filter which restore annex-b codes it *should* work for mp4 too. But I did several tests just now and should to say that *both* versions, original and patched fails on mp4 files. Looks like bitstream

[FFmpeg-devel] Fwd: Re: libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-16 Thread Ivan Uskov
g now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c ===8<==Original message text=== On Thu, Jul 16, 2015 at 10:02 PM, Ivan Uskov wrote: > Hello All, > > Current implementation of libavcodec/qsvdec_h264.c does use external > SPS parser. It do

Re: [FFmpeg-devel] libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-17 Thread Ivan Uskov
Hello Michael, Ok, will do, thanks. Friday, July 17, 2015, 3:25:20 AM, you wrote: MN> also maybe you want to send a patch to add yourself to the MN> MAINTAINERs file for qsv* -- Best regards, Ivanmailto:ivan.us...@nablet.com _

[FFmpeg-devel] Adding myself as maintainer for qsv*

2015-07-20 Thread Ivan Uskov
Hello All, I have added myself as maintainer for qsv* part. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-Adding-myself-as-maintainer-for-qsv.patch Description: Binary data ___ ffmpeg-devel mailing

[FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: missed MFXVideoDECODE_Close() call

2015-07-20 Thread Ivan Uskov
Hello All, Current implementation never calls MFXVideoDECODE_Close() at decoding done that may be a reason of resource leak. The attached patch solves this issue. Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0001-libavcodec-qsvdec.c-missed-MFXV

Re: [FFmpeg-devel] libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-20 Thread Ivan Uskov
Hello Michael, Unfortunately, I do not received any feedback from both persons which maintain libavcodec/qsvdec_h264.c about details of current implementation. I still believe this is just defect of initial design. As I can see the libavcodec/qsvdec.c was changed recently by commit f929081f2e64d9

[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] 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.

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

[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] 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

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-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] [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] 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] [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] [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] 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] 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: 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] [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: 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

[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] 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

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] 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] 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] [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] [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, 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 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

[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] 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

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

[FFmpeg-devel] [PATCH 1/4] libavcodec/qsvdec_h264.c: SPS parsing now performs by MFXVideoDECODE_DecodeHeader() into libavcodec/qsvdec.c

2015-07-21 Thread Ivan Uskov
Hello All, There is first patch from 4 which makes qsv-based decode implementation more simple and reliable. This patch replaces external frame parse to internal MFXVideoDECODE_DecodeHeader() function which able to parse any supported stream kind (h.264, hevc, mpeg2, vc-1) by universal way. Pleas

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

2015-07-21 Thread Ivan Uskov
Hello All, The qsv_process_data() doing nothing h.264-specific, so it has been moved into qsvdec.c with new name ff_qsv_prepare(). Please review. -- Best regards, Ivan mailto:ivan.us...@nablet.com 0002-libavcodec-qsvdec_h264.c-refactoring-functional-of-q.patch Descr

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

2015-07-21 Thread Ivan Uskov
Hello all, Actual implementation of ff_qsv_decode() is not reliable, it may return without consumption of 1..3 last bytes of packet which initiates infinitive loop. New implementation guarantees that packet will consumed, now internal fifo uses to join unconsumed previous packet tail with new pack

[FFmpeg-devel] [PATCH 4/4] libavcodec/qsvdec_h264.c: packet buffering has been removed since qsvdec.c does maintain own data buffering now.

2015-07-21 Thread Ivan Uskov
Hello all, Since after [PATCH 3/4] the ff_qsv_decode() always consume whole packet payload buffering of packets into qsvdec_h264.c is need not more. Suggested patch makes qsvdec_h264.c simple as far as it possible. Please review. -- Best regards, Ivan mailto:ivan.us...@

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

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 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 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-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-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, 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

[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] 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

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-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 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.

[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 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

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..

[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] 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

  1   2   >