Thread: Avisynth+
View Single Post
Old 24th June 2019, 15:03   #4740  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Quote:
Originally Posted by pinterf View Post
I could not reproduce. Could you upload your samples and send me a links? Mask and probably a small video.
They can be artificially generated:

Video:
Code:
ffmpeg -f lavfi -i testsrc -vcodec libx264 -preset ultrafast -crf 18 -t 10 test.mkv
Mask script:
Code:
v1=BlankClip(1,320,240).KillAudio()
v2=v1.Invert().PointResize(60,60)
Overlay(v1,v2,mode="blend")
Mask:
Code:
ffmpeg -i maskscript.avs test.bmp
The (not helpful, because all the binaries in the chain have been stripped) output of gdb seems to point at the cause of the Deblend and Both modes segfaulting being within DevIL, but some of the build warnings when compiling AVSInpaint itself may point more to internal API usage not being correct in those modes when used with modern AviSynth.

This is what happens when building it with only the minimal amount of fixes (avsplus r2883/7c334a0/HEAD header/lib, adjusting the Makefile to use 32-bit lib and -m32 flag, fix typo in AVSInpaint.c avs_is_yuy->avs_is_yuv):
Code:
$ make
gcc -m32 -fdiagnostics-show-location=once  -funsigned-char -mthreads  -Wextra -pedantic -Wall -Wdeclaration-after-statement -Wundef -Wpointer-arith -Wstrict-prototypes -Wredundant-decls  -O2 -fomit-frame-pointer -malign-double -s -march=i386  -c  -o AVSInpaint.obj  AVSInpaint.c
In file included from AVSInpaint.c:94:
AviSynth_C.h:99:21: warning: enumerator value for 'AVS_CS_PLANAR' is not an integer constant expression [-Wpedantic]
   99 |     AVS_CS_PLANAR = 1 << 31,
      |                     ^
In file included from AVSInpaint.c:94:
AviSynth_C.h:690:1: warning: missing initializer for field 'array_size' of 'AVS_Value' {aka 'const struct AVS_Value'} [-Wmissing-field-initializers]
  690 | static const AVS_Value avs_void = {'v'};
      | ^~~~~~
AviSynth_C.h:675:9: note: 'array_size' declared here
  675 |   short array_size;
      |         ^~~~~~~~~~
AVSInpaint.c: In function 'Inpaint_Create':
AVSInpaint.c:254:93: warning: unused parameter 'Data' [-Wunused-parameter]
  254 | AVS_Value  AVSC_CC  Inpaint_Create(AVS_ScriptEnvironment *  Env,  AVS_Value  Args,  void *  Data)
      |                                                                                     ~~~~~~~~^~~~
AVSInpaint.c: In function 'Deblend_Create':
AVSInpaint.c:929:93: warning: unused parameter 'Data' [-Wunused-parameter]
  929 | AVS_Value  AVSC_CC  Deblend_Create(AVS_ScriptEnvironment *  Env,  AVS_Value  Args,  void *  Data)
      |                                                                                     ~~~~~~~~^~~~
AVSInpaint.c: In function 'Analyze_Create':
AVSInpaint.c:1245:93: warning: unused parameter 'Data' [-Wunused-parameter]
 1245 | AVS_Value  AVSC_CC  Analyze_Create(AVS_ScriptEnvironment *  Env,  AVS_Value  Args,  void *  Data)
      |                                                                                     ~~~~~~~~^~~~
AVSInpaint.c: In function 'Analyze_GetFrame':
AVSInpaint.c:1432:81: warning: unused parameter 'FrameNo' [-Wunused-parameter]
 1432 | AVS_VideoFrame *  AVSC_CC  Analyze_GetFrame(AVS_FilterInfo *  FilterInfo,  int  FrameNo)
      |                                                                            ~~~~~^~~~~~~
AVSInpaint.c: In function 'DistanceFunction_Create':
AVSInpaint.c:1449:102: warning: unused parameter 'Data' [-Wunused-parameter]
 1449 | AVS_Value  AVSC_CC  DistanceFunction_Create(AVS_ScriptEnvironment *  Env,  AVS_Value  Args,  void *  Data)
      |                                                                                              ~~~~~~~~^~~~
AVSInpaint.c: In function 'CreateGaussKernel':
AVSInpaint.c:2415:49: warning: using integer absolute value function 'abs' when argument is of floating point type 'double' [-Wabsolute-value]
 2415 |     for (k=-Size ; k<=Size ; k++)  Kernel[k] = (abs(Center-k)<1.0)?(1.0-abs(Center-k)):0.0;
      |                                                 ^~~
AVSInpaint.c:2415:73: warning: using integer absolute value function 'abs' when argument is of floating point type 'double' [-Wabsolute-value]
 2415 |     for (k=-Size ; k<=Size ; k++)  Kernel[k] = (abs(Center-k)<1.0)?(1.0-abs(Center-k)):0.0;
      |                                                                         ^~~
gcc -m32 -fdiagnostics-show-location=once  -funsigned-char -mthreads  -Wextra -pedantic -Wall -Wdeclaration-after-statement -Wundef -Wpointer-arith -Wstrict-prototypes -Wredundant-decls  -O2 -fomit-frame-pointer -malign-double -s -march=i386  -shared  -o AVSInpaint.dll  AVSInpaint.obj AviSynth32.lib

In one build test a day or two ago, I did notice a warning emitted concerning avs_is_same_colorspace, which given what pinterf just noted about the RGB24/32 conversion, might be where this is coming from.
qyot27 is offline