Quantcast
Channel: Intel® Software - Media
Viewing all 2185 articles
Browse latest View live

Visual artifacts found when using Intel media SDK VPP on few machines

$
0
0

Working with intel media sdk , succeeded with the following scenario.

Capturing the screen and encoding those images using hardware h264 codec. Could play the encoded h264 bitstream using ffplay. But when I used the same code on a different windows machine, found some difference in colors.

In order to find the problem, separated VPP and encoding blocks of code. And tried software implementation of Intel media SDK, the bitstream was fine. With hardware implementation of VPP, found artifacts.

Used intel media sdk tutorial  0.0.3 and attached the system analyzer report(Amith-PC-HW-report.txt) 

and the screenshot of the color differences(scaling-artifacts.png) and actual colors(scaling.png).

Any help resolving this would be appreciated.

 


[screen capture] MFX_WRN_PARTIAL_ACCELERATION

$
0
0

I  setup the intel media SDK 2017R1 and get the screen capture sample from https://software.intel.com/en-us/articles/intel-media-sdk-screen-capture

while run to MFXVideoDECODE_Query (Line 695) ,it return MFX_WRN_PARTIAL_ACCELERATION,

Exec command is :

screen_capture.exe -w 1920 -h 1080 -p 22d62c07e672408fbb4cc20ed7a053e4 -hw -impl d3d11 -fourcc nv12 -o D:\\test.yuv

 

My computer DirectX version is 12.

 

The mediasdk_system_analyzer_64.exe out follow message:

Intel(R) Media Server Studio 2017 - System Analyzer (64-bit)

 

 

The following versions of Media SDK API are supported by platform/driver

[opportunistic detection of MSDK API > 1.23]:

 

        Version Target  Supported       Dec     Enc

        1.0     HW      Yes             X       X

        1.0     SW      Yes             X       X

        1.1     HW      Yes             X       X

        1.1     SW      Yes             X       X

        1.2     HW      Yes             X       X

        1.2     SW      Yes             X       X

        1.3     HW      Yes             X       X

        1.3     SW      Yes             X       X

        1.4     HW      Yes             X       X

        1.4     SW      Yes             X       X

        1.5     HW      Yes             X       X

        1.5     SW      Yes             X       X

        1.6     HW      Yes             X       X

        1.6     SW      Yes             X       X

        1.7     HW      Yes             X       X

        1.7     SW      Yes             X       X

        1.8     HW      Yes             X       X

        1.8     SW      Yes             X       X

        1.9     HW      Yes             X       X

        1.9     SW      Yes             X       X

        1.10    HW      Yes             X       X

        1.10    SW      Yes             X       X

        1.11    HW      Yes             X       X

        1.11    SW      Yes             X       X

        1.12    HW      Yes             X       X

        1.12    SW      Yes             X       X

        1.13    HW      Yes             X       X

        1.13    SW      Yes             X       X

        1.14    HW      Yes             X       X

        1.14    SW      Yes             X       X

        1.15    HW      Yes             X       X

        1.15    SW      Yes             X       X

        1.16    HW      Yes             X       X

        1.16    SW      Yes             X       X

        1.17    HW      Yes             X       X

        1.17    SW      Yes             X       X

        1.18    HW      Yes             X       X

        1.18    SW      Yes             X       X

        1.19    HW      Yes             X       X

        1.19    SW      Yes             X       X

        1.20    HW      Yes             X       X

        1.20    SW      Yes             X       X

        1.21    HW      Yes             X       X

        1.21    SW      Yes             X       X

        1.22    HW      Yes             X       X

        1.22    SW      Yes             X       X

        1.23    HW      Yes             X       X

        1.23    SW      Yes             X       X

 

Graphics Devices:

        Name                                         Version             State

        iDisplay (Microsoft Corporation - WDDM v1.1) 12.41.36.57         08

        Intel(R) HD Graphics 530                     21.20.16.4664       Active

        NVIDIA GeForce GTX 960M                      23.21.13.9077       Active

 

System info:

        CPU:    Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz

        OS:     Microsoft Windows 10 ?????

        Arch:   64 ?

 

Installed Media SDK packages (be patient...processing takes some time):

        Intel(R) Media SDK 2017 R1

 

What wrong ? 

Thanks. Looking forward to your reply.

 

How to select scale algorithm

$
0
0

Hi, all

        How to select scale algorithm with intel media sdk?

thanks!

Question about latest skl_dmc_ver1_27.bin and kernel version.

$
0
0

I am trying to setup Intel's new open-source iHD driver on a Yocto environment.

https://software.intel.com/en-us/articles/build-and-debug-open-source-me...

