Changes of Revision 162

ffx264.changes Changed
x
 
1
@@ -1,4 +1,10 @@
2
 -------------------------------------------------------------------
3
+Wed Feb 28 22:20:00 UTC 2024 - neutrino8@opensuse.org
4
+
5
+- Update to version 4.2.0
6
+  * Initial support for zimg (z lib) scalers
7
+
8
+-------------------------------------------------------------------
9
 Sun Feb 04 16:40:00 UTC 2023 - neutrino8@opensuse.org
10
 
11
 - Update to version 4.1.17
12
ffx264.spec Changed
10
 
1
@@ -17,7 +17,7 @@
2
 
3
 
4
 Name:           ffx264
5
-Version:        4.1.17
6
+Version:        4.2.0
7
 Release:        %mkrel 1
8
 Summary:        A small shell script for encoding to H.264/AVC with FFmpeg
9
 License:        GPL-2.0+
10
ffx264-4.1.17.tar.gz/ChangeLog -> ffx264-4.2.0.tar.gz/ChangeLog Changed
8
 
1
@@ -1,3 +1,6 @@
2
+2024-02-28 - ffx264 4.2.0
3
+   * Initial support for zimg (z lib) scalers
4
+
5
 2024-02-04 - ffx264 4.1.17
6
    * Don't exit but warn about MP4Box/Mplayer missing
7
      from the user's system
8
ffx264-4.1.17.tar.gz/ffx264 -> ffx264-4.2.0.tar.gz/ffx264 Changed
308
 
1
@@ -3,7 +3,7 @@
2
 # Small script to encode to H.264/AVC video using FFmpeg and libx264.
3
 # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org>
4
 # Version: 4.1.17
5
-# Date: 2024-02-04
6
+# Date: 2024-02-28
7
 #
8
 # ffx264 is free software ; you can redistribute it and/or modify
9
 # it under the terms of the GNU General Public License as published by
10
@@ -24,7 +24,7 @@
11
 brown() { echo -e "\e0;33m$1\e0;39;49m"; }
12
 error() { echo -e "\e1;31m$1\e0;39;49m"; }
13
 
14
-version="4.1.17"
15
+version="4.2.0"
16
 
17
 CFG="$HOME/.ffx264"
18
 cfgversion="43"
19
@@ -1706,136 +1706,171 @@
20
    printf "Specify the Desired Resolution WxH - press 'Enter' to skip: "
21
    read res
22
    if  ! -z "$res" ; then
23
-       sws_func() {
24
-           case "$1" in
25
-               config) swsopt="$SCALER" ;;
26
-               script) test -z "$swsopt" && swsopt="8" || swsopt="$swsopt" ;;
27
-           esac
28
-           case "$swsopt" in
29
-               0)  scaler="fast_bilinear" ;;
30
-               1)  scaler="bilinear" ;;
31
-               2)  scaler="bicubic" ;;
32
-               3)  scaler="neighbor" ;;
33
-               4)  scaler="area" ;;
34
-               5)  scaler="bicublin" ;;
35
-               6)  scaler="gauss" ;;
36
-               7)  scaler="sinc" ;;
37
-               8)  scaler="lanczos" ;;
38
-               9)  scaler="spline" ;;
39
-               10) scaler="experimental" ;;
40
-               *)
41
+       printf "Use FFmpeg or zimg Scaler? ffmpeg/zimg - default is ffmpeg: "
42
+       read scatype
43
+       case "$scatype" in
44
+           ffmpeg|FFmpeg|FFMPEG|"")
45
+           sws_func() {
46
                case "$1" in
47
-                   script)
48
-                   error "-> Invalid option!"
49
-                   exit 1
50
+                   config) swsopt="$SCALER" ;;
51
+                   script) test -z "$swsopt" && swsopt="8" || swsopt="$swsopt" ;;
52
+               esac
53
+               case "$swsopt" in
54
+                   0)  scaler="fast_bilinear" ;;
55
+                   1)  scaler="bilinear" ;;
56
+                   2)  scaler="bicubic" ;;
57
+                   3)  scaler="neighbor" ;;
58
+                   4)  scaler="area" ;;
59
+                   5)  scaler="bicublin" ;;
60
+                   6)  scaler="gauss" ;;
61
+                   7)  scaler="sinc" ;;
62
+                   8)  scaler="lanczos" ;;
63
+                   9)  scaler="spline" ;;
64
+                   10) scaler="experimental" ;;
65
+                   *)
66
+                   case "$1" in
67
+                       script)
68
+                       error "-> Invalid option!"
69
+                       exit 1
70
+                       ;;
71
+                   esac
72
                    ;;
73
                esac
