Commit 13cc3645 authored by multiple authors's avatar multiple authors Committed by Michael Niedermayer

libavfilter: add colormatrix filter

Ported by: Baptiste Coudurier
cleanup+fate by ubitux
For detailed authorship of the original code please see avisynth
parent 4480edcf
......@@ -1670,6 +1670,7 @@ aresample_filter_deps="swresample"
ass_filter_deps="libass"
blackframe_filter_deps="gpl"
boxblur_filter_deps="gpl"
colormatrix_filter_deps="gpl"
cropdetect_filter_deps="gpl"
delogo_filter_deps="gpl"
drawtext_filter_deps="libfreetype"
......
......@@ -918,6 +918,18 @@ boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1
@end itemize
@section colormatrix
The colormatrix filter allows conversion between any of the following color
space: BT.709 (@var{bt709}), BT.601 (@var{bt601}), SMPTE-240M (@var{smpte240m})
and FCC (@var{fcc}).
The syntax of the parameters is @var{source}:@var{destination}:
@example
colormatrix=bt601:smpte240m
@end example
@section copy
Copy the input source unchanged to the output. Mainly useful for
......
......@@ -52,6 +52,7 @@ OBJS-$(CONFIG_BBOX_FILTER) += bbox.o vf_bbox.o
OBJS-$(CONFIG_BLACKDETECT_FILTER) += vf_blackdetect.o
OBJS-$(CONFIG_BLACKFRAME_FILTER) += vf_blackframe.o
OBJS-$(CONFIG_BOXBLUR_FILTER) += vf_boxblur.o
OBJS-$(CONFIG_COLORMATRIX_FILTER) += vf_colormatrix.o
OBJS-$(CONFIG_COPY_FILTER) += vf_copy.o
OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o
OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o
......
......@@ -60,6 +60,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (BLACKDETECT, blackdetect, vf);
REGISTER_FILTER (BLACKFRAME, blackframe, vf);
REGISTER_FILTER (BOXBLUR, boxblur, vf);
REGISTER_FILTER (COLORMATRIX, colormatrix, vf);
REGISTER_FILTER (COPY, copy, vf);
REGISTER_FILTER (CROP, crop, vf);
REGISTER_FILTER (CROPDETECT, cropdetect, vf);
......
This diff is collapsed.
......@@ -28,6 +28,11 @@ do_lavfi() {
fi
}
do_lavfi_colormatrix() {
do_lavfi "${1}1" "$1=$4:$5,$1=$5:$3,$1=$3:$4,$1=$4:$3,$1=$3:$5,$1=$5:$2"
do_lavfi "${1}2" "$1=$2:$3,$1=$3:$2,$1=$2:$4,$1=$4:$2,$1=$2:$5,$1=$5:$4"
}
do_lavfi "crop" "crop=iw-100:ih-100:100:100"
do_lavfi "crop_scale" "crop=iw-100:ih-100:100:100,scale=400:-1"
do_lavfi "crop_scale_vflip" "null,null,crop=iw-200:ih-200:200:200,crop=iw-20:ih-20:20:20,scale=200:200,scale=250:250,vflip,vflip,null,scale=200:200,crop=iw-100:ih-100:100:100,vflip,scale=200:200,null,vflip,crop=iw-100:ih-100:100:100,null"
......@@ -55,6 +60,8 @@ do_lavfi "vflip" "vflip"
do_lavfi "vflip_crop" "vflip,crop=iw-100:ih-100:100:100"
do_lavfi "vflip_vflip" "vflip,vflip"
do_lavfi_colormatrix "colormatrix" bt709 fcc bt601 smpte240m
do_lavfi_pixfmts(){
test ${test%_[bl]e} = pixfmts_$1 || return 0
filter=$1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment