Y = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 | BT.709 | BT.2020 | |
---|---|---|---|
a | 0.299 | 0.2126 | 0.2627 |
b | 0.587 | 0.7152 | 0.6780 |
// for i in 0..v.len() {sum += v[i];} | |
// https://play.rust-lang.org/?version=stable&mode=release&edition=2015&gist=a234fd242a39e0e33d1775ba986a7f50 | |
playground::main: | |
pushq %r14 | |
pushq %rbx | |
subq $152, %rsp | |
movq $0, 16(%rsp) | |
movl $800000000, %edi | |
movl $8, %esi | |
callq __rust_alloc@PLT |
Y = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 | BT.709 | BT.2020 | |
---|---|---|---|
a | 0.299 | 0.2126 | 0.2627 |
b | 0.587 | 0.7152 | 0.6780 |
//-------------------------------------------------------- | |
#[derive(Debug, PartialEq, Eq, Copy, Clone)] | |
#[repr(u8)] | |
enum UnscopedEnum { | |
AAA = 1, | |
BBB = 2, | |
CCC = 3, | |
} | |
const AAA: UnscopedEnum = UnscopedEnum::AAA; |
trait FromU32 { | |
fn from_u32(v: u32) -> Self; | |
} | |
macro_rules! impl_from_u32 { | |
($($ty:ty)*) => { | |
$( | |
impl FromU32 for $ty { | |
#[inline] | |
fn from_u32(v: u32) -> $ty { |
#!/usr/bin/env python3 | |
# https://ja.stackoverflow.com/questions/45180/ | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.colors as colors | |
n = 10 | |
x_list = np.array(list(range(n*2))) | |
t_list = np.array(list(range(n*2))) |
# PAT(PID=0x0000) | |
xxd -s ${offset} -c 188 -ps input.ts | grep -E "^47[46]000" |
#include <condition_variable> | |
#include <chrono> | |
#include <iostream> | |
#include <mutex> | |
#include <thread> | |
#include <utility> | |
#include <vector> | |
#include <experimental/coroutine> | |
// delayqueue.cpp -- C++ delay queue | |
// Copyright (c) 2018 yohhoy | |
// | |
// Boost Software License, Version 1.0 | |
// https://www.boost.org/LICENSE_1_0.txt | |
#include <chrono> | |
#include <condition_variable> | |
#include <mutex> | |
#include <utility> | |
#include <vector> |
#include <condition_variable> | |
#include <chrono> | |
#include <iostream> | |
#include <mutex> | |
#include <thread> | |
#include <utility> | |
#include <vector> | |
#include <experimental/coroutine> | |
>> | |
15.9. Class Instance Creation Expressions | |
A class instance creation expression is a poly expression (§15.2) if it uses the diamond form for type arguments to the class, and it appears in an assignment context or an invocation context (§5.2, §5.3). Otherwise, it is a standalone expression. | |
We say that a class is instantiated when an instance of the class is created by a class instance creation expression. Class instantiation involves determining the class to be instantiated (§15.9.1), the enclosing instances (if any) of the newly created instance (§15.9.2), and the constructor to be invoked to create the new instance (§15.9.3). | |
<< | |
>> | |
15.9.1. Determining the Class being Instantiated |