Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th November 2021, 18:22 | #81 | Link | ||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
Also, all that new assembly code is new surface area for bugs and exploits. Decode in HW has a lot lower (but non-zero) risk of exploits. A huge share of device remote exploits have been on media features. Quote:
And MP4 container parsing is battle-hardened code. While wrapper code isn't as risky as actual DSP SW, those still have been a fertile area for exploits. |
||
16th November 2021, 21:27 | #82 | Link | |
Registered User
Join Date: Apr 2017
Posts: 171
|
Quote:
What also worries me is when you say: "before it's too late", because for example in NHW, I did not develop for hardware, and so this worries me that there are maybe main design choices/errors that prevent the codec from being feasible in hardware.... |
|
19th November 2021, 16:28 | #83 | Link | ||
Registered User
Join Date: Jun 2003
Posts: 121
|
Quote:
Quote:
Anyways, complex containers are extremely difficult to get right. Stagefright exploit comes to mind: https://www.kb.cert.org/vuls/id/924951. WebP's RIFF container was very simple, and yet we had 1 exploit (only!) in 10 years. Not bad, but not zero. If you're not receiving user media files uploaded from the wild, it's easy to think a container format is simple and safe. VLC community has great horror stories about containers. Even after so many years of bug fixing, i still wouldn't trust ffmpeg to decode any MP4 file without proper sandboxing. Regarding HW, in the past, we tried to reuse VP8 hardware decoding for WebP lossy, and it wasn't terribly faster. And actually quite brittle because of driver failures. https://groups.google.com/a/webmproj...m/Ctl5wEoalGwJ All in all, there's a real need for less flexible and easier-to-implement container, without any low-usage complex feature. It's not just about size reduction, but also making sure it's easy for implementations to get right. |
||
6th February 2022, 08:38 | #84 | Link |
Registered User
Join Date: Jul 2015
Posts: 705
|
I created the newest file av1enc with
Library encoder: av1enc 0.0.1 8_12bit c++ [01 Feb 2022] {boost, mingw} libWebP 1.2.2 c [20 Jan 2022] aom 3.3.0 c [03 Feb 2022] libavif 0.9.3 c [28 Jan 2022] jpegxl 0.7.0 c++ [04 Feb 2022] brotli 1.0.9 c [06 Dec 2021] libyuv 1.8.10 c++ [03 Feb 2022] boost 1.78.0 c++ [02 Dec 2021] libJPEG-turbo 2.1.3 8bit c [01 Feb 2022] {assembler SIMD} libPNG 1.6.38 c [12 Mar 2021] {zlib} libTIFF 4.3.0 c [05 Feb 2022] {zlib, libdeflate, zstd} giflib 5.2.1 c [24 Jun 2019] zlib 1.2.11.1 c [01 Jan 2022] I can see that the names of some functions have changed. Code:
opt.Add("-pass <int>", "number of passes [1..2..3]"); Code:
cpi->source = av1_scale_if_required(cm, cpi->unscaled_source, &cpi->scaled_source, cm->features.interp_filter, 0, false, false); if (cpi->unscaled_last_source != NULL) { cpi->last_source = av1_scale_if_required( cm, cpi->unscaled_last_source, &cpi->scaled_last_source, cm->features.interp_filter, 0, false, false); } Code:
cpi->source = av1_realloc_and_scale_if_required(cm, cpi->unscaled_source, &cpi->scaled_source, cm->features.interp_filter, 0, false, false, cpi->oxcf.border_in_pixels, cpi->oxcf.tool_cfg.enable_global_motion); if (cpi->unscaled_last_source != NULL) { cpi->last_source = av1_realloc_and_scale_if_required( cm, cpi->unscaled_last_source, &cpi->scaled_last_source, cm->features.interp_filter, 0, false, false, cpi->oxcf.border_in_pixels, cpi->oxcf.tool_cfg.enable_global_motion); } https://github.com/AOMediaCodec/libavif/pull/838 I also don't know why avif is no longer compatible with av1enc. The file sizes for av1 and avif are different. I don't think command functions pass. av1enc.exe -q 90 -420 -size 1563x1558 -effort 5 -thread 4 image_21447_24bit.jpg -d image_21447_24bitw1.av1 1239149kb av1enc.exe -avif -q 90 -420 -size 1563x1558 -effort 5 -thread 4 image_21447_24bit.jpg -d image_21447_24bitw1.avif 931201kb Codec works av1enc.exe -q 90 -420 -size 1563x1558 -effort 5 -tune butteraugli -thread 4 image_21447_24bit.jpg -d image_21447_24bitw2.av1 Codec doesn't work tune butteraugli av1enc.exe -avif -q 90 -420 -size 1563x1558 -effort 5 -tune butteraugli -thread 4 image_21447_24bit.jpg -d image_21447_24bitw2.avif https://www.sendspace.com/file/iryn52 I add defined Code:
opt.Add("-tune <metric>", "choose metric for tuning. " #if CONFIG_TUNE_VMAF "One of: psnr, ssim, vmaf" #elif CONFIG_TUNE_BUTTERAUGLI "One of: psnr, ssim, butteraugli" #elif CONFIG_TUNE_VMAF && CONFIG_TUNE_BUTTERAUGLI "One of: psnr, ssim, vmaf, butteraugli" #else "One of: psnr, ssim" #endif // CONFIG_TUNE_VMAF ); Code:
#if defined(WP2_HAVE_LIBGAV1) opt.Add("-libgav1", "use libgav1 decoder"); #endif Code:
#if CONFIG_TUNE_VMAF } else if (!strcmp(argv[c], "vmaf") || !strcmp(argv[c], "VMAF")) { params.tuning = WP2::ParamsAV1::Tuning::kVmaf; #elif CONFIG_TUNE_BUTTERAUGLI } else if (!strcmp(argv[c], "butteraugli") || !strcmp(argv[c], "BUTTERAUGLI")) { params.tuning = WP2::ParamsAV1::Tuning::kButteraugli; #endif Code:
#if defined(WP2_HAVE_LIBGAV1) } else if (!strcmp(argv[c], "-libgav1")) { params.use_libgav1_decoder = true; #endif Code:
const int tuning = (params.tuning == ParamsAV1::Tuning::kPsnr) ? AOM_TUNE_PSNR : (params.tuning == ParamsAV1::Tuning::kSsim) ? AOM_TUNE_SSIM #if CONFIG_TUNE_VMAF : (params.tuning == ParamsAV1::Tuning::kVmaf) ? AOM_TUNE_VMAF_MAX_GAIN #elif CONFIG_TUNE_BUTTERAUGLI : (params.tuning == ParamsAV1::Tuning::kButteraugli) ? AOM_TUNE_BUTTERAUGLI #endif : 0; Code:
const char* kTuningStr[] = {"PSNR", "SSIM" #if CONFIG_TUNE_VMAF , "VMAF" #elif CONFIG_TUNE_BUTTERAUGLI , "BUTTERAUGLI" #endif }; Code:
static const struct aomOptionEnumList tuningEnum[] = { // { "psnr", AOM_TUNE_PSNR }, // { "ssim", AOM_TUNE_SSIM }, // #if CONFIG_TUNE_VMAF { "vmaf", AOM_TUNE_VMAF_MAX_GAIN }, // #elif CONFIG_TUNE_BUTTERAUGLI { "butteraugli", AOM_TUNE_BUTTERAUGLI }, // #endif { NULL, 0 } }; Last edited by Jamaika; 6th February 2022 at 21:55. |
Thread Tools | Search this Thread |
Display Modes | |
|
|