[x265] [PATCH] doc: update cli.rst for vmaf
# HG changeset patch # User induma...@multicorewareinc.com # Date 1523965217 -19800 # Tue Apr 17 17:10:17 2018 +0530 # Node ID 2b2914134de41d9573270aa9cb95d7a5b017 # Parent 7305220d469b0c262ef9742d90419ff85832d233 doc: update cli.rst for vmaf diff -r 7305220d469b -r 2b2914134de4 doc/reST/api.rst --- a/doc/reST/api.rst Fri Apr 13 13:51:32 2018 +0530 +++ b/doc/reST/api.rst Tue Apr 17 17:10:17 2018 +0530 @@ -411,7 +411,7 @@ double x265_calculate_vmafscore(x265_param*, x265_vmaf_data*); /* x265_calculate_vmaf_framelevelscore: - *returns VMAF score for each frame in a given input video. */ + *returns VMAF score for each frame in a given input video. The frame level VMAF score does not include temporal scores. */ double x265_calculate_vmaf_framelevelscore(x265_vmaf_framedata*); .. Note:: ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add VMAF suppport to report per frame and aggregate VMAF score
On Tue, Apr 17, 2018 at 12:46 PM, Deepthi Nandakumar < deepthipnandaku...@gmail.com> wrote: > Thanks. My question is, why not calculate the full VMAF metrics at the end > of encode, and write in the per-frame VMAF metric into your CSV file (if > the file is incrementally written, you might need to do some weird pointer > math, moving to the end of each line etc). > If we call compute_vmaf API at the end of encode, it will return aggregate vmaf score for the given input. It will not give you the frame level vmaf scores. We can get the frame level scores dumped to a file by specifying -log_path and -log_fmt options. The log file generated will be in POC order and not in the Encode Order. We can read from that log file and dump the frame level scores in CSV file, but this scenario will not be efficient for inputs with more frames like movies. > > Isnt that a better solution than the current one - where you're not only > calculating VMAF twice, once each for per-frame and per-sequence, but your > per-frame metric isn't even accurate, because you've left out the motion > component. > We agree that frame level vmaf scores is not accurate, but it can be a reference since it includes spatial scores. > > VMAF calculation one frame at a time should be used when the file has only > one frame. > > On Tue, Apr 17, 2018 at 11:52 AM, Indumathi Ravichandran < > induma...@multicorewareinc.com> wrote: > >> >> >> On Tue, Apr 17, 2018 at 6:44 AM, Deepthi Nandakumar < >> deepthipnandaku...@gmail.com> wrote: >> >>> I cannot find the implementation of compute_vmaf in the patch attached. >>> >> compute_vmaf is an API function exposed by libvmaf and we have integrated >> libvmaf into libx265. >> >>> I'm not sure why the libvmaf interface for a single frame doesnt >>> include the motion component? >>> >> Spatial score of any frame X requires its source and recon YUVS. Whereas >> temporal score of frame 'X' requires the source YUVs of frames X and X-1( >> in POC order ). Since we are just passing the source and recon YUVs of any >> particular frame, it doesn't include motion score in it. Even if we buffer >> the recons and give source and recon of X and X-1 to VMAF, it will only >> return a single aggregare VMAF score ( Again it is not specific to that >> frame). >> >>> Can you point me to this code and vmaf API description? >>> >> Refer this link for VMAF API description : https://github.com/Netflix/vma >> f#usage-through-libvmaf >> >>> >>> On Mon, Apr 16, 2018 at 5:26 PM, Aruna Matheswaran < >>> ar...@multicorewareinc.com> wrote: >>> On Mon, Apr 16, 2018 at 4:00 PM, Ashok Kumar Mishra < as...@multicorewareinc.com> wrote: > > > On Mon, Apr 16, 2018 at 3:33 PM, Deepthi Nandakumar < > deepthipnandaku...@gmail.com> wrote: > >> Not sure I understand - are you saying you write the frame level VMAF >> score into the CSV file, and then read it back again to compute the mean? >> > > Yes, now I sense something wrong in our code. If we are computing per > frame vmaf score, we can take the mean of vmaf scores of all frames to > get > the aggregate vmaf score. > So file reads are not required. I was thinking in a different way that > a user may be interested in either frame level or file level vmaf score. > > Is it the aggregate vmaf score is same as the mean of per frame vmaf > scores of all the frames in a file or there are some other methods used to > calculate aggregate vmaf score for a file? > The frame level score we get from the vmaf library by passing just a source frame and its recon isn't actually a vmaf score as it doesn't include the motion component of vmaf. When we pass the whole source and recon yuvs to the vmaf library, it will compute per frame vmaf scores (which includes motion component in its computation) and give out the mean vmaf score of all the frames as the aggregate score. Therefore, we are passing the source and recon yuv files to get the aggregate vmaf score instead of just averaging the frame level scores. > > >> >> On Mon, Apr 16, 2018 at 3:24 PM, Ashok Kumar Mishra < >> as...@multicorewareinc.com> wrote: >> >>> >>> >>> On Mon, Apr 16, 2018 at 2:42 PM, Deepthi Nandakumar < >>> deepthipnandaku...@gmail.com> wrote: >>> Why are file reads required to compute vmaf? The recon and original yuv sources are available. >>> >>> File reads are required when you compute vmaf score of the complete >>> file, and it is not required for frame level vmaf score. >>> Why floating point reads? >>> >>> I believe there is no floating point reads, the vmaf score is >>> floating point. Correct me if I am wrong. >>> >>> On Thu, Apr 12, 2018 at 5:31 PM, Ashok Kumar Mishra < as...@multicorewareinc.com> wrote:
Re: [x265] Maximum frame size within VBV constrains
Hi Vasiliy, *--vbv-init * helps determining the absolute maximum frame size - http://x265.readthedocs.io/en/default/cli.html#cmdoption-vbv-init . *--max-ausize-factor * also help us control the maximum frame size - http://x265.readthedocs.io/en/default/cli.html#cmdoption-max-ausize-factor. It is actually a factor ranging from 0.5 - 1 which tells what fraction of the maximum frame size allowed in the specification for particular level should be used as maximum frame size in the encoder. Though maximum frame size varies between key frames and non key frames, this option should be helpful in your case. Thanks, Aruna On Tue, Apr 17, 2018 at 12:55 PM, Vasiliy Volkovwrote: > Hi, > > Is it possible to specify maximum frame size in addition to VBV options, > somehow? So then I can be sure that libx265 ratecontroller will not use any > larger value for all frames than specified size. It's useful when working > with some "strange" devices which has small buffers and also has some side > effects if frame large enough to fulfil most of buffer space. > > ___ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > > ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] Maximum frame size within VBV constrains
Hi, Is it possible to specify maximum frame size in addition to VBV options, somehow? So then I can be sure that libx265 ratecontroller will not use any larger value for all frames than specified size. It's useful when working with some "strange" devices which has small buffers and also has some side effects if frame large enough to fulfil most of buffer space. ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] Add VMAF suppport to report per frame and aggregate VMAF score
Thanks. My question is, why not calculate the full VMAF metrics at the end of encode, and write in the per-frame VMAF metric into your CSV file (if the file is incrementally written, you might need to do some weird pointer math, moving to the end of each line etc). Isnt that a better solution than the current one - where you're not only calculating VMAF twice, once each for per-frame and per-sequence, but your per-frame metric isn't even accurate, because you've left out the motion component. VMAF calculation one frame at a time should be used when the file has only one frame. On Tue, Apr 17, 2018 at 11:52 AM, Indumathi Ravichandran < induma...@multicorewareinc.com> wrote: > > > On Tue, Apr 17, 2018 at 6:44 AM, Deepthi Nandakumar < > deepthipnandaku...@gmail.com> wrote: > >> I cannot find the implementation of compute_vmaf in the patch attached. >> > compute_vmaf is an API function exposed by libvmaf and we have integrated > libvmaf into libx265. > >> I'm not sure why the libvmaf interface for a single frame doesnt include >> the motion component? >> > Spatial score of any frame X requires its source and recon YUVS. Whereas > temporal score of frame 'X' requires the source YUVs of frames X and X-1( > in POC order ). Since we are just passing the source and recon YUVs of any > particular frame, it doesn't include motion score in it. Even if we buffer > the recons and give source and recon of X and X-1 to VMAF, it will only > return a single aggregare VMAF score ( Again it is not specific to that > frame). > >> Can you point me to this code and vmaf API description? >> > Refer this link for VMAF API description : https://github.com/Netflix/ > vmaf#usage-through-libvmaf > >> >> On Mon, Apr 16, 2018 at 5:26 PM, Aruna Matheswaran < >> ar...@multicorewareinc.com> wrote: >> >>> >>> >>> On Mon, Apr 16, 2018 at 4:00 PM, Ashok Kumar Mishra < >>> as...@multicorewareinc.com> wrote: >>> On Mon, Apr 16, 2018 at 3:33 PM, Deepthi Nandakumar < deepthipnandaku...@gmail.com> wrote: > Not sure I understand - are you saying you write the frame level VMAF > score into the CSV file, and then read it back again to compute the mean? > Yes, now I sense something wrong in our code. If we are computing per frame vmaf score, we can take the mean of vmaf scores of all frames to get the aggregate vmaf score. So file reads are not required. I was thinking in a different way that a user may be interested in either frame level or file level vmaf score. Is it the aggregate vmaf score is same as the mean of per frame vmaf scores of all the frames in a file or there are some other methods used to calculate aggregate vmaf score for a file? >>> >>> The frame level score we get from the vmaf library by passing just a >>> source frame and its recon isn't actually a vmaf score as it doesn't >>> include the motion component of vmaf. When we pass the whole source and >>> recon yuvs to the vmaf library, it will compute per frame vmaf scores >>> (which includes motion component in its computation) and give out the mean >>> vmaf score of all the frames as the aggregate score. Therefore, we are >>> passing the source and recon yuv files to get the aggregate vmaf score >>> instead of just averaging the frame level scores. >>> > > On Mon, Apr 16, 2018 at 3:24 PM, Ashok Kumar Mishra < > as...@multicorewareinc.com> wrote: > >> >> >> On Mon, Apr 16, 2018 at 2:42 PM, Deepthi Nandakumar < >> deepthipnandaku...@gmail.com> wrote: >> >>> Why are file reads required to compute vmaf? The recon and original >>> yuv sources are available. >>> >> >> File reads are required when you compute vmaf score of the complete >> file, and it is not required for frame level vmaf score. >> >>> >>> Why floating point reads? >>> >> >> I believe there is no floating point reads, the vmaf score is >> floating point. Correct me if I am wrong. >> >> >>> >>> On Thu, Apr 12, 2018 at 5:31 PM, Ashok Kumar Mishra < >>> as...@multicorewareinc.com> wrote: >>> On Thu, Apr 12, 2018 at 4:43 PM,wrote: > # HG changeset patch > # User IndumathiR > # Date 1518528290 -19800 > # Tue Feb 13 18:54:50 2018 +0530 > # Node ID 27e3b161cd8b59ad1cae67a96e11e3e0506d5017 > # Parent 04a337abd70de269cef7d9655365f3a3ebde02aa > Add VMAF suppport to report per frame and aggregate VMAF score > > diff -r 04a337abd70d -r 27e3b161cd8b doc/reST/api.rst > --- a/doc/reST/api.rst Thu Apr 12 15:10:59 2018 +0530 > +++ b/doc/reST/api.rst Tue Feb 13 18:54:50 2018 +0530 > @@ -398,7 +398,30 @@ > * release library static allocations, reset > configured CTU size */ >
Re: [x265] [PATCH] Add VMAF suppport to report per frame and aggregate VMAF score
On Tue, Apr 17, 2018 at 6:44 AM, Deepthi Nandakumar < deepthipnandaku...@gmail.com> wrote: > I cannot find the implementation of compute_vmaf in the patch attached. > compute_vmaf is an API function exposed by libvmaf and we have integrated libvmaf into libx265. > I'm not sure why the libvmaf interface for a single frame doesnt include > the motion component? > Spatial score of any frame X requires its source and recon YUVS. Whereas temporal score of frame 'X' requires the source YUVs of frames X and X-1( in POC order ). Since we are just passing the source and recon YUVs of any particular frame, it doesn't include motion score in it. Even if we buffer the recons and give source and recon of X and X-1 to VMAF, it will only return a single aggregare VMAF score ( Again it is not specific to that frame). > Can you point me to this code and vmaf API description? > Refer this link for VMAF API description : https://github.com/Netflix/vmaf#usage-through-libvmaf > > On Mon, Apr 16, 2018 at 5:26 PM, Aruna Matheswaran < > ar...@multicorewareinc.com> wrote: > >> >> >> On Mon, Apr 16, 2018 at 4:00 PM, Ashok Kumar Mishra < >> as...@multicorewareinc.com> wrote: >> >>> >>> >>> On Mon, Apr 16, 2018 at 3:33 PM, Deepthi Nandakumar < >>> deepthipnandaku...@gmail.com> wrote: >>> Not sure I understand - are you saying you write the frame level VMAF score into the CSV file, and then read it back again to compute the mean? >>> >>> Yes, now I sense something wrong in our code. If we are computing per >>> frame vmaf score, we can take the mean of vmaf scores of all frames to get >>> the aggregate vmaf score. >>> So file reads are not required. I was thinking in a different way that a >>> user may be interested in either frame level or file level vmaf score. >>> >>> Is it the aggregate vmaf score is same as the mean of per frame vmaf >>> scores of all the frames in a file or there are some other methods used to >>> calculate aggregate vmaf score for a file? >>> >> >> The frame level score we get from the vmaf library by passing just a >> source frame and its recon isn't actually a vmaf score as it doesn't >> include the motion component of vmaf. When we pass the whole source and >> recon yuvs to the vmaf library, it will compute per frame vmaf scores >> (which includes motion component in its computation) and give out the mean >> vmaf score of all the frames as the aggregate score. Therefore, we are >> passing the source and recon yuv files to get the aggregate vmaf score >> instead of just averaging the frame level scores. >> >>> >>> On Mon, Apr 16, 2018 at 3:24 PM, Ashok Kumar Mishra < as...@multicorewareinc.com> wrote: > > > On Mon, Apr 16, 2018 at 2:42 PM, Deepthi Nandakumar < > deepthipnandaku...@gmail.com> wrote: > >> Why are file reads required to compute vmaf? The recon and original >> yuv sources are available. >> > > File reads are required when you compute vmaf score of the complete > file, and it is not required for frame level vmaf score. > >> >> Why floating point reads? >> > > I believe there is no floating point reads, the vmaf score is floating > point. Correct me if I am wrong. > > >> >> On Thu, Apr 12, 2018 at 5:31 PM, Ashok Kumar Mishra < >> as...@multicorewareinc.com> wrote: >> >>> >>> >>> On Thu, Apr 12, 2018 at 4:43 PM,>>> wrote: >>> # HG changeset patch # User IndumathiR # Date 1518528290 -19800 # Tue Feb 13 18:54:50 2018 +0530 # Node ID 27e3b161cd8b59ad1cae67a96e11e3e0506d5017 # Parent 04a337abd70de269cef7d9655365f3a3ebde02aa Add VMAF suppport to report per frame and aggregate VMAF score diff -r 04a337abd70d -r 27e3b161cd8b doc/reST/api.rst --- a/doc/reST/api.rst Thu Apr 12 15:10:59 2018 +0530 +++ b/doc/reST/api.rst Tue Feb 13 18:54:50 2018 +0530 @@ -398,7 +398,30 @@ * release library static allocations, reset configured CTU size */ void x265_cleanup(void); +VMAF (Video Multi-Method Assessment Fusion) +== +If you set the ENABLE_LIBVMAF cmake option to ON, then x265 will report per frame +and aggregate VMAF score for the given input and dump the scores in csv file. +The user also need to specify the :option:`--recon` in command line to get the VMAF scores. + +/* x265_calculate_vmafScore: + *returns VMAF score for the input video. + *This api must be called only after encoding was done. */ +double x265_calculate_vmafscore(x265_param*, x265_vmaf_data*); + +/* x265_calculate_vmaf_framelevelscore: + *