Skip to content

Instantly share code, notes, and snippets.

--- broken.txt 2020-09-30 22:12:52.605289590 +0100
+++ fixed.txt 2020-09-30 22:12:40.529289680 +0100
@@ -23865,9 +23865,19 @@
transport_priority: 0 (0x00)
PID: 17 (0x0011) [= DVB Service Description Table (SDT), Bouquet Association Table (BAT)]
transport_scrambling_control: 0 (0x00) [= No scrambling of TS packet payload]
-adaptation_field_control: 1 (0x01) [= no adaptation_field, payload only]
+adaptation_field_control: 3 (0x03) [= adaptation_field followed by payload]
continuity_counter: 0 (0x00) [= (duplicate packet)]
- Payload: (len: 184)
|-----------------------------------------------------------|
| Subsets 1-4 8-bit RGB AVIF vs pngcrush baseline |
|-----------------------------------------------------------|
| Identity (GBR) | Mean: 86.32% | StdDev: 5.68% |
| YCbCr 10-bit | Mean: 140.73% | StdDev: 9.68% |
| YCgCo 9-bit (as 10-bit) | Mean: 82.21% | StdDev: 5.83% |
| PLHaar N-bit to N-bit | Mean: 86.92% | StdDev: 5.88% |
|-----------------------------------------------------------|
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use bignum;
use Statistics::Basic qw(mean stddev);
use List::Util qw(max);
my @id;
#ifdef _WIN32
#define fseeko _fseeki64
#define ftello _fseeki64
#define off_t __int64
#else
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE_SOURCE
#endif
#include <stdint.h>
From 864d5bf32dce364fa79abda016ed145067183fcd Mon Sep 17 00:00:00 2001
From: Derek Buitenhuis <[email protected]>
Date: Fri, 21 Jun 2019 14:26:20 +0100
Subject: [PATCH] hlsenc: Add option to set custom HTTP headers
Signed-off-by: Derek Buitenhuis <[email protected]>
---
doc/muxers.texi | 3 +++
libavformat/hlsenc.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/src/lib.rs b/src/lib.rs
index c67ad0a..1438342 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -101,6 +101,7 @@ pub struct Packet {
pub frame_type: FrameType,
}
+type PixelRange=rav1e::PixelRange;
type ChromaSamplePosition=rav1e::ChromaSamplePosition;
vimeo@vimeo-dev:~/crav1e$ cbindgen
WARN: Skip rav1e::BLOCK_SIZE_WIDTH_LOG2 - (not `pub`).
WARN: Skip rav1e::DATA_ALIGNMENT_LOG2 - (not `pub`).
WARN: Skip rav1e::STRIDE_ALIGNMENT_LOG2 - (not `pub`).
WARN: Skip rav1e::ADD - (not `pub`).
WARN: Skip rav1e::ADD - (not `pub`).
WARN: Skip rav1e::ADD - (not `pub`).
WARN: Skip rav1e::ADD - (not `pub`).
WARN: Skip rav1e::ADD - (not `pub`).
WARN: Skip rav1e::ADD - (not `pub`).
diff --git a/src/rate.rs b/src/rate.rs
index d2bee25..3ef4acf 100644
--- a/src/rate.rs
+++ b/src/rate.rs
@@ -486,7 +486,7 @@ impl RCState {
// errors in the worst case.
// The 256 frame maximum means we'll require 8-10 seconds of pre-buffering
// at 24-30 fps, which is not unreasonable.
- let reservoir_frame_delay = clamp((max_key_frame_interval*3) >> 1, 12, 256);
+ let reservoir_frame_delay = max_key_frame_interval*3 >> 1;
diff --git a/src/rate.rs b/src/rate.rs
--- a/src/rate.rs
+++ b/src/rate.rs
@@ -503,30 +503,15 @@ impl RCState {
// All of these initial scale/exp values are from Theora, and have not yet
// been adapted to AV1, so they're certainly wrong.
// The B-frame values especially are simply copies of the P-frame values.
- let i_exp: u8;
- let i_log_scale: i64;
- if ibpp < 1 {
vimeo@vimeo-dev:~/rav1e$ ./target/release/rav1e --bitrate 1000 --output test9.ivf small.y4m
560x320 @ 30/1 fps
encoded 1 frames, 1.114 fps, 1098.28 Kb/s ^C
vimeo@vimeo-dev:~/rav1e$ ./target/release/rav1e --bitrate 1000 --limit 1 --output test9.ivf small.y4m
560x320 @ 30/1 fps
encoded 1/1 frames, 1.131 fps, 1098.28 Kb/s, est. size: 0.00 MB, est. time: 0 s
Key Frames: 1 avg size: 4686 B
Inter: 0 avg size: 0 B
Intra Only: 0 avg size: 0 B
Switch: 0 avg size: 0 B