Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 7th December 2016, 02:24   #2641  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
I'm getting some problems loading a transparent PNG (a logo) and add it on a video using overlay.
The alpha from the PNG seems to be read just fine, but it's the "24bit" of the full 32bit PNG itself that are read with lots of artefacts (mainly "blocks" not available in the original image).
ImageSource and ImageReader both gives the same output.
With regular AVS 2.6 the same PNG/overlay works as expected.

Syntax:
logo=imagesource("logo.png",pixel_type="rgb32")
overlay(video,logo,mask=logo.showalpha())
mp3dom is offline  
Old 7th December 2016, 08:23   #2642  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Quote:
Originally Posted by mp3dom View Post
ImageSource and ImageReader both gives the same output.
Of course, for most input formats they are just aliases of one single function. A difference might exist if you change the decoder, e.g. using DevIL or not.

Do you have samples of such wrong results (original image + wrong overlay result in a script)? I wonder where such issues appear, I could imagine in areas which should be completely transparent: Here the alpha channel may hide the fact that there are areas of full transparent color A next to full transparent color B, which would appear visibly if the transparency is incomplete by mistake. But then it may be rather in Overlay than in ImageSource.

Just a wild guess: Alpha channels are usual rather in RGB formats and should not have coring applied, even when the overlay result is in YUV format.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 7th December 2016, 09:14   #2643  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by mp3dom View Post
I'm getting some problems loading a transparent PNG (a logo) and add it on a video using overlay.
The alpha from the PNG seems to be read just fine, but it's the "24bit" of the full 32bit PNG itself that are read with lots of artefacts (mainly "blocks" not available in the original image).
ImageSource and ImageReader both gives the same output.
With regular AVS 2.6 the same PNG/overlay works as expected.

Syntax:
logo=imagesource("logo.png",pixel_type="rgb32")
overlay(video,logo,mask=logo.showalpha())
Tried it with a sample png from here and I can see no garbage.
Which Avisynth Plus version are you using?
pinterf is offline  
Old 7th December 2016, 09:23   #2644  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by LigH View Post
How much faster could "benchmark" scripts like QTGMC be when optimized for all these new features? Just starting with support of planar YUV with fine chroma subsampling...
I don't expect speed gain, unless the heavily used filters are optimized further. Maybe you can omit some YUY2<->YV16 conversions.
pinterf is offline  
Old 7th December 2016, 09:46   #2645  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
I'm using r2294.
Original image:
https://www.sendspace.com/file/ad7xdd

This is the alpha (correct):
http://116.imagebam.com/download/hau...2355/Alpha.png

This is the image without alpha (wrong):
http://115.imagebam.com/download/QWD...2359/Image.png

Final result with overlay (wrong):
http://116.imagebam.com/download/4mo...66/Overlay.png
mp3dom is offline  
Old 7th December 2016, 10:00   #2646  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by mp3dom View Post
I'm using r2294.
Original image:
https://www.sendspace.com/file/ad7xdd

This is the alpha (correct):
http://116.imagebam.com/download/hau...2355/Alpha.png

This is the image without alpha (wrong):
http://115.imagebam.com/download/QWD...2359/Image.png

Final result with overlay (wrong):
http://116.imagebam.com/download/4mo...66/Overlay.png
Thanks, this PNG fails.
pinterf is offline  
Old 7th December 2016, 13:48   #2647  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
mp3dom, thank you for the bug report.

New build, r2333 with Overlay fix:
http://www.mediafire.com/file/u44zj6...splus-r2333.7z
pinterf is offline  
Old 7th December 2016, 14:06   #2648  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Thank you pinterf for the quick check, but I'm still getting the same result
mp3dom is offline  
Old 7th December 2016, 14:49   #2649  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Try with pc_range=true

Last edited by pinterf; 7th December 2016 at 20:14. Reason: remove tapatalk autosig
pinterf is offline  
Old 7th December 2016, 15:27   #2650  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Setting pc_range=true, indeed, fixed the output in the right way, thanks!

Just asking: Is it right that when opening the png (either 32bit or forcing 24bit) with imagesource (without applying any overlay), the image is still blocky like in my previous example?
mp3dom is offline  
Old 7th December 2016, 16:34   #2651  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Quote:
Originally Posted by mp3dom View Post
Setting pc_range=true, indeed, fixed the output in the right way, thanks!

Just asking: Is it right that when opening the png (either 32bit or forcing 24bit) with imagesource (without applying any overlay), the image is still blocky like in my previous example?
png must be multiplied by alpha, this is normal
shekh is offline  
Old 7th December 2016, 16:34   #2652  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Yes, this png have only 0 and 255 values in rgb, the greyshades are only in the mask , alpha channel.
pinterf is offline  
Old 7th December 2016, 17:29   #2653  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Ok! Thanks again for the quick fix
mp3dom is offline  
Old 8th December 2016, 01:14   #2654  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
Quote:
Originally Posted by pinterf View Post
still get nothing than circle cursor and nothing else after launching avspmod x86 or x64 (same r452 ver)
with avsmeter it seems to work
__________________
powered by Google Translator
Motenai Yoda is offline  
Old 8th December 2016, 01:52   #2655  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Motenai Yoda View Post
still get nothing than circle cursor and nothing else after launching avspmod x86 or x64 (same r452 ver)
with avsmeter it seems to work
AVSMeter does not use the C interface.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 8th December 2016, 02:30   #2656  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
fadein/fadeout don't work:
"BlankClip: color count 13 does not match to component count 3"
ajp_anton is offline  
Old 8th December 2016, 02:40   #2657  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Quote:
Originally Posted by ajp_anton View Post
fadein/fadeout don't work:
"BlankClip: color count 13 does not match to component count 3"
Yes, I've come across that as well when trying to use LSFmod.
burfadel is offline  
Old 8th December 2016, 03:59   #2658  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
Suggestion to CombinePlanes: if source clip only has a Y plane and "source_planes" is not set, use the Y plane.
Also, if "planes" is set, why do we need "pixel_type"? Can't "pixel_type" be figured out automatically, or am I missing some case when it can't?
ajp_anton is offline  
Old 8th December 2016, 16:05   #2659  |  Link
fAy01
Registered User
 
Join Date: Jun 2010
Posts: 91
Quote:
Originally Posted by pinterf View Post
Ok, let's try this one:

http://www.mediafire.com/file/90d7qa...splus-r2331.7z

Changes since r2294: see above. Last change:

20161206 r2331dev
  • YUY2 PlaneToY
  • C interface compatible array-type AVSValue handling (avspmod issue)
I updated to the latest r3333 build. Avspmod is still not working.

Error parsing ArrayGet plugin parameters: unknown character 'a'
Error parsing ArrayGet plugin parameters: unknown character 'a'
Error parsing ArraySize plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
fAy01 is offline  
Old 8th December 2016, 16:48   #2660  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by fAy01 View Post
I updated to the latest r3333 build. Avspmod is still not working.

Error parsing ArrayGet plugin parameters: unknown character 'a'
Error parsing ArrayGet plugin parameters: unknown character 'a'
Error parsing ArraySize plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
Error parsing BlankClip plugin parameters: unknown character 'a'
These are not fatal errors.
I have just tried 64 bit avspmod and it was producing me an exception and exited before start and was able to debug avisynth. After one more modification it works for me, those error-like warnings are still there of course.
pinterf is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.