74
-               ;;
75
-           esac
76
-       }
77
-       if  -z "$SCALER" ; then
78
-           echo
79
-           brown " Software Scalers"
80
-           brown " ~~~~~~~~~~~~~~~~"
81
-           echo " 0 --> Fast Bilinear"
82
-           echo " 1 --> Bilinear"
83
-           echo " 2 --> Bicubic"
84
-           echo " 3 --> Nearest Neighbor"
85
-           echo " 4 --> Area Averaging"
86
-           echo " 5 --> Luma Bicubic/Chroma Bilinear"
87
-           echo " 6 --> Gaussian"
88
-           echo " 7 --> Sinc"
89
-           echo " 8 --> Lanczos"
90
-           echo " 9 --> Natural Bicubic Spline"
91
-           echo " 10 -> Experimental"
92
-           echo
93
-           printf "Sepcify the Software Scaler default is 8: "
94
-           read swsopt
95
-           sws_func script
96
-       else
97
-           case "$SCALER" in
98
-               0-9|10)
99
-               sws_func config
100
-               echo
101
-               green "-> Using software scaler '$scaler' set in config file '$CFG'"
102
-               echo
103
-               ;;
104
-               *)
105
-               error "-> Invalid software scaler in config file '$CFG'"
106
-               exit 1
107
-               ;;
108
-           esac
109
-       fi
110
-       printf "Tweak the Software Scaler? y/N: "
111
-       read swstweak
112
-       if  "$swstweak" = "y" -o "$swstweak" = "Y" ; then
113
-           case "$swsopt" in
114
-               2|9)
115
+           }
116
+           if  -z "$SCALER" ; then
117
                echo
118
-               brown "Scaler Tuning"
119
-               brown "~~~~~~~~~~~~~"
120
-               echo " 0 -> Default (0.00, 0.60)"
121
-               echo " 1 -> Catmull-Rom Spline (0.00, 0.50)"
122
-               echo " 2 -> Mitchell-Netravali Spline (0.33, 0.33)"
123
-               echo " 3 -> Cubic B-Spline (1.00, 0.00)"
124
-               echo " 4 -> Custom"
125
+               brown " Software Scalers"
126
+               brown " ~~~~~~~~~~~~~~~~"
127
+               echo " 0 --> Fast Bilinear"
128
+               echo " 1 --> Bilinear"
129
+               echo " 2 --> Bicubic"
130
+               echo " 3 --> Nearest Neighbor"
131
+               echo " 4 --> Area Averaging"
132
+               echo " 5 --> Luma Bicubic/Chroma Bilinear"
133
+               echo " 6 --> Gaussian"
134
+               echo " 7 --> Sinc"
135
+               echo " 8 --> Lanczos"
136
+               echo " 9 --> Natural Bicubic Spline"
137
+               echo " 10 -> Experimental"
138
                echo
139
-               printf "Specify the Scaler Tuning Option default is 1: "
140
-               read swstune
141
-               case "$swstune" in
142
-                   0)  true ;;
143
-                   1|"")   swsparam0=":param0=0.00"; swsparam1=":param1=0.50" ;;
144
-                   2)  swsparam0=":param0=0.33"; swsparam1=":param1=0.33" ;;
145
-                   3)  swsparam0=":param0=1.00"; swsparam1=":param1=0.00" ;;
146
-                   4)
147
-                   printf "Specify the Custom Scaler Tuning values default is 0.00:0.60: "
148
-                   read swscus
149
-                   if  ! -z "$swscus" ; then
150
-                       swsparam0=":param0=$(echo "$swscus" | awk -F: '{print $1}')"
151
-                       swsparam1=":param1=$(echo "$swscus" | awk -F: '{print $2}')"
152
-                   fi
153
+               printf "Sepcify the Software Scaler default is 8: "
154
+               read swsopt
155
+               sws_func script
156
+           else
157
+               case "$SCALER" in
158
+                   0-9|10)
159
+                   sws_func config
160
+                   echo
161
+                   green "-> Using software scaler '$scaler' set in config file '$CFG'"
162
+                   echo
163
                    ;;
164
                    *)
165
-                   error "-> Invalid option"
166
+                   error "-> Invalid software scaler in config file '$CFG'"
167
                    exit 1
168
                    ;;
169
                esac
