Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Yabo_W_
Beginner
114 Views

alpha blend of sample_vpp_drm

Hi all,

tried alpha blend with sample_vpp_drm, and I find it doesn't work accurately.

 You can view the result here.

below is my .par file:

stream=./input_nv12.yuv
width=1920
height=1080
cropx=0
cropy=0
cropw=1920
croph=1080
dstx=0
dsty=0
dstw=1920
dsth=1080
framerate=25
fourcc=nv12

stream=./blend_nv12.yuv
width=320
height=240
cropx=0
cropy=0
cropw=320
croph=240
dstx=500
dsty=0
dstw=320
dsth=240
framerate=25
fourcc=nv12
AlphaEnable=1
GlobalAlpha=128

of course, the input_nv12.yuv resolution is 1920x1080, and the blend_nv12.yuv is 320x240

I want to blend the blend_nv12.yuv on the input_nv12.yuv.

0 Kudos
14 Replies
Yabo_W_
Beginner
114 Views

114 Views

Hi Yabo, Thanks for your question. I will use this thread to respond to your query instead of the one started by another customer.

Yabo_W_
Beginner
114 Views

OK, thanks. I expect your response.

I want to use sample_vpp_drm to alpha blending. Can your tell me what is the correct .par file?

114 Views

Yes, your par file is correct. I am taking a look at the issue and have some suggested workarounds I am experimenting with. Will surely update you when I have the solution.

Yabo_W_
Beginner
114 Views

Hi SRAVANTHI K. 

the article on composition here:

https://software.intel.com/en-us/articles/video-composition-using-intel-media-sdk

Do you have the complete code( I can not find some functions like “LoadRawFrame_YV12toNV12()”)  ?

114 Views

Hi Yabo - I do have the complete application. You can find it attached.

Meantime, I ran into some hiccups last week with my system and it is coming back up - so will get to the alpha blending question you had as soon as my system is up.

114 Views

Disregard the previous attachment please. Here is the updated one with commons/ included that has the functions you are looking for.

114 Views

Hello Yabo - I hope the tutorial I attached was helpful. I tested composition on my machine with alpha blending and it works fine. I used the par file similar to yours (with different input streams of course), and attached is the composited stream.

Can you give me more details on the system you tested composition on? I experimented on a SLES and CentOS systems, with the latest version of Media SDK (1.13) and the previous one. You can use the following format to send more details on your system - https://software.intel.com/en-us/forums/topic/531083

114 Views

Here is my attached composited output and par file.

Sujata_G_
Beginner
114 Views

Hi, I am trying to create composite video by using simple_8_composite_vmem.zip. I have installed Intel media SDK accorting to the steps given by media_server_studio_getting_started_guide.pdf.  I do see following error while executing test program.

"simple_composite': free(): invalid next size (fast): 0x0000000000620b20 ***".

Will you please help me to rectify this issue?

Backtrace is as below:

(gdb) bt
#0  0x00007ffff6aecf79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6af0388 in __GI_abort () at abort.c:89
#2  0x00007ffff6b2a1d4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff6c38a10 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff6b364ae in malloc_printerr (ptr=<optimized out>, str=0x7ffff6c38bb0 "free(): invalid next size (fast)", action=1)
    at malloc.c:4996
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#5  0x00007ffff5a28925 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#6  0x00007ffff5ab3220 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#7  0x00007ffff5a2948e in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#8  0x00007ffff59ab990 in MFXVideoVPP_QueryIOSurf () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#9  0x00000000004041ab in MFXVideoVPP::QueryIOSurf (this=0x7fffffffd9c0, par=0x7fffffffdc10, request=0x7fffffffdb50)
    at /opt/intel/mediasdk/include/mfxvideo++.h:139
#10 0x0000000000402f27 in main () at src/simple_composite_vmem.cpp:224

 

System configuration is as below:

Processor is    : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz

Running this on Linux kernel 3.14.5 .

 

 

 

 

 

 

 

 

 

 

 

 

 

Shaojuan_Z_Intel
Employee
114 Views

Hi Sujata,

Which operating system does your system run? Did you follow the generic steps installing MediaSDK? Is it the latest one? Did you verify the correctness of installation by following:

uname –ar
Ensure you are booted into the correct kernel. The following command should return the kernel with "MSSrN" in the ID (where N is the release number).

lspci –nn | grep VGA
Check if the Intel® Integrated Graphics is being recognized by the PCI on VGA

lsmod | grep i915
Check if the i915 DRM module is installed

If MediaSDK was installed successfully, you may try run other sample examples (https://software.intel.com/en-us/intel-media-server-studio-support/code-samples) and see if you see the same problem. For simple_8_composite_vmem example, did you modify the video sizes accordingly? Thanks.

Sujata_G_
Beginner
114 Views

Hi Shaojuan,

Thanks for the prompt reply.

Yes I have verified all the things before posting this query. Here are the details.

1. I am running Linux on Ubuntu distribution.

2. I have followed  Generic steps to install mediaSDK.

3. Linux kernel version is 3.14.5

$ uname -ar
Linux sujata-LT 3.14.5 #2 SMP Thu Sep 10 12:01:38 IST 2015 x86_64 x86_64 x86_64 GNU/Linux

4. Intel Integrated Graphics is supported

$ lspci -nn -s 00:02.0
00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1616] (rev 09)

5. DRM module is installed.

$ lsmod | grep i915
i915                  833498  5
i2c_algo_bit           13413  1 i915
drm_kms_helper         48716  1 i915
drm                   297967  4 i915,drm_kms_helper
video                  19425  1 i915

6. Other apps like simple_session and simple_decode are running. (I see the output of simple_decode is not good.

7. I have modified file size settings for simple_composite program.

8. Attaching simple_8_composite_vmem.c here. Please take a look.

Shaojuan_Z_Intel
Employee
114 Views

Hi Sujata,

I ran your simple_composite_vmem.cpp, and only modified the video size according, it worked fine in my CentOS sytem. Media Server Studio officially support CentOS7.1 and SLES12 as stated in release notes, but you ran simple_decode fine in Ubuntu, you should be able to run this composite example as well. Maybe there is something wrong with the videos as inputs. If you could provide your inputs as well, I can test in my system again. Also, may I know what you meant by "output of simple_decode is not good"? If possible, could you provide the input stream, so that we can check the quality of the decoder at our end? Thanks! 

114 Views

Hi Sujata - Were you able to get the composition example working? You mention you were observing poor output for decode application as well. Can you please paste the command lines used for these applications and what version of MSS are you working with?

Reply