The documentation says that skl_dmc_ver1_27.bin is required. Their documentation updates a symlink (skl_dmc_ver1.bin), as if the kernel loads it, but starting at kernel 4.8, it stopped loading the symlink and instead loads a specific version of the dmc (see here: https://github.com/torvalds/linux/blob/v4.8/drivers/gpu/drm/i915/intel_c...). Is the Intel documentation accurate? It is confusing because the guide refers to 4.14.16 specifically, which doesn't use the symlink file skl_dmc_ver1.bin.

Any ways, I tried replacing skl_dmc_ver1_26.bin with skl_dmc_ver1_27.bin to have the same effect, but I got a segfault on boot.

https://pastebin.com/amW9vDdC

Should I even bother updating the DMC? Should the iHD driver work on most kernels, even with 1_26 version of DMC?

By the way, this is the kernel I am using (with Yocto).

https://github.com/intel/linux-intel-lts/tree/4.14/yocto/base/drivers/gp...

Any help would be greatly appreciated. There is no documentation on this stuff.

Intel Graphics for Linux @ 01.org VS. Intel Media SDK @ intel.com

$
0
0

Seem like parallel efforts hosted by different website. I'm curious what the difference is.

Is it true the SDK we can download from Intel Media SDK is some sort of compiled version of those on 01.org

Also, Intel Media SDK doesn't seem to support some of the processors that I'm interested in. Some discussion suggest that if I need to unlock the GPU hardware on those unsupported processors, I should go with Intel Graphics for Linux from 01.org. However, those on 01.org are very poorly documented in terms of their application. 

The specific processors I'm interested in are Pentium N3710 and Pentium N4200. I would like to use their hardware video codec

Thanks,
-Xueming

Unable to load Screen Capture plugin

$
0
0

I'm trying to test the screen capture plugin, which is installed on my system at <media_sdk>/bin/win32/22d62c07e672408fbb4cc20ed7a053e4.  However, after initializing MFX to the latest supported hardware implementation (1.20 on this machine), a call to MFXVideoUSER_Load results in MFX_ERR_NOT_FOUND.  See the code excerpt below:

version.Major = 1;
version.Minor = 20;

res = MFXInit(MFX_IMPL_HARDWARE, &version, &session);

// Check for error...

res = MFXVideoUSER_Load(session, &MFX_PLUGINID_CAPTURE_HW, 1);

// res == -9 is true

Here is the result of running the system analysis tool:

Intel(R) Media Server Studio 2016 R2 - System Analyzer (32-bit)


The following versions of Media SDK API are supported by platform/driver
[opportunistic detection of MSDK API > 1.19]:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.2     HW      Yes             X       X
        1.2     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X       X
        1.4     SW      Yes             X       X
        1.5     HW      Yes             X       X
        1.5     SW      Yes             X       X
        1.6     HW      Yes             X       X
        1.6     SW      Yes             X       X
        1.7     HW      Yes             X       X
        1.7     SW      Yes             X       X
        1.8     HW      Yes             X       X
        1.8     SW      Yes             X       X
        1.9     HW      Yes             X       X
        1.9     SW      Yes             X       X
        1.10    HW      Yes             X       X
        1.10    SW      Yes             X       X
        1.11    HW      Yes             X       X
        1.11    SW      Yes             X       X
        1.12    HW      Yes             X       X
        1.12    SW      Yes             X       X
        1.13    HW      Yes             X       X
        1.13    SW      Yes             X       X
        1.14    HW      Yes             X       X
        1.14    SW      Yes             X       X
        1.15    HW      Yes             X       X
        1.15    SW      Yes             X       X
        1.16    HW      Yes             X       X
        1.16    SW      Yes             X       X
        1.17    HW      Yes             X       X
        1.17    SW      Yes             X       X
        1.18    HW      Yes             X       X
        1.18    SW      Yes             X       X
        1.19    HW      Yes             X       X
        1.19    SW      Yes             X       X
        1.20    HW      Yes             X       X
        1.20    SW      Yes             X       X
        1.21    SW      Yes             X       X
        1.22    SW      Yes             X       X
        1.23    SW      Yes             X       X

Graphics Devices:
        Name                                         Version             State
        Intel(R) Iris(TM) Pro Graphics P6300         20.19.15.4835       Active
        VMware SVGA 3D                               8.15.1.60           Active

System info:
        CPU:    Intel(R) Xeon(R) CPU E3-1285L v4 @ 3.40GHz
        OS:     Microsoft Windows 10 Enterprise
        Arch:   64-bit

Installed Media SDK packages (be patient...processing takes some time):
        Intel(R) Media SDK 2017 R1
        Samples for Intel(R) Media SDK 2017 for Windows*

Installed Media SDK DirectShow filters:

Installed Intel Media Foundation Transforms:
        Intel(R) Quick Sync Video H.264 Encoder MFT : {4BE8D3C0-0515-4A37-AD55-E4BAE19AF471}



Analysis complete... [press ENTER]

And here are the contents of the plugin's config file:

PluginVersion = 1
APIVersion    = 279 //0x0117
FileName32    = "mfxplugin32_screen_capture.dll" 
FileName64    = "mfxplugin64_screen_capture.dll" 
Type          = 01 //decode
CodecID       = "CAPT"
Default       = 0

Running the screen_decode.exe sample yields a similar result.

What could be causing the API not to find the plugin?

H264 SVC in Intel Media SDK

$
0
0

Hi Team,

I have downloaded Intel Media SDK  2017 trail version and in one document i can see that H.264 compressed streams are AVC and MVC (Multi-View Coding). I would like to know whether Intel Media SDK supports H264 SVC or not.

 

Thanks & Regards,

vittal

VPP color space conversion BT.601 to BT.709

$
0
0

Hi,

I'd like to know whether the color conversion NV12 (BT.601) to NV12 (BT.709) is possible with VPP or not.

Thank you,
Stefan.


Full range of color conversion from RGB to YUV

$
0
0

 

A customer of us  wants to use VPP for doing a color conversion from RGB to YUV. It works fine but the output is according to BT.601 where the  Y range is [16,235] and UV is [16,240] in 8bit data depth. However, the customer wants to convert with a full swing [0, 255] on both Y, and U, V. He wants to run detection algorithms and therefore does not want to loose information depth.

Can we switch to full color depth conversion ?

Product used from us is APL , SW is Gordon Peak 1.04 (TSD).  It would be good to know in the first place  if the VPP HW can support this.

regards

Michael

Intel Media SDK Intel(R)_Media_SDK_2017.0.1 Install and Run a sample codes in Windows

$
0
0

 

Hi,

 I'm totally new to intel media sdk, When i looking for video conversion options, i found this sdk. So i tried to do run a sample codes for proof of concept.

 Here is my system analyze report.

Intel(R) Media Server Studio 2017 - System Analyzer (64-bit)

The following versions of Media SDK API are supported by platform/driver
[opportunistic detection of MSDK API > 1.23]:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.2     HW      Yes             X       X
        1.2     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      No
        1.4     SW      Yes             X       X
        1.5     HW      No
        1.5     SW      Yes             X       X
        1.6     HW      No
        1.6     SW      Yes             X       X
        1.7     HW      No
        1.7     SW      Yes             X       X
        1.8     HW      No
        1.8     SW      Yes             X       X
        1.9     HW      No
        1.9     SW      Yes             X       X
        1.10    HW      No
        1.10    SW      Yes             X       X
        1.11    HW      No
        1.11    SW      Yes             X       X
        1.12    HW      No
        1.12    SW      Yes             X       X
        1.13    HW      No
        1.13    SW      Yes             X       X
        1.14    HW      No
        1.14    SW      Yes             X       X
        1.15    HW      No
        1.15    SW      Yes             X       X
        1.16    HW      No
        1.16    SW      Yes             X       X
        1.17    HW      No
        1.17    SW      Yes             X       X
        1.18    HW      No
        1.18    SW      Yes             X       X
        1.19    HW      No
        1.19    SW      Yes             X       X
        1.20    HW      No
        1.20    SW      Yes             X       X
        1.21    HW      No
        1.21    SW      Yes             X       X
        1.22    HW      No
        1.22    SW      Yes             X       X
        1.23    HW      No
        1.23    SW      Yes             X       X

Graphics Devices:
        Name                                         Version             State
        Intel(R) HD Graphics Family                  8.15.10.2598        08
        NVIDIA GeForce GT 555M                       8.17.12.9610        Active

System info:
        CPU:    Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
        OS:     Microsoft Windows 7 Ultimate
        Arch:   64-bit

Installed Media SDK packages (be patient...processing takes some time):
        Intel(R) Media SDK 2017 R1
        Intel(R) Media Server Studio 2017 R3 - Software Development Kit
        Samples for Intel(R) Media SDK 2017 for Windows*

Installed Media SDK DirectShow filters:

Installed Intel Media Foundation Transforms:
        Intel(R) Hardware VC-1 Decoder MFT : {059A5BAE-5D7A-4C5E-8F7A-BFD57D1D6A
AA}
        Intel(R) Hardware H.264 Decoder MFT : {45E5CE07-5AC7-4509-94E9-62DB27CF8
F96}
        Intel(R) Hardware MPEG-2 Decoder MFT : {CD5BA7FF-9071-40E9-A462-8DC5152B
1776}
        Intel(R) Quick Sync Video H.264 Encoder MFT : {4BE8D3C0-0515-4A37-AD55-E
4BAE19AF471}
        Intel(R) Hardware Preprocessing MFT : {EE69B504-1CBF-4EA6-8137-BB10F806B
014}

 

And I'm using Visual Studio C++ 2017 to build sample codes.

please guide me to find a right way to get it.

Thank you in advance

 

 

       

can i make VOIP Service using Intel media Server Studio?

$
0
0

Dear All

I have simple question about Intel Media Server Studio. 

My team are reviewing about VOIP service using any S/W.
one of candidate is Intel Media Server Studio. so i checked document but i could not find suitable information about VOIP.

can i make VIOP Service using Intel Media Server Studio?

Please let me know.

Best regards

Powell Chang

Memory leak in sample_decode of M-SDK

$
0
0

Hi, I encountered some memory leaking and CPU load increasing problems while use M-SDK for H264 decoding on Intel HD P530 graphics.

1. My environment is shown as follows:

(1) OS: Windows10 enterprise version 64b

(2) VS2015-14.0.25420.01 Update3

(3) CPU: Intel(R)Xeon(R) CPU E3-1245 v5@3.5GHz

(4) GPU: HD P530

(5) System memory: 32GB

2. Test steps.

(1) I downloaded sample-master.zip version Version 6.0.0.142, from the URL, which is given in intel's official website: https://github.com/Intel-Media-SDK/samples

(2) Open the decoding solution located in samples/sample_decode.

(3) One 1080p h264 stream is as the input.

(4) Set command parameter in VS: h264 -i H:\DHY\STREAM\planet_1080p.264 -p,  "H:\DHY\STREAM\planet_1080p.264" is the stream path.

(5) Add fseek() in code in order to read in that input stream in  an infiniteloop, because there are only about 40000 frame within that file.

3. Outcome

(1) When the first frame is decoded, the CPU load is 10%, and memory usage is 91MB in Windows's task-manager,

(2) After the process runs 60 minutes, I pause the process and it says the CPU is 14% while memory usage is 148MB.

(3) During this period, CPU load increase 4% and memory usage increase 57MB, however the memory usage value goes up continuously.

4. Can you give me some advice for these question described above。

Thanks for your patience.

Wharyoung.D

16.Mar.2018

[Yocto] jethro meta-intel-msdk failed to unpack rpm files

$
0
0

Dear all,

I m in charge of building a Linux image that will ship the intel-msdk, with the help of Yocto.

Dealing with the official "yocto" layer, I followed the steps described in
https://software.intel.com/en-us/blogs/2017/03/13/media-sdk-for-embedded-linux-launch

But Bitbake failed to install themsdk-media driver on the following error:

ERROR: Function failed: do_install (log file is located at /home/jethro/tmp/work/corei7-64-poky-linux/msdk-media/16.7.3-r0/temp/log.do_install.19186)
ERROR: Logfile of failure stored in: /home/jethro/tmp/work/corei7-64-poky-linux/msdk-media/16.7.3-r0/temp/log.do_install.19186
Log data follows:
| DEBUG: Executing shell function do_install
| cp: cannot stat '/home/jethro/tmp/work/corei7-64-poky-linux/msdk-media/16.7.3-r0/etc': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at /home/jethro/tmp/work/corei7-64-poky-linux/msdk-media/16.7.3-r0/temp/log.do_install.19186)
ERROR: Task 2 (/home/jade/users/marec/poky-jethro/meta-intel-msdk/recipes-graphics/msdk-media/msdk-media_16.7.3.bb, do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1637 tasks of which 1636 didn't need to be rerun and 1 failed.
No currently running tasks (1383 of 1704)

 

moreover, the built package for the msdk itself is empty.

This is related to the way SRC_URI is defined, i.e. as "rpm" files.

SRC_URI = "file://files/intel-linux-media-${PV}*.rpm;subdir=${BP};name=msdk-rpm"


SRC_URI = "file://files/intel-linux-mediasdk-${PV}-*.rpm;subdir=${BP};name=msdk-rpm \
           file://files/intel-linux-mediasdk-devel-${PV}-*.rpm;subdir=${BP};name=msdk-rpm"

 

I m not a yocto expert but this is not the usual way of fetching and unpacking files from a yocto recipe.
If I am not mistaken, basically the "rpm" file is just copied to the root directory of the package ( ${WORKDIR} ).
That means that "rpm" is not called in any way and no further action will be triggered to unpack the files contents.
So the "do_install" action has no file to copy to the destination folder and failed.

How to use the yocto intel-msdk-layer correctly ?

thanks.

 

QSV on FFMPEG can not decode 1080p h264 stream?

$
0
0

Hi,

I get FFMPEG's qsvdec.c from version ffmpeg-20180130-42323c3-win64-dev. then make and build my own solution to decode h264 stream on Win10 & VS2015 through qsv feature. however, if input 1080p h264 stream, and it meets errors after decode some frames  and output log as:

[AVHWFramesContext @ 0000026ad0cf0820] Error synchronizing the operation:-17

Error thansferring the data to system memory.

On the other side, I input a 720*576 h264 stream to qsvdec, and it works well.

It's appreciate to anyone give me some advice.

Thanks & Regards.

Wharyoung.D

 

QSV and ffmpeg C++ example

$
0
0

I'm trying to use qsv from ffmpeg with an example i found if ffmpeg src, but it isnt work for me, could you suggest me another one example or say what i do wrong?

When i used this example i had an output:

[AVHWFramesContext @ 048F29E0] Error synchronizing the operation: -3
Error transferring the data to system memory
[AVHWFramesContext @ 048F29E0] Error synchronizing the operation: -2
Error transferring the data to system memory

if i change in function ret = av_hwdevice_ctx_create(&decode.hw_device_ref, AV_HWDEVICE_TYPE_QSV, "auto", NULL, 0) "auto" to "auto_any" its starts work but it using my Nvidia? not Intel Gpu....what I do wrong?

 

There is an example src i used:

/*
 * Copyright (c) 2015 Anton Khirnov
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

/**
 * @file
 * Intel QSV-accelerated H.264 decoding example.
 *
 * @example qsvdec.c
 * This example shows how to do QSV-accelerated H.264 decoding with output
 * frames in the GPU video surfaces.
 */

#include "config.h"

#include <stdio.h>

#include "libavformat/avformat.h"
#include "libavformat/avio.h"

#include "libavcodec/avcodec.h"

#include "libavutil/buffer.h"
#include "libavutil/error.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/mem.h"

typedef struct DecodeContext {
    AVBufferRef *hw_device_ref;
} DecodeContext;

static int get_format(AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts)
{
    while (*pix_fmts != AV_PIX_FMT_NONE) {
        if (*pix_fmts == AV_PIX_FMT_QSV) {
            DecodeContext *decode = avctx->opaque;
            AVHWFramesContext  *frames_ctx;
            AVQSVFramesContext *frames_hwctx;
            int ret;

            /* create a pool of surfaces to be used by the decoder */
            avctx->hw_frames_ctx = av_hwframe_ctx_alloc(decode->hw_device_ref);
            if (!avctx->hw_frames_ctx)
                return AV_PIX_FMT_NONE;
            frames_ctx   = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
            frames_hwctx = frames_ctx->hwctx;

            frames_ctx->format            = AV_PIX_FMT_QSV;
            frames_ctx->sw_format         = avctx->sw_pix_fmt;
            frames_ctx->width             = FFALIGN(avctx->coded_width,  32);
            frames_ctx->height            = FFALIGN(avctx->coded_height, 32);
            frames_ctx->initial_pool_size = 32;

            frames_hwctx->frame_type = MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;

            ret = av_hwframe_ctx_init(avctx->hw_frames_ctx);
            if (ret < 0)
                return AV_PIX_FMT_NONE;

            return AV_PIX_FMT_QSV;
        }

        pix_fmts++;
    }

    fprintf(stderr, "The QSV pixel format not offered in get_format()\n");

    return AV_PIX_FMT_NONE;
}

static int decode_packet(DecodeContext *decode, AVCodecContext *decoder_ctx,
                         AVFrame *frame, AVFrame *sw_frame,
                         AVPacket *pkt, AVIOContext *output_ctx)
{
    int ret = 0;

    ret = avcodec_send_packet(decoder_ctx, pkt);
    if (ret < 0) {
        fprintf(stderr, "Error during decoding\n");
        return ret;
    }

    while (ret >= 0) {
        int i, j;

        ret = avcodec_receive_frame(decoder_ctx, frame);
        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
            break;
        else if (ret < 0) {
            fprintf(stderr, "Error during decoding\n");
            return ret;
        }

        /* A real program would do something useful with the decoded frame here.
         * We just retrieve the raw data and write it to a file, which is rather
         * useless but pedagogic. */
        ret = av_hwframe_transfer_data(sw_frame, frame, 0);
        if (ret < 0) {
            fprintf(stderr, "Error transferring the data to system memory\n");
            goto fail;
        }

        for (i = 0; i < FF_ARRAY_ELEMS(sw_frame->data) && sw_frame->data[i]; i++)
            for (j = 0; j < (sw_frame->height >> (i > 0)); j++)
                avio_write(output_ctx, sw_frame->data[i] + j * sw_frame->linesize[i], sw_frame->width);

fail:
        av_frame_unref(sw_frame);
        av_frame_unref(frame);

        if (ret < 0)
            return ret;
    }

    return 0;
}

int main(int argc, char **argv)
{
    AVFormatContext *input_ctx = NULL;
    AVStream *video_st = NULL;
    AVCodecContext *decoder_ctx = NULL;
    const AVCodec *decoder;

    AVPacket pkt = { 0 };
    AVFrame *frame = NULL, *sw_frame = NULL;

    DecodeContext decode = { NULL };

    AVIOContext *output_ctx = NULL;

    int ret, i;

    av_register_all();

    if (argc < 3) {
        fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]);
        return 1;
    }

    /* open the input file */
    ret = avformat_open_input(&input_ctx, argv[1], NULL, NULL);
    if (ret < 0) {
        fprintf(stderr, "Cannot open input file '%s': ", argv[1]);
        goto finish;
    }

    /* find the first H.264 video stream */
    for (i = 0; i < input_ctx->nb_streams; i++) {
        AVStream *st = input_ctx->streams[i];

        if (st->codecpar->codec_id == AV_CODEC_ID_H264 && !video_st)
            video_st = st;
        else
            st->discard = AVDISCARD_ALL;
    }
    if (!video_st) {
        fprintf(stderr, "No H.264 video stream in the input file\n");
        goto finish;
    }

    /* open the hardware device */
    ret = av_hwdevice_ctx_create(&decode.hw_device_ref, AV_HWDEVICE_TYPE_QSV,
                                 "auto", NULL, 0);
    if (ret < 0) {
        fprintf(stderr, "Cannot open the hardware device\n");
        goto finish;
    }

    /* initialize the decoder */
    decoder = avcodec_find_decoder_by_name("h264_qsv");
    if (!decoder) {
        fprintf(stderr, "The QSV decoder is not present in libavcodec\n");
        goto finish;
    }

    decoder_ctx = avcodec_alloc_context3(decoder);
    if (!decoder_ctx) {
        ret = AVERROR(ENOMEM);
        goto finish;
    }
    decoder_ctx->codec_id = AV_CODEC_ID_H264;
    if (video_st->codecpar->extradata_size) {
        decoder_ctx->extradata = av_mallocz(video_st->codecpar->extradata_size +
                                            AV_INPUT_BUFFER_PADDING_SIZE);
        if (!decoder_ctx->extradata) {
            ret = AVERROR(ENOMEM);
            goto finish;
        }
        memcpy(decoder_ctx->extradata, video_st->codecpar->extradata,
               video_st->codecpar->extradata_size);
        decoder_ctx->extradata_size = video_st->codecpar->extradata_size;
    }
    decoder_ctx->refcounted_frames = 1;

    decoder_ctx->opaque      = &decode;
    decoder_ctx->get_format  = get_format;

    ret = avcodec_open2(decoder_ctx, NULL, NULL);
    if (ret < 0) {
        fprintf(stderr, "Error opening the decoder: ");
        goto finish;
    }

    /* open the output stream */
    ret = avio_open(&output_ctx, argv[2], AVIO_FLAG_WRITE);
    if (ret < 0) {
        fprintf(stderr, "Error opening the output context: ");
        goto finish;
    }

    frame    = av_frame_alloc();
    sw_frame = av_frame_alloc();
    if (!frame || !sw_frame) {
        ret = AVERROR(ENOMEM);
        goto finish;
    }

    /* actual decoding */
    while (ret >= 0) {
        ret = av_read_frame(input_ctx, &pkt);
        if (ret < 0)
            break;

        if (pkt.stream_index == video_st->index)
            ret = decode_packet(&decode, decoder_ctx, frame, sw_frame, &pkt, output_ctx);

        av_packet_unref(&pkt);
    }

    /* flush the decoder */
    pkt.data = NULL;
    pkt.size = 0;
    ret = decode_packet(&decode, decoder_ctx, frame, sw_frame, &pkt, output_ctx);