170
-               ;;
171
-               6|8)
172
-               if  "$swsopt" = "6" ; then
173
-                   swscaler="Gaussian"
174
-                   swsval="0-100"
175
-                   swsdef="0"
176
-                   swstype="Sharpness"
177
-               else
178
-                   swscaler="Lanczos"
179
-                   swsval="1-10"
180
-                   swsdef="3"
181
-                   swstype="Width (alpha)"
182
+           fi
183
+           printf "Tweak the Software Scaler? y/N: "
184
+           read swstweak
185
+           if  "$swstweak" = "y" -o "$swstweak" = "Y" ; then
186
+               case "$swsopt" in
187
+                   2|9)
188
+                   echo
189
+                   brown "Scaler Tuning"
190
+                   brown "~~~~~~~~~~~~~"
191
+                   echo " 0 -> Default (0.00, 0.60)"
192
+                   echo " 1 -> Catmull-Rom Spline (0.00, 0.50)"
193
+                   echo " 2 -> Mitchell-Netravali Spline (0.33, 0.33)"
194
+                   echo " 3 -> Cubic B-Spline (1.00, 0.00)"
195
+                   echo " 4 -> Custom"
196
+                   echo
197
+                   printf "Specify the Scaler Tuning Option default is 1: "
198
+                   read swstune
199
+                   case "$swstune" in
200
+                       0)  true ;;
201
+                       1|"")   swsparam0=":param0=0.00"; swsparam1=":param1=0.50" ;;
202
+                       2)  swsparam0=":param0=0.33"; swsparam1=":param1=0.33" ;;
203
+                       3)  swsparam0=":param0=1.00"; swsparam1=":param1=0.00" ;;
204
+                       4)
205
+                       printf "Specify the Custom Scaler Tuning values default is 0.00:0.60: "
206
+                       read swscus
207
+                       if  ! -z "$swscus" ; then
208
+                           swsparam0=":param0=$(echo "$swscus" | awk -F: '{print $1}')"
209
+                           swsparam1=":param1=$(echo "$swscus" | awk -F: '{print $2}')"
210
+                       fi
211
+                       ;;
212
+                       *)
213
+                       error "-> Invalid option"
214
+                       exit 1
215
+                       ;;
216
+                   esac
217
+                   ;;
218
+                   6|8)
219
+                   if  "$swsopt" = "6" ; then
220
+                       swscaler="Gaussian"
221
+                       swsval="0-100"
222
+                       swsdef="0"
223
+                       swstype="Sharpness"
224
+                   else
225
+                       swscaler="Lanczos"
226
+                       swsval="1-10"
227
+                       swsdef="3"
228
+                       swstype="Width (alpha)"
229
+                   fi
230
+                   printf "Specify the $swscaler scaler $swstype $swsval - default is $swsdef: "
231
+                   read swstune
232
+                   test ! -z "$swstune" && swsparam0=":param0=$swstune" || swsparam0=":param0=$swsdef"
233
+                   ;;
234
+               esac
235
+               printf "Enable Accurate Rounding? y/N: "
236
+               read around
237
+               if  "$around" = "y" -o "$around" = "Y" ; then
238
+                   accuround="+accurate_rnd"
239
+               fi
240
+               printf "Enable Full Chroma Input? y/N: "
241
+               read fcinp
242
+               if  "$fcinp" = "y" -o "$fcinp" = "Y" ; then
243
+                   fullchroma_inp="+full_chroma_inp"
244
+               fi
245
+               printf "Enable Full Chroma Interpolation? y/N: "
246
+               read fcint
247
+               if  "$fcint" = "y" -o "$fcint" = "Y" ; then
248
+                   fullchroma_int="+full_chroma_int"
249
                fi
250
-               printf "Specify the $swscaler scaler $swstype $swsval - default is $swsdef: "
251
-               read swstune
252
-               test ! -z "$swstune" && swsparam0=":param0=$swstune" || swsparam0=":param0=$swsdef"
253
+           fi
254
+           test ! -z "$interlaced" && interl=":interl=1"
255
+           scale="scale=$res$interl:flags=$scaler$accuround$fullchroma_inp$fullchroma_int$swsparam0$swsparam1,"
256
+           ;;
257
+           *)
258
+           WIDTH="$(echo "$res" | awk -Fx '{print $1}')"
259
+           HEIGHT="$(echo "$res" | awk -Fx '{print $2}')"
260
+           echo
261
+           brown "Software Scalers"
262
+           brown "~~~~~~~~~~~~~~~~"
263
+           echo " 0 -> Point"
264
+           echo " 1 -> Bilinear"
265
+           echo " 2 -> Bicubic"
266
+           echo " 3 -> Spline16"
267
+           echo " 4 -> Spline36"
268
+           echo " 5 -> Lanczos"
269
+           echo
270
+           printf "Specify the Software Scaler default is 5: "
271
+           read swsopt
272
+           case "$swsopt" in
273
+               0)  scfilter="point" ;;
274
+               1)  scfilter="bilinear" ;;
275
+               2)  scfilter="bicubic" ;;
276
+               3)  scfilter="spline16" ;;
277
+               4)  scfilter="spline36" ;;
278
+               5|"")   scfilter="lanczos" ;;
279
+               *)
280
+               error "-> Invalide software scaler!"
281
+               exit 1
282
                ;;
283
            esac
284
-           printf "Enable Accurate Rounding? y/N: "
285
-           read around
286
-           if  "$around" = "y" -o "$around" = "Y" ; then
287
-               accuround="+accurate_rnd"
288
-           fi
289
-           printf "Enable Full Chroma Input? y/N: "
290
-           read fcinp
291
-           if  "$fcinp" = "y" -o "$fcinp" = "Y" ; then
292
-               fullchroma_inp="+full_chroma_inp"
293
-           fi
294
-           printf "Enable Full Chroma Interpolation? y/N: "
295
-           read fcint
296
-           if  "$fcint" = "y" -o "$fcint" = "Y" ; then
297
-               fullchroma_int="+full_chroma_int"
298
-           fi
299
-       fi
300
-       test ! -z "$interlaced" && interl=":interl=1"
301
-       scale="scale=$res$interl:flags=$scaler$accuround$fullchroma_inp$fullchroma_int$swsparam0$swsparam1,"
302
+           scale="zscale=width=$WIDTH:height=$HEIGHT:filter=$scfilter,"
303
+           ;;
304
+       esac
305
    fi
306
 fi
307
 
308