#11257: scale filters implementation of scale2ref broken on linux for ref_h or 
rh
constants. works on windows.
---------------------------------+---------------------------------------
             Reporter:  mytait   |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  swscale  |                  Version:  unspecified
             Keywords:  scale    |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+---------------------------------------
 Summary of the bug:

 **short**: scale filter on linux can not parse the rh or ref_h constant.
 in windows it works as intended. It seems it has been like this since at
 least ffmpeg 4.4.1 (oldest version i tested!)

 **longer**:
 the scale-filter takes an input visual (video or image) and rescales the
 input to a desired size. When 2 inputs are provided it replaces the old
 scale2ref and uses the second input as reference. The size of the
 reference is represented by the rh or ref_h constant.

 see:

 https://ffmpeg.org/ffmpeg-filters.html#Options-2


 in windows the constant is recognized and used. the exact same command
 works on windows. on linux it throws an error:

 {{{
 [Parsed_scale_0 @ 0x64e8d0ce8500] [Eval @ 0x7fff00113650] Undefined
 constant or missing '(' in 'rh*0.5'
 [Parsed_scale_0 @ 0x64e8d0ce8500] Cannot parse expression for height:
 'rh*0.5'
 }}}

 its seems someone filed a related bug for the CUDA variant as well:

 https://trac.ffmpeg.org/ticket/11174

 as i am not able to compile ffmpeg i cant test this on 7.1. But i have
 tested ffmpeg 4,5,6 and 7.0 so i think this has always been there?

 How to reproduce:
 {{{
 % ffmpeg -y -i in_reffile.mkv -i in_main.mkv -filter_complex
 "[1:v][0:v]scale=w=oh*dar:h=rh*0.5" -pix_fmt yuv420p  outf4.mkv

 #Works on windows with
 #ffmpeg version 2024-08-07-git-94165d1b79-essentials_build-www.gyan.dev

 #BROKEN on ubuntu linux with
 #ffmpeg version 4.4.1 AMD64
 #ffmpeg version 5.1.1 AMD64
 #ffmpeg version 6.1.1 AMD64
 #ffmpeg version 7.0.2 AMD64
 #ffmpeg version 7.0.2 i386





 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11257>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to