mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 05:22:23 +00:00
ildetect: $ILDETECT_RUN_INTERLACED_ONLY to only run the job if not progressive
This commit is contained in:
parent
1fc7dfe68f
commit
e7c372cb2f
@ -15,6 +15,7 @@ esac
|
|||||||
: ${ILDETECT_MPVFLAGS:=--start=35% --length=35}
|
: ${ILDETECT_MPVFLAGS:=--start=35% --length=35}
|
||||||
: ${ILDETECT_DRY_RUN:=}
|
: ${ILDETECT_DRY_RUN:=}
|
||||||
: ${ILDETECT_QUIET:=}
|
: ${ILDETECT_QUIET:=}
|
||||||
|
: ${ILDETECT_RUN_INTERLACED_ONLY:=}
|
||||||
: ${MAKE:=make}
|
: ${MAKE:=make}
|
||||||
|
|
||||||
# exit status:
|
# exit status:
|
||||||
@ -41,7 +42,9 @@ testfun()
|
|||||||
out=`testfun "$@"`
|
out=`testfun "$@"`
|
||||||
case "$out" in
|
case "$out" in
|
||||||
*"probably: PROGRESSIVE"*)
|
*"probably: PROGRESSIVE"*)
|
||||||
[ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@"
|
[ -n "$ILDETECT_DRY_RUN" ] || \
|
||||||
|
[ -n "$ILDETECT_RUN_INTERLACED_ONLY" ] || \
|
||||||
|
$ILDETECT_MPV "$@"
|
||||||
r=$?
|
r=$?
|
||||||
[ $r -eq 0 ] || exit $(($r | 16))
|
[ $r -eq 0 ] || exit $(($r | 16))
|
||||||
exit 0
|
exit 0
|
||||||
@ -50,13 +53,15 @@ case "$out" in
|
|||||||
out2=`ILDETECT_MPVFLAGS="$ILDETECT_MPVFLAGS --vf-pre=pullup,scale" testfun "$@"`
|
out2=`ILDETECT_MPVFLAGS="$ILDETECT_MPVFLAGS --vf-pre=pullup,scale" testfun "$@"`
|
||||||
case "$out2" in
|
case "$out2" in
|
||||||
*"probably: TELECINED"*|*"probably: INTERLACED"*)
|
*"probably: TELECINED"*|*"probably: INTERLACED"*)
|
||||||
[ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre yadif
|
[ -n "$ILDETECT_DRY_RUN" ] || \
|
||||||
|
$ILDETECT_MPV "$@" -vf-pre yadif
|
||||||
r=$?
|
r=$?
|
||||||
[ $r -eq 0 ] || exit $(($r | 16))
|
[ $r -eq 0 ] || exit $(($r | 16))
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
[ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre pullup
|
[ -n "$ILDETECT_DRY_RUN" ] || \
|
||||||
|
$ILDETECT_MPV "$@" -vf-pre pullup
|
||||||
r=$?
|
r=$?
|
||||||
[ $r -eq 0 ] || exit $(($r | 16))
|
[ $r -eq 0 ] || exit $(($r | 16))
|
||||||
exit 1
|
exit 1
|
||||||
@ -64,7 +69,8 @@ case "$out" in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*"probably: INTERLACED"*)
|
*"probably: INTERLACED"*)
|
||||||
[ -n "$ILDETECT_DRY_RUN" ] || $ILDETECT_MPV "$@" -vf-pre yadif
|
[ -n "$ILDETECT_DRY_RUN" ] || \
|
||||||
|
$ILDETECT_MPV "$@" -vf-pre yadif
|
||||||
r=$?
|
r=$?
|
||||||
[ $r -eq 0 ] || exit $(($r | 16))
|
[ $r -eq 0 ] || exit $(($r | 16))
|
||||||
exit 2
|
exit 2
|
||||||
|
Loading…
Reference in New Issue
Block a user