Re: [FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-11-05 Thread James Almer
On 11/5/2016 3:21 PM, Michael Niedermayer wrote:
> On Sun, Oct 09, 2016 at 12:51:42PM +0200, Michael Niedermayer wrote:
>> Hi
>>
>> Patches 1,5,6 of this patchset have no comments, are they rejected
>> need changes or something else ?
> 
> patches dont apply anymore
> ill mark them as not applicable and consider them droped
> this lack of interrest in qsv is disappointing

The supposed maintainers haven't replied to a single email in months,
which prompted another dev, Mark Thompson, to step in and clean the
qsv state so we could resume merges.
The limited amount of people capable of testing patches doesn't help
either.

Right now qsv is in a good state, synced with libav and afaik with a
couple extra features, thanks to the work of the aforementioned dev.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-11-05 Thread Michael Niedermayer
On Sun, Oct 09, 2016 at 12:51:42PM +0200, Michael Niedermayer wrote:
> Hi
> 
> Patches 1,5,6 of this patchset have no comments, are they rejected
> need changes or something else ?

patches dont apply anymore
ill mark them as not applicable and consider them droped
this lack of interrest in qsv is disappointing

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-10-09 Thread Michael Niedermayer
Hi

Patches 1,5,6 of this patchset have no comments, are they rejected
need changes or something else ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-08-25 Thread Nablet Developer
From: ChaoX A Liu 

Signed-off-by: ChaoX A Liu 
---
 libavcodec/qsv.c  | 89 ---
 libavcodec/qsv_internal.h |  6 ++--
 libavcodec/qsvdec.c   | 16 ++---
 libavcodec/qsvdec_h2645.c | 17 ++---
 libavcodec/qsvenc.c   | 12 +--
 libavcodec/qsvenc_hevc.c  | 19 +-
 6 files changed, 104 insertions(+), 55 deletions(-)

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 11d453d..b505e14 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -168,8 +168,7 @@ static int ff_qsv_set_display_handle(AVCodecContext *avctx, 
QSVSession *qs)
  * @param avctxffmpeg metadata for this codec context
  * @param session  the MSDK session used
  */
-int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
- const char *load_plugins)
+int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs)
 {
 mfxIMPL impl   = MFX_IMPL_AUTO_ANY;
 mfxVersion ver = { { QSV_VERSION_MINOR, QSV_VERSION_MAJOR } };
@@ -187,67 +186,87 @@ int ff_qsv_init_internal_session(AVCodecContext *avctx, 
QSVSession *qs,
 if (ret < 0)
 return ret;
 
+MFXQueryIMPL(qs->session, );
+
+switch (MFX_IMPL_BASETYPE(impl)) {
+case MFX_IMPL_SOFTWARE:
+desc = "software";
+break;
+case MFX_IMPL_HARDWARE:
+case MFX_IMPL_HARDWARE2:
+case MFX_IMPL_HARDWARE3:
+case MFX_IMPL_HARDWARE4:
+desc = "hardware accelerated";
+break;
+default:
+desc = "unknown";
+}
+
+av_log(avctx, AV_LOG_VERBOSE,
+   "Initialized an internal MFX session using %s implementation\n",
+   desc);
+
+return 0;
+}
+
+/**
+ * @brief Load plugins for a MSDK session
+ *
+ * Media SDK may need external plugins to decode/encode,
+ * such as hevc_dec and hevc_enc. So it's necessary to load
+ * proper plugins.
+ *
+ * @param session   the MSDK session used
+ * @param load_plugins  the load_plugins to be loaded.
+ */
+int ff_qsv_load_plugins(mfxSession session, const char *load_plugins)
+{
+int err = 0, load_num = 0, i;
+
 if (load_plugins && *load_plugins) {
 while (*load_plugins) {
 mfxPluginUID uid;
-int i, err = 0;
 
 char *plugin = av_get_token(_plugins, ":");
 if (!plugin)
 return AVERROR(ENOMEM);
 if (strlen(plugin) != 2 * sizeof(uid.Data)) {
-av_log(avctx, AV_LOG_ERROR, "Invalid plugin UID length\n");
 err = AVERROR(EINVAL);
 goto load_plugin_fail;
 }
+if (*load_plugins == ':')
+load_plugins ++;
 
 for (i = 0; i < sizeof(uid.Data); i++) {
 err = sscanf(plugin + 2 * i, "%2hhx", uid.Data + i);
 if (err != 1) {
-av_log(avctx, AV_LOG_ERROR, "Invalid plugin UID\n");
 err = AVERROR(EINVAL);
 goto load_plugin_fail;
 }
-
 }
 
-ret = MFXVideoUSER_Load(qs->session, , 1);
-if (ret < 0) {
-av_log(avctx, AV_LOG_ERROR, "Could not load the requested 
plugin: %s\n",
-   plugin);
-err = ff_qsv_error(ret);
+err = MFXVideoUSER_Load(session, , 1);
+if (err < 0) {
+err = ff_qsv_error(err);
 goto load_plugin_fail;
 }
+load_num ++;
 
-if (*load_plugins)
-load_plugins++;
 load_plugin_fail:
 av_freep();
-if (err < 0)
-return err;
+/*
+ * If more plugins are going to be loaded,
+ * ignore current error and continue.
+ */
+if (*load_plugins == ':') {
+load_plugins ++;
+err = 0;
+}
 }
+if (!load_num)
+return err;
 }
 
-MFXQueryIMPL(qs->session, );
-
-switch (MFX_IMPL_BASETYPE(impl)) {
-case MFX_IMPL_SOFTWARE:
-desc = "software";
-break;
-case MFX_IMPL_HARDWARE:
-case MFX_IMPL_HARDWARE2:
-case MFX_IMPL_HARDWARE3:
-case MFX_IMPL_HARDWARE4:
-desc = "hardware accelerated";
-break;
-default:
-desc = "unknown";
-}
-
-av_log(avctx, AV_LOG_VERBOSE,
-   "Initialized an internal MFX session using %s implementation\n",
-   desc);
-
 return 0;
 }
 
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index f289a2b..59d1336 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -80,8 +80,10 @@ int ff_qsv_error(int mfx_err);
 
 int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id);
 
-int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
- const char *load_plugins);
+int 