finish:
    if (ret < 0) {
        char buf[1024];
        av_strerror(ret, buf, sizeof(buf));
        fprintf(stderr, "%s\n", buf);
    }

    avformat_close_input(&input_ctx);

    av_frame_free(&frame);
    av_frame_free(&sw_frame);

    avcodec_free_context(&decoder_ctx);

    av_buffer_unref(&decode.hw_device_ref);

    avio_close(output_ctx);

    return ret;
}

 


Build errror building

$
0
0

Moin,

Downloaded IntelMediaSDK2017R2_1forEmbeddedLinux.tar.gz

When trying to build, after executing ./setup.sh error occures:

| if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' t/ax/test-defs.sh-t; then echo "t/ax/test-defs.sh contains unexpanded substitution (see lines above)"; exit 1; fi; chmod a-w t/ax/test-defs.sh-t && mv -f t/ax/test-defs.sh-t t/ax/test-defs.sh
| help2man: can't get `--help' info from automake-1.15
| Try `--no-discard-stderr' if option outputs to stderr
| make: *** [Makefile:3687: doc/automake-1.15.1] Error 255
| make: *** Waiting for unfinished jobs....

This seems to be an incompatibilty between automake-1.15 and perl, but i'm to stupid to tell yocto to patch it before building. Pls. advice.

WK

 

Unsupported feature/library load error

$
0
0

Hi Team,

To understand  Intel Media SDK api in details, started looking in to simple encode program. when i run  simple_encode application in Linux OS i am getting following error.

Unsupported feature/library load error. ./src/common_utils_linux.cpp 29

Unsupported feature/library load error. ./src/simple_encode.cpp 88

Above errors thrown while initialising a session.

mfxIMPL impl = options.values.impl;
    mfxVersion ver = { { 0, 1 } };
    MFXVideoSession session;

    sts = Initialize(impl, ver, &session, NULL);
    MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

Thanks & Regards,

vittal

 

Intel Media SDK for android

$
0
0

Hi,

Is there any version of IMSDK available for android OS. I can see only for embedded linux and WIndows.

If not, what is the equivalent of IMSDK available fot android OS.

--Regards

Thushara

Intel media SDK can't be accessed

$
0
0

For a while now I use Handbrake in combination with the Media SDK for transcoding videos quickly with the QuickSync hardware accelerator if needed. But I think for already a few Win10 updates it's not working anymore. Handbrake 1.0.7 is just crashing before I could even take a look into the activity logs, while 0.10.3 (which I'm using because of the AAC FDK encoder since the FFMPEG one is crap) isn't exactly crashing, but it isn't reallydoing anything else either and the encoding log stays at

[spoiler]

HandBrake 0.10.3.0 - 64bit Version

OS: Microsoft Windows NT 6.2.9200.0 - 64bit

CPU: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz

Ram: 8076 MB,

GPU Information:

Intel(R) HD Graphics Family - 20.19.15.4531

Screen: 1366x768

Temp Dir: C:\Users\Richa\AppData\Local\Temp\

Install Dir: C:\Program Files\Handbrake

Data Dir: C:\Users\Richa\AppData\Roaming\HandBrake Team\HandBrake\0.10.3.0

-------------------------------------------

CLI Query: -i "D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv" -t 1 --angle 1 -c 1-12 -o "D:\Filme\Within Temptation - Black Symphony - Bonuskonzert qsv.mkv" -f mkv --deinterlace="fast" --crop 0:0:0:0 --strict-anamorphic --modulus 2 -e qsv_h264 -b 5000 --cfr -a 1,2 -E copy,flac24 -6 none,5point1 -R Auto,48 -B 0,160 -D 0,0 --gain 0,0 --aname="Stereo,5.1" --audio-fallback ac3 --markers="C:\Users\Richa\AppData\Local\Temp\Within Temptation - Black Symphony - Bonuskonzert qsv-1-chapters.csv" --encoder-preset=quality --verbose=1

[21:16:02] hb_init: starting libhb thread

HandBrake 0.10.3 (2016012200) - MinGW x86_64 - https://handbrake.fr

4 CPUs detected

Opening D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv...

[21:16:02] CPU: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz

[21:16:02] - Intel microarchitecture Haswell

[21:16:02] - logical processor count: 4

[21:16:02] OpenCL device #1: Intel(R) Corporation Intel(R) HD Graphics 4400

[21:16:02] - OpenCL version: 1.2

[21:16:02] - driver version: 20.19.15.4531

[21:16:02] - device type: GPU

[21:16:02] - supported: YES

[21:16:02] Intel Quick Sync Video support: yes

[21:16:02] - Intel Media SDK hardware: API 1.19 (minimum: 1.3)

[21:16:02] - Intel Media SDK software: API 1.23 (minimum: 1.3)

[21:16:02] - H.264 encoder: yes

[21:16:02] - preferred implementation: hardware (any)

[21:16:02] - H.265 encoder: no

[21:16:02] hb_scan: path=D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv, title_index=1

libbluray/bdnav/index_parse.c:162: indx_parse(): error opening D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv/BDMV/index.bdmv

libbluray/bdnav/index_parse.c:162: indx_parse(): error opening D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv/BDMV/BACKUP/index.bdmv

libbluray/bluray.c:2182: nav_get_title_list(D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv) failed

[21:16:03] bd: not a bd - trying as a stream/file instead

libdvdnav: Using dvdnav version 5.0.1

libdvdread: Encrypted DVD support unavailable.

libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed

libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed

libdvdread: Can't open file VIDEO_TS.IFO.

libdvdnav: vm: failed to read VIDEO_TS.IFO

[21:16:03] dvd: not a dvd - trying as a stream/file instead

Input #0, matroska,webm, from 'D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv':

Metadata:

CREATION_TIME : 2018-03-01T18:05:19Z

ENCODER : Lavf55.12.0

Duration: 01:02:01.60, start: 0.000000, bitrate: N/A

Chapter #0.0: start 0.000000, end 76.000000

Metadata:

title : Intro

Chapter #0.1: start 76.067000, end 349.000000

Metadata:

title : Jillian (I'd Give My Heart)

Chapter #0.2: start 349.067000, end 694.267000

Metadata:

title : The Howling

Chapter #0.3: start 694.334000, end 994.600000

Metadata:

title : The Cross

Chapter #0.4: start 994.667000, end 1332.800000

Metadata:

title : Hand Of Sorrow

Chapter #0.5: start 1332.867000, end 1682.600000

Metadata:

title : The Heart Of Everything

Chapter #0.6: start 1682.667000, end 2041.933000

Metadata:

title : Restless

Chapter #0.7: start 2042.000000, end 2361.933000

Metadata:

title : Our Solemn Hour

Chapter #0.8: start 2362.000000, end 2714.733000

Metadata:

title : Mother Earth

Chapter #0.9: start 2714.800000, end 2989.467000

Metadata:

title : Jane Doe

Chapter #0.10: start 2989.534000, end 3419.700000

Metadata:

title : The Truth Beneath The Rose

Chapter #0.11: start 3419.767000, end 3721.500000

Metadata:

title : All I Need

Stream #0.0: Video: h264 (High), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 30 fps, 1k tbn, 60 tbc (default)

Stream #0.1: Audio: aac, 48000 Hz, stereo, fltp (default)

Metadata:

title : Stereo

Stream #0.2: Audio: flac, 48000 Hz, 5.1, s32

Metadata:

title : 5.1

[21:16:03] scan: decoding previews for title 1

[21:16:03] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC) (2.0 ch)

[21:16:03] scan: audio 0x2: flac, rate=48000Hz, bitrate=1 Unknown (FLAC) (5.1 ch)

Scanning title 1 of 1, preview 5, 50.00 %[21:16:03] scan: 10 previews, 720x576, 30.000 fps, autocrop = 6/32/12/0, aspect 16:9, PAR 64:45

[21:16:03] libhb: scan thread found 1 valid title(s)

+ title 1:

+ stream: D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv

+ duration: 01:02:01

+ size: 720x576, pixel aspect: 64/45, display aspect: 1.78, 30.000 fps

+ autocrop: 6/32/12/0

+ support opencl: yes

+ support hwd: yes

+ chapters:

+ 1: cells 0->0, 0 blocks, duration 00:01:16

+ 2: cells 0->0, 0 blocks, duration 00:04:33

+ 3: cells 0->0, 0 blocks, duration 00:05:45

+ 4: cells 0->0, 0 blocks, duration 00:05:00

+ 5: cells 0->0, 0 blocks, duration 00:05:38

+ 6: cells 0->0, 0 blocks, duration 00:05:50

+ 7: cells 0->0, 0 blocks, duration 00:05:59

+ 8: cells 0->0, 0 blocks, duration 00:05:20

+ 9: cells 0->0, 0 blocks, duration 00:05:53

+ 10: cells 0->0, 0 blocks, duration 00:04:35

+ 11: cells 0->0, 0 blocks, duration 00:07:10

+ 12: cells 0->0, 0 blocks, duration 00:05:02

+ audio tracks:

+ 1, Unknown (AAC) (2.0 ch) (iso639-2: und)

+ 2, Unknown (FLAC) (5.1 ch) (iso639-2: und)

+ subtitle tracks:

Reading chapter markers from file C:\Users\Richa\AppData\Local\Temp\Within Temptation - Black Symphony - Bonuskonzert qsv-1-chapters.csv

[21:16:03] 1 job(s) to process

[21:16:03] starting job

[21:16:03] do_job: QSV: full path, removing unsupported filter 'Framerate Shaper'

[21:16:03] Fast Deinterlace thread started for segment 0

[21:16:03] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3

[21:16:03] Fast Deinterlace thread started for segment 1

[21:16:03] Fast Deinterlace thread started for segment 2

[21:16:03] Auto Passthru: fallback is AC3

[21:16:03] Auto Passthru: using AAC Passthru for track 1

[21:16:03] Fast Deinterlace thread started for segment 3

[21:16:03] work: compression level not specified, track 2 setting compression level 5.00

[21:16:03] sync: expecting 111645 video frames

[21:16:03] job configuration:

[21:16:03] * source

[21:16:03] + D:\Filme\Within Temptation - Black Symphony - Bonuskonzert.mkv

[21:16:03] + title 1, chapter(s) 1 to 12

[21:16:03] + container: matroska,webm

[21:16:03] * destination

[21:16:03] + D:\Filme\Within Temptation - Black Symphony - Bonuskonzert qsv.mkv

[21:16:03] + container: Matroska (libavformat)

[21:16:03] + chapter markers

[21:16:03] * video track

[21:16:03] + decoder: h264_qsv

[21:16:03] + filters

[21:16:03] + Quick Sync Video user filter (pre) (default settings)

[21:16:03] + copy data to system memory

[21:16:03] + Deinterlace (0)

[21:16:03] + Quick Sync Video user filter (post) (default settings)

[21:16:03] + copy data to opaque memory

[21:16:03] + strict anamorphic

[21:16:03] + storage dimensions: 720 * 576, mod 2

[21:16:03] + pixel aspect ratio: 64 / 45

[21:16:03] + display dimensions: 1024 * 576

[21:16:03] + encoder: H.264 (Intel Media SDK)

[21:16:03] + preset: quality

[21:16:03] + bitrate: 5000 kbps, pass: 0

[21:16:03] * audio track 1

[21:16:03] + name: Stereo

[21:16:03] + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)

[21:16:03] + samplerate: 48000 Hz

[21:16:03] + AAC Passthru

[21:16:03] * audio track 2

[21:16:03] + name: 5.1

[21:16:03] + decoder: Unknown (FLAC) (5.1 ch) (track 2, id 0x2)

[21:16:03] + samplerate: 48000 Hz

[21:16:03] + mixdown: 5.1 Channels

[21:16:03] + encoder: FLAC 24-bit (libavcodec)

[21:16:03] + samplerate: 48000 Hz

[21:16:03] + compression level: 5.00

[21:16:03] reader: first SCR 6030 id 0x0 DTS 6030

[21:16:03] encqsvInit: using full QSV path

[21:16:03] encqsvInit: TargetUsage 2 AsyncDepth 4

[21:16:03] encqsvInit: GopRefDist 3 GopPicSize 30 NumRefFrame 3

[21:16:03] encqsvInit: BFrames on BPyramid off

[21:16:03] encqsvInit: AdaptiveI off AdaptiveB off

[21:16:03] encqsvInit: RateControlMethod LA TargetKbps 5000 LookAheadDepth 40

[21:16:03] encqsvInit: LookAheadDS off

[21:16:03] encqsvInit: CAVLC off

[21:16:03] encqsvInit: Trellis off

[21:16:03] encqsvInit: H.264 profile High @ level 3.1 [/spoiler]

respectively at 00.01%. No problems if I don't explicitly use H.264 qsv. So Handbrake itself seems to see qsv because of tthe Media SDK, but somehow can't use it.

I have already reinstalled the Media SDK, even tried the 2016 version but no change. Also installing with Windows' compatibility settings didn't do anything.

One thing I noticed is that Intel writes on https://software.intel.com/en-us/media-sdk/choose-download/client about a INTELMEDIASDK_WINSDK_PATH which would be initialised after installation, but it isn't showing up where all the other PATH variables are. Also manually setting it like described here https://github.com/Intel-Media-SDK/samples/tree/master/samples doesn't make really sense since Windows can fidn that opencl.dll only in C:\Windows\system32\ and that folder is already a system variable as %SystemRoot%\system32

I also found a Tool for system analyses that seems to ship inside the SDK installer, but that isn't really helping either:

[hide]

Intel(R) Media Server Studio 2017 - System Analyzer (64-bit)

The following versions of Media SDK API are supported by platform/driver

[opportunistic detection of MSDK API > 1.23]:

Version Target Supported Dec Enc

1.0 HW Yes X X

1.0 SW Yes X X

1.1 HW Yes X X

1.1 SW Yes X X

1.2 HW Yes X X

1.2 SW Yes X X

1.3 HW Yes X X

1.3 SW Yes X X

1.4 HW Yes X X

1.4 SW Yes X X

1.5 HW Yes X X

1.5 SW Yes X X

1.6 HW Yes X X

1.6 SW Yes X X

1.7 HW Yes X X

1.7 SW Yes X X

1.8 HW Yes X X

1.8 SW Yes X X

1.9 HW Yes X X

1.9 SW Yes X X

1.10 HW Yes X X

1.10 SW Yes X X

1.11 HW Yes X X

1.11 SW Yes X X

1.12 HW Yes X X

1.12 SW Yes X X

1.13 HW Yes X X

1.13 SW Yes X X

1.14 HW Yes X X

1.14 SW Yes X X

1.15 HW Yes X X

1.15 SW Yes X X

1.16 HW Yes X X

1.16 SW Yes X X

1.17 HW Yes X X

1.17 SW Yes X X

1.18 HW Yes X X

1.18 SW Yes X X

1.19 HW Yes X X

1.19 SW Yes X X

1.20 HW No

1.20 SW Yes X X

1.21 HW No

1.21 SW Yes X X

1.22 HW No

1.22 SW Yes X X

1.23 HW No

1.23 SW Yes X X

Graphics Devices:

Name Version State

Intel(R) HD Graphics Family 20.19.15.4531 Active

System info:

CPU: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz

OS: Microsoft Windows 10 Pro

Arch: 64-Bit

Installed Media SDK packages (be patient...processing takes some time):

Intel(R) Media SDK 2017 R1

Installed Media SDK DirectShow filters:

Installed Intel Media Foundation Transforms:

Intel(R) Hardware M-JPEG Decoder MFT : {00C69F81-0524-48C0-A353-4DD9D54F9A6E}

Intel(R) Hardware VP8 Sync Decoder MFT : {451E3CB7-2622-4BA5-8E1D-44B3C41D0924}

Intel(R) Hardware VP8 Decoder MFT : {6D856398-834E-4A89-8EE5-071BB3F58BE4}

Analysis complete... [press ENTER] [/hide]

Also reinstalling Handbrake doesn't help at this point.

Has anyone any idea what's going wrong and how that could be fixed? I mean it wasn't any update of Handbrake or the Media SDK that broke anything since it just stopped working.

PS: it seems UBB code isn't supported here so I have no idea how to hide those huge outputs. But I colored it so at least it's a visible difference

Is the VAAPI encoding whitepaper for Intel Atom E6XX valid for the N4200?

Viewing all 2185 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>