Skip to content

Instantly share code, notes, and snippets.

View wnpllrzodiac's full-sized avatar

Michael.Ma wnpllrzodiac

View GitHub Profile
@wnpllrzodiac
wnpllrzodiac / main.cpp
Last active December 13, 2024 14:51
0-1 knapsack solve
// https://www.youtube.com/watch?v=nLmhmB6NzcM
std::vector<int> profits = { 1,2,5,6 }; // 5, 8
std::vector<int> weights = { 2,3,4,5 }; //, 4, 9
int m = 8;//20;
int n = weights.size();
std::vector<std::vector<int>> results(n + 1, std::vector<int>(m + 1, 0));
for (int i = 1;i <= n;i++) {
@wnpllrzodiac
wnpllrzodiac / isobmff.md
Created April 23, 2020 03:12 — forked from yohhoy/isobmff.md
ISO Base Media File Format

AAC

ISO/IEC 14496-3, 1.6.2.1 AudioSpecificConfig

AudioSpecificConfig() {
	audioObjectType = GetAudioObjectType();
	samplingFrequencyIndex; // 4 bslbf
	if (samplingFrequencyIndex == 0xf) {
		samplingFrequency; // 24 uimsbf
	}
@wnpllrzodiac
wnpllrzodiac / gist:dc1008dedf7b779c0f8aa24bc15f95c5
Created March 4, 2020 06:34
windows curl fix chinese charset
curl http://a.com | iconv -f utf-8 -t gbk
pip freeze > requirements.txt
@wnpllrzodiac
wnpllrzodiac / youtube_format_code_itag_list.md
Created August 5, 2019 01:28 — forked from sidneys/youtube_format_code_itag_list.md
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
@wnpllrzodiac
wnpllrzodiac / gist:5d583ba376e7a4f4d7ab6139837d9eee
Created February 27, 2019 09:10
ffmpeg filter(with SDL) sample code
/*
* Copyright (c) 2010 Nicolas George
* Copyright (c) 2011 Stefano Sabatini
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
放大:
重视速度:fast_bilinear, point
重视质量:cubic, spline, lanczos
缩小:
重视速度:fast_bilinear, point
重视质量:gauss, bilinear
重视锐度:cubic, spline, lanczos
注意:使用定bit(而不是定量化器)编码时,稍模糊的输入可能反而比较为锐的输入在缩放后获得较好的结果,尤其在低码率时更是如此。
错误类型
ringing