[FFmpeg-devel] [PATCH 1/6] lavc/qsv(hevc): Change default plugin from hevc_sw to hevc_default, which will load hevc_hw first, due to newly released MSDK.

2016-08-16 Thread Nablet Developer
From: ChaoX A Liu 

Signed-off-by: ChaoX A Liu 
---
 libavcodec/qsv.c  | 89 ---
 libavcodec/qsv_internal.h |  6 ++--
 libavcodec/qsvdec.c   | 16 ++---
 libavcodec/qsvdec_h2645.c | 17 ++---
 libavcodec/qsvenc.c   | 12 +--
 libavcodec/qsvenc_hevc.c  | 19 +-
 6 files changed, 104 insertions(+), 55 deletions(-)

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 11d453d..b505e14 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -168,8 +168,7 @@ static int ff_qsv_set_display_handle(AVCodecContext *avctx, 
QSVSession *qs)
  * @param avctxffmpeg metadata for this codec context
  * @param session  the MSDK session used
  */
-int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
- const char *load_plugins)
+int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs)
 {
 mfxIMPL impl   = MFX_IMPL_AUTO_ANY;
 mfxVersion ver = { { QSV_VERSION_MINOR, QSV_VERSION_MAJOR } };
@@ -187,67 +186,87 @@ int ff_qsv_init_internal_session(AVCodecContext *avctx, 
QSVSession *qs,
 if (ret < 0)
 return ret;
 
+MFXQueryIMPL(qs->session, );
+
+switch (MFX_IMPL_BASETYPE(impl)) {
+case MFX_IMPL_SOFTWARE:
+desc = "software";
+break;
+case MFX_IMPL_HARDWARE:
+case MFX_IMPL_HARDWARE2:
+case MFX_IMPL_HARDWARE3:
+case MFX_IMPL_HARDWARE4:
+desc = "hardware accelerated";
+break;
+default:
+desc = "unknown";
+}
+
+av_log(avctx, AV_LOG_VERBOSE,
+   "Initialized an internal MFX session using %s implementation\n",
+   desc);
+
+return 0;
+}
+
+/**
+ * @brief Load plugins for a MSDK session
+ *
+ * Media SDK may need external plugins to decode/encode,
+ * such as hevc_dec and hevc_enc. So it's necessary to load
+ * proper plugins.
+ *
+ * @param session   the MSDK session used
+ * @param load_plugins  the load_plugins to be loaded.
+ */
+int ff_qsv_load_plugins(mfxSession session, const char *load_plugins)
+{
+int err = 0, load_num = 0, i;
+
 if (load_plugins && *load_plugins) {
 while (*load_plugins) {
 mfxPluginUID uid;
-int i, err = 0;
 
 char *plugin = av_get_token(_plugins, ":");
 if (!plugin)
 return AVERROR(ENOMEM);
 if (strlen(plugin) != 2 * sizeof(uid.Data)) {
-av_log(avctx, AV_LOG_ERROR, "Invalid plugin UID length\n");
 err = AVERROR(EINVAL);
 goto load_plugin_fail;
 }
+if (*load_plugins == ':')
+load_plugins ++;
 
 for (i = 0; i < sizeof(uid.Data); i++) {
 err = sscanf(plugin + 2 * i, "%2hhx", uid.Data + i);
 if (err != 1) {
-av_log(avctx, AV_LOG_ERROR, "Invalid plugin UID\n");
 err = AVERROR(EINVAL);
 goto load_plugin_fail;
 }
-
 }
 
-ret = MFXVideoUSER_Load(qs->session, , 1);
-if (ret < 0) {
-av_log(avctx, AV_LOG_ERROR, "Could not load the requested 
plugin: %s\n",
-   plugin);
-err = ff_qsv_error(ret);
+err = MFXVideoUSER_Load(session, , 1);
+if (err < 0) {
+err = ff_qsv_error(err);
 goto load_plugin_fail;
 }
+load_num ++;
 
-if (*load_plugins)
-load_plugins++;
 load_plugin_fail:
 av_freep();
-if (err < 0)
-return err;
+/*
+ * If more plugins are going to be loaded,
+ * ignore current error and continue.
+ */
+if (*load_plugins == ':') {
+load_plugins ++;
+err = 0;
+}
 }
+if (!load_num)
+return err;
 }
 
-MFXQueryIMPL(qs->session, );
-
-switch (MFX_IMPL_BASETYPE(impl)) {
-case MFX_IMPL_SOFTWARE:
-desc = "software";
-break;
-case MFX_IMPL_HARDWARE:
-case MFX_IMPL_HARDWARE2:
-case MFX_IMPL_HARDWARE3:
-case MFX_IMPL_HARDWARE4:
-desc = "hardware accelerated";
-break;
-default:
-desc = "unknown";
-}
-
-av_log(avctx, AV_LOG_VERBOSE,
-   "Initialized an internal MFX session using %s implementation\n",
-   desc);
-
 return 0;
 }
 
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index f289a2b..59d1336 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -80,8 +80,10 @@ int ff_qsv_error(int mfx_err);
 
 int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id);
 
-int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
- const char *load_plugins);
+int