|
|
(54人の利用者による、間の413版が非表示) |
1行目: |
1行目: |
| <p style="color: red; font-size: 5000%; text-align:center"> | | <!-- カテゴリ表示でのデフォルトソート名 --> |
| †
| | {{DEFAULTSORT:あなあきいじつきよういた}} |
| </p>
| |
| <p style="color: red; font-size: 800%">
| |
| R.I.P 赤座あかり
| |
|
| |
|
| <FONT color="white">💩</font> | | <!-- 所属カテゴリ --> |
| </p>
| | [[Category:2ちゃんねるの板]] |
| | [[Category:ゆるゆり]] |
| | <!-- Anarchy実況板テンプレート --> |
| | {{板 |
| | | image = ファイル:穴実十八代目.png |
| | | 板名 = Anarchy実況 |
| | | カテゴリ = 実況ch |
| | | サーバ = agree |
| | | フォルダ = liveanarchy |
| | | 開設日 = 2014年7月2日 |
| | | 名無しの名前 = 穴実の良心 ('''強制''') |
| | | メール欄 = 空白(変更不可) |
| | | ID = 強制非表示(!id使用不可) |
| | }} |
|
| |
|
| =='''''<FONT size="7"><big><p style="color:#610B0B; background:#5E610B;">赤座あかりちゃんのチンコバッキバキでワロタwww</p></big></font>'''''==
| | '''Anarchy実況板'''(アナーキーじっきょういた)は、インターネット掲示板'''[[5ちゃんねる]]'''にある板のうちの一つ。 |
|
| |
|
| <br/>
| | 略称は'''穴実'''など。Anarchy実況板に住んでいる人たち(住人)を一般的に'''穴実民'''、'''穴カス'''と言う。姉妹板に'''[[カラオケ桶板]]'''、派生板に'''[[あかり板]]'''がある。 |
| <br/>
| |
| <br/>
| |
| <br/>
| |
| <br/>'''あんなかわいい顔して立派なものつけてるとかぐう興奮する'''
| |
| <br/>
| |
| <br/>神定期
| |
| <br/>神定期
| |
| <br/>絶やすな
| |
| <br/>神定期
| |
| <br/>立てたり落としたりしろ
| |
| <br/>神定期
| |
| <br/>たておとし
| |
| <br/>つまんね
| |
| <br/>神定期
| |
| <br/>神定期
| |
| <br/>[http://i.imgur.com/sp4xUKE.jpg] [http://i.imgur.com/dXZ9Ggz.jpg][http://i.imgur.com/JwlkIz8.jpg]
| |
| <pre style="font-family:IPAMonaPGothic,'IPA モナー Pゴシック',Monapo,Mona,'MS PGothic','MS Pゴシック',sans-serif;font-size:12px;line-height:12px;">
| |
| xグ
| |
| //
| |
| _,!{_,.. -- 、
| |
| ,..- ´ ̄-‐ ` ´ -‐-..、 `ヽ、
| |
| __ / / `ヽ ` <二゙ヽ、
| |
| r ´i:::/:/ ヽ=<j: i
| |
| !ヽ,y::/ V::ノ
| |
| ヽ::/ / _,.. - ―‐-i、 ヾ.ヘ、
| |
| ,ィ´ .j / / ト、::.. ::. |i:: :::`ヽ ヽ !::. ヾヽ
| |
| /:. .:::! | i / i ハ :i ヽ.:::::.. |!:./ i:: /ヽ: ii. i i::::,-゙
| |
| ヽ!::| !i i: i !i i _|_t-ミ\::::::::;j|/ x,レ== ミリ:: :. | i´
| |
| `! !ハ| ト| ,レ゙,ィ ァx゙ `ヽj" f_, ,ikx ヽi :: リ i
| |
| ! : !:i i| fi:タiイ::i i|ィオ::j ノ| j: :: j
| |
| ! : :.ト、`弋:::゙:ノ `‐-‐゙ ,リ::: !: j
| |
| ト、:. :iヾ //// ' //// ij:: j:レi
| |
| !:ヽト、.:!ヽ r --―ァ /:: /::::i´
| |
| i::i:ヽ:ヽヽ:::ヽ、 j`i - ´ ,/::::j/::ルリ
| |
| `゙ ヽ!∨V`i:::::`::/ /._ ,ィクィ:::´リ|/|ノ∨
| |
| ___|/V/ / /, ' |\_
| |
| ノ::!i:::::::::::::::/ !,// _/:::::::: ̄`ーt-、
| |
| / ヾヽ:::::/ く,つ´ /::::::::::::::::::/ / ヽ
| |
| / i ヾ,>´ -!..-/:::::::::::::::// ヽ
| |
| /´,i | / ,kッ゙:::/::::::::::::// / ト、
| |
| </pre>
| |
| <br/>'''愚かな穴実民よ'''
| |
| <br/>穴実の神を崇めよ
| |
| <br/>穴実の神を畏れよ
| |
| <br/>穴実の神を奉れよ
| |
| <br/>
| |
| <br/>
| |
| <br/>
| |
| /**********************************************************************
| |
| * ISO MPEG Audio Subgroup Software Simulation Group (1996)
| |
| * ISO 13818-3 MPEG-2 Audio Encoder - Lower Sampling Frequency Extension
| |
| *
| |
| * $Id: encode.c,v 1.1 1996/02/14 04:04:23 rowlands Exp $
| |
| *
| |
| * $Log: encode.c,v $
| |
| * Revision 1.1 1996/02/14 04:04:23 rowlands
| |
| * Initial revision
| |
| *
| |
| * Received from Mike Coleman
| |
| **********************************************************************/
| |
| /**********************************************************************
| |
| * date programmers comment *
| |
| * 3/01/91 Douglas Wong, start of version 1.1 records *
| |
| * Davis Pan *
| |
| * 3/06/91 Douglas Wong rename: setup.h to endef.h *
| |
| * efilter to enfilter *
| |
| * ewindow to enwindow *
| |
| * integrated "quantizer", "scalefactor",*
| |
| * and "transmission" files *
| |
| * update routine "window_subband" *
| |
| * 3/31/91 Bill Aspromonte replaced read_filter by *
| |
| * create_an_filter *
| |
| * 5/10/91 W. Joseph Carter Ported to Macintosh and Unix. *
| |
| * Incorporated Jean-Georges Fritsch's *
| |
| * "bitstream.c" package. *
| |
| * Incorporated Bill Aspromonte's *
| |
| * filterbank coefficient matrix *
| |
| * calculation routines and added *
| |
| * roundoff to coincide with specs. *
| |
| * Modified to strictly adhere to *
| |
| * encoded bitstream specs, including *
| |
| * "Berlin changes". *
| |
| * Modified PCM sound file handling to *
| |
| * process all incoming samples and fill *
| |
| * out last encoded frame with zeros *
| |
| * (silence) if needed. *
| |
| * Located and fixed numerous software *
| |
| * bugs and table data errors. *
| |
| * 19jun91 dpwe (Aware) moved "alloc_*" reader to common.c *
| |
| * Globals sblimit, alloc replaced by new*
| |
| * struct 'frame_params' passed as arg. *
| |
| * Added JOINT STEREO coding, layers I,II*
| |
| * Affects: *_bit_allocation, *
| |
| * subband_quantization, encode_bit_alloc*
| |
| * sample_encoding *
| |
| * 6/10/91 Earle Jennings modified II_subband_quantization to *
| |
| * resolve type cast problem for MS_DOS *
| |
| * 6/11/91 Earle Jennings modified to avoid overflow on MS_DOS *
| |
| * in routine filter_subband *
| |
| * 7/10/91 Earle Jennings port to MsDos from MacIntosh version *
| |
| * 8/ 8/91 Jens Spille Change for MS-C6.00 *
| |
| *10/ 1/91 S.I. Sudharsanan, Ported to IBM AIX platform. *
| |
| * Don H. Lee, *
| |
| * Peter W. Farrett *
| |
| *10/ 3/91 Don H. Lee implemented CRC-16 error protection *
| |
| * newly introduced function encode_CRC *
| |
| *11/ 8/91 Kathy Wang Documentation of code *
| |
| * All variablenames are referred to *
| |
| * with surrounding pound (#) signs *
| |
| * 2/11/92 W. Joseph Carter Ported new code to Macintosh. Most *
| |
| * important fixes involved changing *
| |
| * 16-bit ints to long or unsigned in *
| |
| * bit alloc routines for quant of 65535 *
| |
| * and passing proper function args. *
| |
| * Removed "Other Joint Stereo" option *
| |
| * and made bitrate be total channel *
| |
| * bitrate, irrespective of the mode. *
| |
| * Fixed many small bugs & reorganized. *
| |
| * 6/16/92 Shaun Astarabadi Changed I_scale_factor_calc() and *
| |
| * II_scale_factor_calc() to use scale *
| |
| * factor 0 thru 62 only and not to *
| |
| * encode index 63 into the bit stream. *
| |
| * 7/27/92 Mike Li (re-)Port to MS-DOS *
| |
| * 9/22/92 jddevine@aware.com Fixed _scale_factor_calc() defs *
| |
| * 3/31/93 Giogio Dimino changed II_a_bit_allocation() from: *
| |
| * if( ad > ...) to if(ad >= ...) *
| |
| * 8/05/93 TEST changed I_a_bit_allocation() from: *
| |
| * if( ad > ...) to if(ad >= ...) *
| |
| * 8/02/95 mc@fivebats.com Changed audio file reading code to *
| |
| * read samples big-endian *
| |
| *10/15/95 mc@fivebats.com Modified get_audio() for layer3-LSF *
| |
| **********************************************************************/
| |
|
| |
| #include "common.h"
| |
| #include "encoder.h"
| |
|
| |
|
| #ifdef MS_DOS
| | ほぼ全ての規制が存在せず、[[BBQ]]規制、[[Ruthless Angel]]、[[おπ送り]]、[[マルチポストですか?]]等の影響を受けない。また、容量落ちがなく、過去ログが存在しない。 |
| extern unsigned _stklen = 16384;
| |
| #endif
| |
|
| |
|
| | [[ゆるゆり]]に関するスレが多く立てられる。また、板新設日に[[なんJ]]民が多く来たことで、現在でもなんJとの関わりが深い。 |
| | <div style="clear: right; "></div> |
|
| |
|
| /*=======================================================================\
| | == LR == |
| | |
| | <cite>http://agree.2ch.net/liveanarchy/index.html</cite> |
| | This segment contains all the core routines of the encoder, |
| |
| | except for the psychoacoustic models. |
| |
| | |
| |
| | The user can select either one of the two psychoacoustic |
| |
| | models. Model I is a simple tonal and noise masking threshold |
| |
| | generator, and Model II is a more sophisticated cochlear masking |
| |
| | threshold generator. Model I is recommended for lower complexity |
| |
| | applications whereas Model II gives better subjective quality at low |
| |
| | bit rates. |
| |
| | |
| |
| | Layers I and II of mono, stereo, and joint stereo modes are supported.|
| |
| | Routines associated with a given layer are prefixed by "I_" for layer |
| |
| | 1 and "II_" for layer 2. |
| |
| \=======================================================================*/
| |
|
| |
| /************************************************************************ | |
| *
| |
| * read_samples()
| |
| *
| |
| * PURPOSE: reads the PCM samples from a file to the buffer
| |
| *
| |
| * SEMANTICS:
| |
| * Reads #samples_read# number of shorts from #musicin# filepointer
| |
| * into #sample_buffer[]#. Returns the number of samples read.
| |
| *
| |
| ************************************************************************/
| |
|
| |
|
| unsigned long read_samples(musicin, sample_buffer, num_samples, frame_size)
| | ・違法じゃない限りなんでも話そう。 |
| FILE *musicin;
| | ・連投は1秒毎に可、TATESUGI制限は1。 |
| short sample_buffer[2304];
| | ・海外の回線や規制されている回線からも書き込めます。 |
| unsigned long num_samples, frame_size;
| | ・スレッドは最大10個まで。書き込みが3分なくてもdat落ちします。 |
| {
| | ・最大256行まで改行できます。改行制限のゆるさは2ch全板の中でもトップクラス。 |
| unsigned long samples_read;
| | ・名前欄とメール欄は空白で固定されます。固定ハンドルネームやsageなどは使えません。<font color="blue">BEも使用不可</font>。 |
| static unsigned long samples_to_read;
| | ・家に帰ったら手うがをしよう。 |
| static char init = TRUE;
| | ・なんと過去ログは作りません<font color="red">(←ここ重要)</font> |
| | |
| if (init) {
| |
| samples_to_read = num_samples;
| |
| init = FALSE;
| |
| }
| |
| if (samples_to_read >= frame_size)
| |
| samples_read = frame_size;
| |
| else
| |
| samples_read = samples_to_read;
| |
| if ((samples_read =
| |
| fread(sample_buffer, sizeof(short), (int)samples_read, musicin)) == 0)
| |
| printf("Hit end of audio data\n");
| |
| /*
| |
| Samples are big-endian. If this is a little-endian machine
| |
| we must swap
| |
| */
| |
| if ( NativeByteOrder == order_unknown )
| |
| {
| |
| NativeByteOrder = DetermineByteOrder();
| |
| if ( NativeByteOrder == order_unknown )
| |
| {
| |
| fprintf( stderr, "byte order not determined\n" );
| |
| exit( 1 );
| |
| }
| |
| }
| |
| if ( NativeByteOrder == order_littleEndian )
| |
| SwapBytesInWords( sample_buffer, samples_read );
| |
| | |
| samples_to_read -= samples_read;
| |
| if (samples_read < frame_size && samples_read > 0) {
| |
| printf("Insufficient PCM input for one frame - fillout with zeros\n");
| |
| for (; samples_read < frame_size; sample_buffer[samples_read++] = 0);
| |
| samples_to_read = 0;
| |
| }
| |
| return(samples_read);
| |
| }
| |
| | |
| /************************************************************************ | |
| *
| |
| * get_audio()
| |
| *
| |
| * PURPOSE: reads a frame of audio data from a file to the buffer,
| |
| * aligns the data for future processing, and separates the
| |
| * left and right channels
| |
| *
| |
| *
| |
| ************************************************************************/
| |
| | |
| unsigned long get_audio( musicin, buffer, num_samples, stereo, info )
| |
| FILE *musicin;
| |
| short FAR buffer[2][1152];
| |
| unsigned long num_samples;
| |
| int stereo;
| |
| layer *info;
| |
| {
| |
| int j;
| |
| short insamp[2304];
| |
| unsigned long samples_read;
| |
| int lay;
| |
| lay = info->lay;
| |
| | |
| if ( (lay == 3) && (info->version == 0) )
| |
| {
| |
| if ( stereo == 2 )
| |
| {
| |
| samples_read = read_samples( musicin, insamp, num_samples,
| |
| (unsigned long) 1152 );
| |
| for ( j = 0; j < 576; j++ )
| |
| {
| |
| buffer[0][j] = insamp[2 * j];
| |
| buffer[1][j] = insamp[2 * j + 1];
| |
| }
| |
| }
| |
| else
| |
| {
| |
| samples_read = read_samples( musicin, insamp, num_samples,
| |
| (unsigned long) 576 );
| |
| for ( j = 0; j < 576; j++ )
| |
| {
| |
| buffer[0][j] = insamp[j];
| |
| buffer[1][j] = 0;
| |
| }
| |
| }
| |
| }
| |
| else
| |
| {
| |
| if (lay == 1){
| |
| if(stereo == 2){ /* layer 1, stereo */
| |
| samples_read = read_samples(musicin, insamp, num_samples,
| |
| (unsigned long) 768);
| |
| for(j=0;j<448;j++) {
| |
| if(j<64) {
| |
| buffer[0][j] = buffer[0][j+384];
| |
| buffer[1][j] = buffer[1][j+384];
| |
| }
| |
| else {
| |
| buffer[0][j] = insamp[2*j-128];
| |
| buffer[1][j] = insamp[2*j-127];
| |
| }
| |
| }
| |
| }
| |
| else { /* layer 1, mono */
| |
| samples_read = read_samples(musicin, insamp, num_samples,
| |
| (unsigned long) 384);
| |
| for(j=0;j<448;j++){
| |
| if(j<64) {
| |
| buffer[0][j] = buffer[0][j+384];
| |
| buffer[1][j] = 0;
| |
| }
| |
| else {
| |
| buffer[0][j] = insamp[j-64];
| |
| buffer[1][j] = 0;
| |
| }
| |
| }
| |
| }
| |
| }
| |
| else {
| |
| if(stereo == 2){ /* layer 2 (or 3), stereo */
| |
| samples_read = read_samples(musicin, insamp, num_samples,
| |
| (unsigned long) 2304);
| |
| for(j=0;j<1152;j++) {
| |
| buffer[0][j] = insamp[2*j];
| |
| buffer[1][j] = insamp[2*j+1];
| |
| }
| |
| }
| |
| else { /* layer 2 (or 3), mono */
| |
| samples_read = read_samples(musicin, insamp, num_samples,
| |
| (unsigned long) 1152);
| |
| for(j=0;j<1152;j++){
| |
| buffer[0][j] = insamp[j];
| |
| buffer[1][j] = 0;
| |
| }
| |
| }
| |
| }
| |
| }
| |
| return(samples_read);
| |
| }
| |
| | | |
| /************************************************************************ | | その他ゆるゆり関連板 |
| *
| | ●[http://www.2ch.net/akari/ あかり板] |
| * read_ana_window()
| | ●[http://www.2ch.net/sugiuraayano/ ニュース速報(杉浦綾乃)] |
| *
| | ●[http://www.2ch.net/gorakubu/ ごらく部板] |
| * PURPOSE: Reads encoder window file "enwindow" into array #ana_win#
| | ●[http://www.2ch.net/matsumotorise/ 松本りせ板] |
| *
| |
| ************************************************************************/
| |
| | | |
| void read_ana_window(ana_win)
| | ゆるゆり関連サイト |
| double FAR ana_win[HAN_SIZE];
| | ●[http://yuruyuri.com/3hai/ ゆるゆり アニメ公式サイト] |
| {
| | ●[http://www.ichijinsha.co.jp/special/yuruyuri/ ゆるゆり 一迅社公式サイト] |
| int i,j[4];
| |
| FILE *fp;
| |
| double f[4];
| |
| char t[150];
| |
| | | |
| if (!(fp = OpenTableFile("enwindow") ) ) {
| | [http://headline.2ch.net/bbyanarchy/ Anarchy Headline] |
| printf("Please check analysis window table 'enwindow'\n");
| |
| exit(1);
| |
| }
| |
| for (i=0;i<512;i+=4) {
| |
| fgets(t, 150, fp);
| |
| sscanf(t,"C[%d] = %lf C[%d] = %lf C[%d] = %lf C[%d] = %lf\n",
| |
| j, f,j+1,f+1,j+2,f+2,j+3,f+3);
| |
| if (i==j[0]) {
| |
| ana_win[i] = f[0];
| |
| ana_win[i+1] = f[1];
| |
| ana_win[i+2] = f[2];
| |
| ana_win[i+3] = f[3];
| |
| }
| |
| else {
| |
| printf("Check index in analysis window table\n");
| |
| exit(1);
| |
| }
| |
| fgets(t,150,fp);
| |
| }
| |
| fclose(fp);
| |
| }
| |
|
| |
|
| /************************************************************************
| | == 歴史 == |
| *
| | (直接関係ないものは''斜字''、特に重要なものは'''太字'''とする) |
| * window_subband()
| | * 2014年 |
| * | | ** 7月2日 - '''Anarchy実況板新設、リアルタイム開示騒動''' |
| * PURPOSE: Overlapping window on PCM samples | | ** 7月3日 - '''最古の赤座あかりスレが立つ''' |
| * | | ** 7月6日 - '''バナーが赤座あかりに変更''' |
| * SEMANTICS: | | ** 7月7日 - 最古の集会所スレが立つ |
| * 32 16-bit pcm samples are scaled to fractional 2's complement and | | ** 7月8日 - 最古のチンバキスレ、全球団共有実況スレが立つ |
| * concatenated to the end of the window buffer #x#. The updated window | | ** 7月9日 - 最古の承スレが立つ |
| * buffer #x# is then windowed by the analysis window #c# to produce the | | ** 7月10日 - '''原初のクソキモができる''' |
| * windowed sample #z# | | ** 7月15日 - ミッドナイトくずもちフィーバーの出現、IP名無しで荒れる、嫌コテ紛争へ |
| * | | ** 7月16日 - '''名前欄のメール欄が空白で固定、固定ハンドルは使えなくなる''' |
| ************************************************************************/ | | ** 7月21日 - ドミノゲームの流行と空白総意の暴走により、'''バナーがドミノに変更''' |
|
| | ** 7月24日 - ''ゆる速が作られる'' |
| void window_subband(buffer, z, k)
| | ** 7月30日 - ピクセンの定着 |
| short FAR **buffer;
| | ** 8月?日 - 三行実況が植民地になる、クソキモの語尾の『ゾ』が確立 |
| double FAR z[HAN_SIZE];
| | ** 8月10日 - クソキモ人狼の第一話(クソキモ語尾『ゾ』がみられる) |
| int k;
| | ** 8月28日 - '''[[Mango Mangue]]により民間スレストの導入、穴実戦国時代へ''' |
| {
| | ** 9月6日 - 民間スレストが有料になる、名無しが「アナーキーさん」から「滑ってるぞ」になり最終的に「ライブアナーキーさん」になる |
| typedef double FAR XX[2][HAN_SIZE];
| | ** 9月7日 - 穴実のアイドルグループ結成(モミロブなど) |
| static XX FAR *x;
| | ** 9月9日 - 名無しが「ライブマンゴーさん」、「ラブライブマンゴーさん」、「アナーキー・スカイウォーカーさん」、「\」と数回変更され最終的に「ライブ・アナーキーさんになる」 |
| int i, j;
| | ** 9月15日 - ガバガバ特定事件(寝技勃起) |
| static off[2] = {0,0};
| | ** 9月25日 - 落ちない手ゴツ事件 |
| static char init = 0;
| | ** 9月27~30日 - 第一回きうり祭り |
| static double FAR *c;
| | ** 10月?日 - めう(ひなビタ)スレが立ち始める |
| if (!init) {
| | ** 10月25日 - ''Mango Mangueの不祥事'' |
| c = (double FAR *) mem_alloc(sizeof(double) * HAN_SIZE, "window");
| | ** 10月26日 - '''穴実民を顧みずに穴実を実験場にする様子をみかね[[Code Monkey]]によりMango Mangueが穴実からMANGO板に追放される''' |
| read_ana_window(c);
| | ** 11月29日 - ''映画『ゆるゆりなちゅやちゅみ』上映''、バナーがあかり(冬ver)に変更、'''[[あかり板]]の新設''' |
| x = (XX FAR *) mem_alloc(sizeof(XX),"x");
| | ** 12月23日 - バナーがひまさくバナーに変更 |
| for (i=0;i<2;i++)
| | ** 12月25日 - 深夜に赤座あかり愛すスレの乱立 |
| for (j=0;j<HAN_SIZE;j++)
| |
| (*x)[i][j] = 0;
| |
| init = 1;
| |
| }
| |
|
| |
|
| /* replace 32 oldest samples with 32 new samples */
| | * 2015年 |
| for (i=0;i<32;i++) (*x)[k][31-i+off[k]] = (double) *(*buffer)++/SCALE;
| | ** 1月?日 - ''2ch各板でサーバーダウンが続く'' |
| /* shift samples into proper window positions */
| | ** 1月8日 - '''バナーがクソキモバナーになる''' |
| for (i=0;i<HAN_SIZE;i++) z[i] = (*x)[k][(i+off[k])&HAN_SIZE-1] * c[i];
| | ** 1月16日 - [[ホット・ホイールズ]]によち少しの間だけ名無しが「歳納京子・ナンバー・ワン・ファン」になる |
| off[k] += 480; /*offset is modulo (HAN_SIZE-1)*/
| | ** 1月17日 - 穴実でOekakiの導入 |
| off[k] &= HAN_SIZE-1;
| | ** 2月3日 - Code Monkeyがゆるゆり一期二期を見終わる |
| | ** 3月9日 - 牢獄が撤廃、デュラチャに乗り込むがそこそこ歓迎される |
| | ** 3月13日 - ''過去ログが完全廃止(ログ速のクロールがsc経由になるがscに穴実がないので)'' |
| | ** 4月?日 - つべ実の始まり |
| | ** 5月24日 - ジプシースレ(板転々スレ)住民により荒れる |
| | ** 6月19日 - 名無しが「杉浦綾乃愛す」になる |
| | ** 7月2日 - '''板設立一周年。'''この日に限り、デフォルト名無しがランダムで変わる、スレが強制的にDAT落ちする、一定の確率で書き込み者の[[IPアドレス]]が公開される、などの仕掛けが施される |
| | ** 7月22日 - wiki編集戦争開始 |
| | ** 7月?日 - 名無しが「ライブ・アナーキーさん」になる、骸骨(Skull Cat)がBeをつけ始めコテ化する |
| | ** 8月29日 - ''美月がピンJに移籍 そのうち戻ってくる'' |
| | ** 9月1日 - wiki編集戦争苛烈化 |
| | ** 9月15日 - Mango shine初版? 毎月15日ごとに作られる |
| | ** 9月27日 - 第二回きうり祭り |
| | ** 10月5日 - '''''『ゆるゆりさん☆ハイ』放送開始''''' |
| | ** 10月17日 - ゲーム漁りの中バトロワが流行りだす(東方軍時代) |
| | ** 10月20日 - バトロワで穴実軍(予備軍)として活動、''スレストコマンド発覚事件'' |
| | ** 11月1日 - バナーがゆるゆり集合絵バナーに変更、''バトロワで穴実軍ができる''、全板中三位になるほどの異常な連投 |
| | ** 11月2日 - ''ピンJ破壊''、''運用情報で連投''、穴実がアグ実になる |
| | ** 11月2~6日 - アグ豚が暴れまわる |
| | ** 11月6日 - アグ実、穴実に戻る |
| | ** 11月10日 - '''[[松本りせ板]]と[[ごらく部板]]の新設'''、『自演、極まる。連投、極まる。』 |
| | ** 11月27日 - '''[[綾速]]の新設''' |
|
| |
|
| }
| | * 2016年 |
|
| | ** 1月6日 - 穴実キメラが作られる |
| /************************************************************************
| | ** 1月7日 - ライブちゃんが作られゴリ押しされる |
| * | | ** 1月12日 - 穴実で!slip:vvvvコマンドを一時的に試され他板へ輸出 |
| * create_ana_filter() | | ** 1月14日 - 穴実でライブちゃん本スレのホイミンのゴリ押しがバレる |
| * | | ** 1月15日 - Mango Shine2月号 Mango Mangueをいろいろ追特定 |
| * PURPOSE: Calculates the analysis filter bank coefficients | | ** 1月16日 - ''バトロワで赤座あかり追加'' |
| * | | ** 1月20日 - '''[[船見結衣板]]の新設'''(ローカルルールに船見結衣板の記述があるが板名は『hayabusa8ゴミ箱』) |
| * SEMANTICS: | | ** 1月21日 - 船見結衣板が閉鎖される |
| * Calculates the analysis filterbank coefficients and rounds to the | | ** 2月8日 - ''ミラ実が開設するがすぐ閉鎖し終わる'' |
| * 9th decimal place accuracy of the filterbank tables in the ISO | | ** 2月27日 - 手ゴツの再出現、''バトロワ穴実軍がひっそりと降格'' |
| * document. The coefficients are stored in #filter# | | ** 2月28日 - 超ふわふわ子が作られ一瞬で穴カスに捨てられる |
| | | ** 3月?日 - AAやごり押し糞定期の乱造、ツイカスの流行 |
| ************************************************************************/ | | ** 3月14日 - '''連投により2ch全板で書き込み数一位''' |
|
| | ** 3月18日 - バナーがあなしろバナーに変更される |
| void create_ana_filter(filter)
| | ** 3月20日 - バナーがツイカスバナーに変更される |
| double FAR filter[SBLIMIT][64];
| | ** 3月25日 - 船見結衣板が復活する |
| {
| | ** 3月26日 - バナーがアナちゃんバナーに変更される、名無しが「大室櫻子のおしっこ飲みたい」になる、荒野カテゴリ(穴実関連板)の新設が決まる |
| register int i,k;
| | ** 3月27日 - '''Code Monkeyがなもりにバナー制作の依頼を出し百合姫編集長のりっちぃに反応される'''、''あいすんさんの誕生日を祝う'' |
|
| | ** 3月29日 - maguro鯖のマスコットが募集される |
| for (i=0; i<32; i++)
| | ** 3月31日 - '''バナーが結京バナーに変更される''' |
| for (k=0; k<64; k++) {
| | ** 4月1日 - maguro鯖のマスコットが決まる、''四字実況板が新設''、エイプリルフールで2chTOPと穴実が北朝鮮化する |
| if ((filter[i][k] = 1e9*cos((double)((2*i+1)*(16-k)*PI64))) >= 0)
| | ** 4月3日 - ''一時的に各板で書き込みができなくなる''、maguro鯖から新鯖名の投票開始、名無しが「【*^▲^*】」になる |
| modf(filter[i][k]+0.5, &filter[i][k]);
| | ** 4月7日 - maguro鯖からagree鯖へ移転 |
| else
| | ** 7月2日 - '''板設立二周年''' |
| modf(filter[i][k]-0.5, &filter[i][k]);
| | ** 7月9日 - スロット機能が追加される |
| filter[i][k] *= 1e-9;
| | ** 9月6日 - 骸骨がコテを引退する |
| }
| | ** 9月17日 - ''Code Monkeyによって8chanにめう板が作られる'' |
| }
| | ** 10月21日 - '''お気持ち表明(唐澤貴洋のNHK顔出し出演)で盛り上がる''' |
| | ** 10月22日 - '''船見結衣板の板名と名無しが変更され正式に船見結衣板になる''' |
| | ** 10月23日 - ツイカスのカーシンが生息地を特定され引退に追い込まれる<ref>[http://megalodon.jp/2016-1023-2244-30/agree.2ch.net/test/read.cgi/liveanarchy/1477229220/ 魚拓]</ref> |
| | ** 10月26日 - '''船見結衣板が荒野カテゴリに登録される''' |
| | ** 10月29日 - Code Monkeyが船見板のバナーを変えゆるゆり・唐澤板が要るかを問い尊師のNHK出演を祝う、AbemaTVでゆるゆり二期前半が放送され実況スレが立つ |
| | ** 10月30日 - 午前2時頃から約40分間agree鯖の板に書き込みできなくなる、AbemaTVでゆるゆり二期後半が放送され実況スレが立つ |
| | ** 11月28日 - ''[[くれれっ娘板]]が連投される'' |
| | ** 11月28日 - 名無しが「くれれっ娘の赤座あかり」、「where is Mango?」、「I have a MangoPen」、「【〓v〓】」、「(´・ω・`)へへへ」、「I am a MangoPen」、「くれれマンゴー」、「名無しのカーシンさん」、「I like Mango」の順で変更され最終的に「大室花子だし」になる |
| | ** 11月29日 - ''[[松本りせ板]]が連投される'' |
| | ** 12月3日 - ゆるアンの暴走により<ref>[http://i.imgur.com/Pqmlqho.jpg スクショ]</ref>名無しが「【*^▲^*】」になる |
| | ** 12月6日 - Code Monkeyが行ったTwitterでの名無し投票で「大室櫻子のおしっこ飲みたい」が一位になり<ref>[https://twitter.com/CodeMonkeyZ/status/805423757015687168 ツイート]</ref>23:48に変更される |
| | ** 12月7日 - 名無しが「A-O-B-AB」になる。どうやらCode MonkeyがTwitterで行った意味不明な血液型の投票結果<ref>[https://twitter.com/CodeMonkeyZ/status/806140288561385472 ツイート]</ref>が反映されたようで、多くの穴実民から批判を受ける |
| | ** 12月8日 - 名無しが「【*^▲^*】」に変更される |
| | ** 12月27日 - 冬休みかが誕生 |
|
| |
|
| /************************************************************************
| | * 2017年 |
| * | | ** 1月9日 - ''なもりの個人的なサイン入りのゆるゆりコミックスをブックオフで購入したVIPPERが現れる、なもりがファン数人とUSJに行っていた事が発覚'' |
| * filter_subband() | | ** 2月9日 - '''バナーが一方通行バナーに変更される''' |
| * | | ** 3月26日 - [[Code Monkey]]が[http://agree.2ch.net/test/read.cgi/liveanarchy/1490519995/ 「稀勢の里 Won!」]というスレを立て、名無しを「稀勢の里」に変更する。その後「無政府3」に再度変更される |
| * PURPOSE: Calculates the analysis filter bank coefficients | | ** 3月27日 - 名無しが「【*^▲^*】」に戻る |
| * | | ** 4月7日 - '''バナーがアクアバナーに変更される''' |
| * SEMANTICS: | | ** 5月6日 - 第一回穴実オフ会が開かれ幹事含め二人が参加する |
| * The windowed samples #z# is filtered by the digital filter matrix #m#
| | ** 6月21日 - Mangoが突如穴実に降臨し、日付が変わって22日、リクエストに応える形で名無しを「穴実の良心」に変更する<ref>[https://archive.is/CN3Cf 魚拓]</ref> |
| * to produce the subband samples #s#. This done by first selectively
| | ** 7月5日 - 名無しが「Anarchist」に変更され<ref>[http://telegra.ph/ref-07-05 レス]</ref>、その'''数時間にはバナーも変更される'''(通称・クソキモうんこバナー、クソキモバナー2、馬鹿スペルバナー、アナーシー、うんち、うんこ、m9)<ref>[http://archive.is/GbB9T 魚拓]</ref> |
| * picking out values from the windowed samples, and then multiplying
| |
| * them by the filter matrix, producing 32 subband samples.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void filter_subband(z,s)
| |
| double FAR z[HAN_SIZE], s[SBLIMIT];
| |
| {
| |
| double y[64];
| |
| int i,j;
| |
| static char init = 0;
| |
| typedef double MM[SBLIMIT][64];
| |
| static MM FAR *m;
| |
| #ifdef MS_DOS
| |
| long SIZE_OF_MM;
| |
| SIZE_OF_MM = SBLIMIT*64;
| |
| SIZE_OF_MM *= 8;
| |
| if (!init) {
| |
| m = (MM FAR *) mem_alloc(SIZE_OF_MM, "filter");
| |
| create_ana_filter(*m);
| |
| init = 1;
| |
| }
| |
| #else
| |
| if (!init) {
| |
| m = (MM FAR *) mem_alloc(sizeof(MM), "filter");
| |
| create_ana_filter(*m);
| |
| init = 1;
| |
| }
| |
| #endif
| |
| for (i=0;i<64;i++) for (j=0, y[i] = 0;j<8;j++) y[i] += z[i+64*j];
| |
| for (i=0;i<SBLIMIT;i++)
| |
| for (j=0, s[i]= 0;j<64;j++) s[i] += (*m)[i][j] * y[j];
| |
| }
| |
|
| |
|
| /************************************************************************
| | * 2018年 |
| * encode_info()
| | ** ?月?日 - 「連投ですや」や「26規制」といった書き込み規制が導入され、とても1秒毎にレス投稿できる状況ではなくなる。 |
| * | |
| * PURPOSE: Puts the syncword and header information on the output | |
| * bitstream.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void encode_info(fr_ps,bs)
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| layer *info = fr_ps->header;
| |
|
| |
| putbits(bs,0xfff,12); /* syncword 12 bits */
| |
| put1bit(bs,info->version); /* ID 1 bit */
| |
| putbits(bs,4-info->lay,2); /* layer 2 bits */
| |
| put1bit(bs,!info->error_protection); /* bit set => no err prot */
| |
| putbits(bs,info->bitrate_index,4);
| |
| putbits(bs,info->sampling_frequency,2);
| |
| put1bit(bs,info->padding);
| |
| put1bit(bs,info->extension); /* private_bit */
| |
| putbits(bs,info->mode,2);
| |
| putbits(bs,info->mode_ext,2);
| |
| put1bit(bs,info->copyright);
| |
| put1bit(bs,info->original);
| |
| putbits(bs,info->emphasis,2);
| |
| }
| |
|
| |
| /************************************************************************
| |
| *
| |
| * mod()
| |
| *
| |
| * PURPOSE: Returns the absolute value of its argument
| |
| *
| |
| ************************************************************************/
| |
|
| |
| double mod(a)
| |
| double a;
| |
| {
| |
| return (a > 0) ? a : -a;
| |
| }
| |
|
| |
| /************************************************************************
| |
| *
| |
| * I_combine_LR (Layer I)
| |
| * II_combine_LR (Layer II)
| |
| *
| |
| * PURPOSE:Combines left and right channels into a mono channel
| |
| *
| |
| * SEMANTICS: The average of left and right subband samples is put into
| |
| * #joint_sample#
| |
| *
| |
| * Layer I and II differ in frame length and # subbands used
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void I_combine_LR(sb_sample, joint_sample)
| |
| double FAR sb_sample[2][3][SCALE_BLOCK][SBLIMIT];
| |
| double FAR joint_sample[3][SCALE_BLOCK][SBLIMIT];
| |
| { /* make a filtered mono for joint stereo */
| |
| int sb, smp;
| |
|
| |
| for(sb = 0; sb<SBLIMIT; ++sb)
| |
| for(smp = 0; smp<SCALE_BLOCK; ++smp)
| |
| joint_sample[0][smp][sb] = .5 *
| |
| (sb_sample[0][0][smp][sb] + sb_sample[1][0][smp][sb]);
| |
| }
| |
|
| |
| void II_combine_LR(sb_sample, joint_sample, sblimit)
| |
| double FAR sb_sample[2][3][SCALE_BLOCK][SBLIMIT];
| |
| double FAR joint_sample[3][SCALE_BLOCK][SBLIMIT];
| |
| int sblimit;
| |
| { /* make a filtered mono for joint stereo */
| |
| int sb, smp, sufr;
| |
|
| |
| for(sb = 0; sb<sblimit; ++sb)
| |
| for(smp = 0; smp<SCALE_BLOCK; ++smp)
| |
| for(sufr = 0; sufr<3; ++sufr)
| |
| joint_sample[sufr][smp][sb] = .5 * (sb_sample[0][sufr][smp][sb]
| |
| + sb_sample[1][sufr][smp][sb]);
| |
| }
| |
|
| |
| /************************************************************************
| |
| *
| |
| * I_scale_factor_calc (Layer I)
| |
| * II_scale_factor_calc (Layer II)
| |
| *
| |
| * PURPOSE:For each subband, calculate the scale factor for each set
| |
| * of the 12 subband samples
| |
| *
| |
| * SEMANTICS: Pick the scalefactor #multiple[]# just larger than the
| |
| * absolute value of the peak subband sample of 12 samples,
| |
| * and store the corresponding scalefactor index in #scalar#.
| |
| *
| |
| * Layer II has three sets of 12-subband samples for a given
| |
| * subband.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void I_scale_factor_calc(sb_sample,scalar,stereo)
| |
| double FAR sb_sample[][3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int scalar[][3][SBLIMIT];
| |
| int stereo;
| |
| {
| |
| int i,j, k;
| |
| double s[SBLIMIT];
| |
|
| |
| for (k=0;k<stereo;k++) {
| |
| for (i=0;i<SBLIMIT;i++)
| |
| for (j=1, s[i] = mod(sb_sample[k][0][0][i]);j<SCALE_BLOCK;j++)
| |
| if (mod(sb_sample[k][0][j][i]) > s[i])
| |
| s[i] = mod(sb_sample[k][0][j][i]);
| |
|
| |
| for (i=0;i<SBLIMIT;i++)
| |
| for (j=SCALE_RANGE-2,scalar[k][0][i]=0;j>=0;j--) /* $A 6/16/92 */
| |
| if (s[i] <= multiple[j]) {
| |
| scalar[k][0][i] = j;
| |
| break;
| |
| }
| |
| }
| |
| }
| |
|
| |
|
| /******************************** Layer II ******************************/
| | == バナー == |
|
| | [[ファイル:穴実十八代目.png|thumb|400px|]] |
| void II_scale_factor_calc(sb_sample,scalar,stereo,sblimit)
| | Anarchy実況板のバナーは頻繁に変更されている。板設立当初は黒塗りの尊師バナーだったが、7月6日に漫画『ゆるゆり』の主人公の赤座あかりのバナーに差し替えられた<ref>この頃、穴実にあかりに関するスレがよく建てられていたため、ゆるゆりネタが定着していた。</ref>。しかし、7月21日にドミノのバナーに差し替えられる。と思ったら、今度は11月29日にサンタコスの赤座あかりのバナーに変更された。さらに12月25日には古谷向日葵と大室櫻子のひまさくバナーになった。年が明けて、2015年1月8日にAnarchy実況板オリジナルキャラクターの「クソキモ」のバナーに変更された。その後も何度もバナー変更を繰り返している。 |
| double FAR sb_sample[][3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int scalar[][3][SBLIMIT];
| |
| int stereo,sblimit;
| |
| {
| |
| int i,j, k,t;
| |
| double s[SBLIMIT];
| |
|
| |
| for (k=0;k<stereo;k++) for (t=0;t<3;t++) {
| |
| for (i=0;i<sblimit;i++)
| |
| for (j=1, s[i] = mod(sb_sample[k][t][0][i]);j<SCALE_BLOCK;j++)
| |
| if (mod(sb_sample[k][t][j][i]) > s[i])
| |
| s[i] = mod(sb_sample[k][t][j][i]);
| |
|
| |
| for (i=0;i<sblimit;i++)
| |
| for (j=SCALE_RANGE-2,scalar[k][t][i]=0;j>=0;j--) /* $A 6/16/92 */
| |
| if (s[i] <= multiple[j]) {
| |
| scalar[k][t][i] = j;
| |
| break;
| |
| }
| |
| for (i=sblimit;i<SBLIMIT;i++) scalar[k][t][i] = SCALE_RANGE-1;
| |
| }
| |
| }
| |
|
| |
|
| /************************************************************************
| | ===歴代バナー=== |
| *
| | <gallery widths="300px" perrow="2"> |
| * pick_scale (Layer II)
| | ファイル:穴実初代.jpeg|初代バナー(2014年7月2日~7月6日) |
| *
| | ファイル:穴実二代目.png|二代目バナー(7月6日~7月21日) |
| * PURPOSE:For each subband, puts the smallest scalefactor of the 3
| | ファイル:穴実三代目.png|三代目バナー(7月21日~11月29日) |
| * associated with a frame into #max_sc#. This is used
| | ファイル:穴実四代目.png|四代目バナー(11月21日~12月23日) |
| * used by Psychoacoustic Model I.
| | ファイル:穴実五代目.jpeg|五代目バナー(12月23日~2015年1月8日) |
| * (I would recommend changin max_sc to min_sc)
| | ファイル:穴実六代目.jpg|六代目バナー(2015年1月8日~7月17日) |
| *
| | ファイル:穴実七代目.png|七代目バナー(7月17日~11月1日) |
| ************************************************************************/
| | ファイル:穴実八代目.jpg|八代目バナー(11月1日~11月7日) |
|
| | ファイル:穴実九代目.png|九代目バナー(11月7日~11月10日) |
| void pick_scale(scalar, fr_ps, max_sc)
| | ファイル:穴実十代目.png|十代目バナー(11月10日~2016年3月18日) |
| unsigned int scalar[2][3][SBLIMIT];
| | ファイル:穴実十一代目.jpg|十一代目バナー(2016年3月18日~3月20日) |
| frame_params *fr_ps;
| | ファイル:穴実十二代目.png|十二代目バナー(3月20日~3月26日) |
| double FAR max_sc[2][SBLIMIT];
| | ファイル:穴実十三代目.png|十三代目バナー(3月26日~3月31日) |
| {
| | ファイル:穴実十四代目.png|十四代目バナー(3月31日~4月7日直後?) |
| int i,j,k,max;
| | ファイル:穴実十五代目.png|十五代目バナー(4月7日直後?~2017年2月9日) |
| int stereo = fr_ps->stereo;
| | ファイル:穴実十六代目.png|十六代目バナー(2月9日~4月7日) |
| int sblimit = fr_ps->sblimit;
| | ファイル:穴実十七代目.jpg|十七代目バナー(4月7日~7月5日) |
|
| | ファイル:穴実十八代目.png|十八代目バナー(7月5日〜現在) |
| for (k=0;k<stereo;k++)
| | </gallery> |
| for (i=0;i<sblimit;max_sc[k][i] = multiple[max],i++)
| |
| for (j=1, max = scalar[k][0][i];j<3;j++)
| |
| if (max > scalar[k][j][i]) max = scalar[k][j][i];
| |
| for (i=sblimit;i<SBLIMIT;i++) max_sc[0][i] = max_sc[1][i] = 1E-20;
| |
| }
| |
|
| |
|
| /************************************************************************
| | == 宣伝レス == |
| *
| | ★★★★★Anarchy実況はここが違う!!!★★★★★ |
| * put_scale (Layer I)
| |
| *
| |
| * PURPOSE:Sets #max_sc# to the scalefactor index in #scalar.
| |
| * This is used by Psychoacoustic Model I
| |
| *
| |
| ************************************************************************/
| |
| | | |
| void put_scale(scalar, fr_ps, max_sc)
| | ①ID表示が無い! |
| unsigned int scalar[2][3][SBLIMIT];
| | Anarchy実況(通称:穴実)ではIDが開示されないため、自分のスレを自演で伸ばしたり自演して対立を煽る事が出来るぞ! |
| frame_params *fr_ps;
| | 更にID表示が無いため立ち直りもすぐに出来るぞ! |
| double FAR max_sc[2][SBLIMIT];
| |
| {
| |
| int i,j,k, max;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| | | |
| for (k=0;k<stereo;k++) for (i=0;i<SBLIMIT;i++)
| | ②スレの保持数は10、保持時間は3分! |
| max_sc[k][i] = multiple[scalar[k][0][i]];
| | このお蔭でクソスレはすぐに落ち良スレだけが残り続けるぞ! |
| }
| |
| | | |
| /************************************************************************
| | ③過去ログが無い! |
| *
| | どんなに恥ずかしいことを書いても一切残らないので安心だぞ! |
| * II_transmission_pattern (Layer II only)
| | しかも過去ログが取得できない+すぐに落ちる仕様の為散々悩まされてるアフィカスにまとめられる確率がうんと下がるぞ! |
| *
| |
| * PURPOSE:For a given subband, determines whether to send 1, 2, or
| |
| * all 3 of the scalefactors, and fills in the scalefactor
| |
| * select information accordingly
| |
| *
| |
| * SEMANTICS: The subbands and channels are classified based on how much
| |
| * the scalefactors changes over its three values (corresponding
| |
| * to the 3 sets of 12 samples per subband). The classification
| |
| * will send 1 or 2 scalefactors instead of three if the scalefactors
| |
| * do not change much. The scalefactor select information,
| |
| * #scfsi#, is filled in accordingly.
| |
| *
| |
| ************************************************************************/
| |
| | | |
| void II_transmission_pattern(scalar, scfsi, fr_ps)
| | ④連投が1秒毎に可能! |
| unsigned int scalar[2][3][SBLIMIT];
| | すぐに書き込みたいのに書き込めなくてイライラした事は無いか? |
| unsigned int scfsi[2][SBLIMIT];
| | 穴実ならそんな悩みを抱えなくても済むぞ! |
| frame_params *fr_ps;
| |
| {
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int dscf[2];
| |
| int class[2],i,j,k;
| |
| static int pattern[5][5] = {0x123, 0x122, 0x122, 0x133, 0x123,
| |
| 0x113, 0x111, 0x111, 0x444, 0x113,
| |
| 0x111, 0x111, 0x111, 0x333, 0x113,
| |
| 0x222, 0x222, 0x222, 0x333, 0x123,
| |
| 0x123, 0x122, 0x122, 0x133, 0x123};
| |
| | | |
| for (k=0;k<stereo;k++)
| | ⑤規制がない! |
| for (i=0;i<sblimit;i++) {
| | ここでは規制がなく、書き込み放題! |
| dscf[0] = (scalar[k][0][i]-scalar[k][1][i]);
| | 規制された時だけでもいいから、書き込みまくろう!! |
| dscf[1] = (scalar[k][1][i]-scalar[k][2][i]);
| |
| for (j=0;j<2;j++) {
| |
| if (dscf[j]<=-3) class[j] = 0;
| |
| else if (dscf[j] > -3 && dscf[j] <0) class[j] = 1;
| |
| else if (dscf[j] == 0) class[j] = 2;
| |
| else if (dscf[j] > 0 && dscf[j] < 3) class[j] = 3;
| |
| else class[j] = 4;
| |
| }
| |
| switch (pattern[class[0]][class[1]]) {
| |
| case 0x123 : scfsi[k][i] = 0;
| |
| break;
| |
| case 0x122 : scfsi[k][i] = 3;
| |
| scalar[k][2][i] = scalar[k][1][i];
| |
| break;
| |
| case 0x133 : scfsi[k][i] = 3;
| |
| scalar[k][1][i] = scalar[k][2][i];
| |
| break;
| |
| case 0x113 : scfsi[k][i] = 1;
| |
| scalar[k][1][i] = scalar[k][0][i];
| |
| break;
| |
| case 0x111 : scfsi[k][i] = 2;
| |
| scalar[k][1][i] = scalar[k][2][i] = scalar[k][0][i];
| |
| break;
| |
| case 0x222 : scfsi[k][i] = 2;
| |
| scalar[k][0][i] = scalar[k][2][i] = scalar[k][1][i];
| |
| break;
| |
| case 0x333 : scfsi[k][i] = 2;
| |
| scalar[k][0][i] = scalar[k][1][i] = scalar[k][2][i];
| |
| break;
| |
| case 0x444 : scfsi[k][i] = 2;
| |
| if (scalar[k][0][i] > scalar[k][2][i])
| |
| scalar[k][0][i] = scalar[k][2][i];
| |
| scalar[k][1][i] = scalar[k][2][i] = scalar[k][0][i];
| |
| }
| |
| }
| |
| }
| |
| | | |
| /************************************************************************
| | さあ! 君もいますぐこの新時代板、Anarchy実況に飛び込もう! |
| *
| | http://agree.2ch.net/liveanarchy/ |
| * I_encode_scale (Layer I)
| |
| * II_encode_scale (Layer II)
| |
| *
| |
| * PURPOSE:The encoded scalar factor information is arranged and
| |
| * queued into the output fifo to be transmitted.
| |
| *
| |
| * For Layer II, the three scale factors associated with
| |
| * a given subband and channel are transmitted in accordance
| |
| * with the scfsi, which is transmitted first.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void I_encode_scale(scalar, bit_alloc, fr_ps, bs)
| |
| unsigned int scalar[2][3][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int i,j;
| |
|
| |
| for (i=0;i<SBLIMIT;i++) for (j=0;j<stereo;j++)
| |
| if (bit_alloc[j][i]) putbits(bs,scalar[j][0][i],6);
| |
| }
| |
|
| |
| /***************************** Layer II ********************************/
| |
|
| |
| void II_encode_scale(bit_alloc, scfsi, scalar, fr_ps, bs)
| |
| unsigned int bit_alloc[2][SBLIMIT], scfsi[2][SBLIMIT];
| |
| unsigned int scalar[2][3][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| int i,j,k;
| |
|
| |
| for (i=0;i<sblimit;i++) for (k=0;k<stereo;k++)
| |
| if (bit_alloc[k][i]) putbits(bs,scfsi[k][i],2);
| |
|
| |
| for (i=0;i<sblimit;i++) for (k=0;k<stereo;k++)
| |
| if (bit_alloc[k][i]) /* above jsbound, bit_alloc[0][i] == ba[1][i] */
| |
| switch (scfsi[k][i]) {
| |
| case 0: for (j=0;j<3;j++)
| |
| putbits(bs,scalar[k][j][i],6);
| |
| break;
| |
| case 1:
| |
| case 3: putbits(bs,scalar[k][0][i],6);
| |
| putbits(bs,scalar[k][2][i],6);
| |
| break;
| |
| case 2: putbits(bs,scalar[k][0][i],6);
| |
| }
| |
| }
| |
|
| |
| /*=======================================================================\ | |
| | |
| |
| | The following routines are done after the masking threshold |
| |
| | has been calculated by the fft analysis routines in the Psychoacoustic |
| |
| | model. Using the MNR calculated, the actual number of bits allocated |
| |
| | to each subband is found iteratively. |
| |
| | |
| |
| \=======================================================================*/
| |
|
| |
| /************************************************************************
| |
| *
| |
| * I_bits_for_nonoise (Layer I)
| |
| * II_bits_for_nonoise (Layer II)
| |
| *
| |
| * PURPOSE:Returns the number of bits required to produce a
| |
| * mask-to-noise ratio better or equal to the noise/no_noise threshold.
| |
| *
| |
| * SEMANTICS:
| |
| * bbal = # bits needed for encoding bit allocation
| |
| * bsel = # bits needed for encoding scalefactor select information
| |
| * banc = # bits needed for ancillary data (header info included)
| |
| *
| |
| * For each subband and channel, will add bits until one of the
| |
| * following occurs:
| |
| * - Hit maximum number of bits we can allocate for that subband
| |
| * - MNR is better than or equal to the minimum masking level
| |
| * (NOISY_MIN_MNR)
| |
| * Then the bits required for scalefactors, scfsi, bit allocation,
| |
| * and the subband samples are tallied (#req_bits#) and returned.
| |
| *
| |
| * (NOISY_MIN_MNR) is the smallest MNR a subband can have before it is
| |
| * counted as 'noisy' by the logic which chooses the number of JS
| |
| * subbands.
| |
| *
| |
| * Joint stereo is supported.
| |
| *
| |
| ************************************************************************/
| |
|
| |
|
| static double snr[18] = {0.00, 7.00, 11.00, 16.00, 20.84,
| | == 穴実民が作ったゲーム == |
| 25.28, 31.59, 37.75, 43.84,
| | *[http://ux.getuploader.com/wrestudio_free/download/63/%E7%A9%B4%E5%AE%9FRPG.zip 穴実RPG] |
| 49.89, 55.93, 61.96, 67.98, 74.01,
| | *[http://ux.getuploader.com/wrestudio_free/download/65/%E7%A9%B4%E5%AE%9FRPG2%E4%BF%AE%E6%AD%A3.zip 穴実RPG2] |
| 80.03, 86.05, 92.01, 98.01};
| | *[http://ux.getuploader.com/wrestudio_free/download/67/%E7%A9%B4%E5%AE%9F%E5%BB%83%E5%9D%91.zip 穴実廃坑] |
| | *[http://ux.getuploader.com/wrestudio_free/download/68/%E7%A9%B4%E5%AE%9F%E3%82%A2%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3RPG.zip 穴実アクションRPG] |
| | *[http://ux.getuploader.com/wrestudio_free/download/79/%E3%83%9E%E3%83%B3%E3%82%B4%E3%83%BC%E9%A3%9F%E3%81%99.zip マンゴー食す] |
| | *[http://ux.getuploader.com/wrestudio_free/download/92/%E7%A9%B4%E5%AE%9FRPG2.5.zip 穴実RPG2.5] |
| | *[http://ux.getuploader.com/wrestudio_free/download/94/%E7%A9%B4%E5%AE%9FRPG3%E4%BF%AE%E6%AD%A3.zip 穴実RPG3] |
| | *[http://ux.getuploader.com/wrestudio_free/download/95/%E3%81%8D%E3%81%86%E3%82%8A%E7%A5%AD%E3%82%8A%E3%82%B2%E3%83%BC%E3%83%A0%E4%BA%88%E5%91%8A%E7%B7%A8.zip きうり祭りゲーム予告編] |
| | *[http://ux.getuploader.com/wrestudio_free/download/96/kiuri.zip きうり祭り短編] |
| | *[http://ux.getuploader.com/wrestudio_free/download/97/%E3%81%8D%E3%81%86%E3%82%8A%E3%81%AE%E7%9F%A5%E8%82%B2%E3%82%B2%E3%83%BC%E3%83%A0.zip きうりの知育ゲーム] |
| | *[http://ux.getuploader.com/wrestudio_free/download/103/%E7%A9%B4%E5%AE%9FRPG4.zip 穴実RPG4] |
| | *[http://ux.getuploader.com/wrestudio_free/download/105/%E7%A9%B4%E5%AE%9F%E3%82%B2%E3%83%BC%E3%83%A0.zip 穴実ゲーム] |
| | *[http://ux.getuploader.com/wrestudio_free/download/106/%E7%A9%B4%E5%AE%9FRPGLi.zip 穴実RPGLi] |
| | *[http://ux.getuploader.com/wrestudio_free/download/109/%E6%97%A5%E6%9C%AC%E3%82%A2%E3%83%8A%E3%82%B8%E3%83%84%E5%B7%A5%E6%A5%AD%E4%BD%93%E9%A8%93%E7%89%88.zip 日本アナジツ工業体験版] |
| | *[http://ux.getuploader.com/wrestudio_free/download/110/%E7%A9%B4%E5%AE%9F%E3%82%AA%E3%83%96%E3%83%95%E3%82%A1%E3%83%B3%E3%82%BF%E3%82%B8%E3%82%A2.rar 穴実オブファンタジア] |
| | *[http://ux.getuploader.com/wrestudio_free/download/113/KOS.zip KOS] |
| | *[http://ux.getuploader.com/wrestudio_free/download/115/%E8%BE%B2%E5%A0%B4%E3%82%B2%E3%83%BC%E3%83%A0ver2.1.zip 農場ゲーム] |
|
| |
|
| int I_bits_for_nonoise(perm_smr, fr_ps)
| | == 1001AA == |
| double FAR perm_smr[2][SBLIMIT];
| | <cite>http://agree.2ch.net/liveanarchy/1000.txt</cite> |
| frame_params *fr_ps;
| |
| {
| |
| int i,j,k;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| int req_bits = 0;
| |
|
| |
| /* initial b_anc (header) allocation bits */
| |
| req_bits = 32 + 4 * ( (jsbound * stereo) + (SBLIMIT-jsbound) );
| |
|
| |
| for(i=0; i<SBLIMIT; ++i)
| |
| for(j=0; j<((i<jsbound)?stereo:1); ++j) {
| |
| for(k=0;k<14; ++k)
| |
| if( (-perm_smr[j][i] + snr[k]) >= NOISY_MIN_MNR)
| |
| break; /* we found enough bits */
| |
| if(stereo == 2 && i >= jsbound) /* check other JS channel */
| |
| for(;k<14; ++k)
| |
| if( (-perm_smr[1-j][i] + snr[k]) >= NOISY_MIN_MNR) break;
| |
| if(k>0) req_bits += (k+1)*SCALE_BLOCK + 6*((i>=jsbound)?stereo:1);
| |
| }
| |
| return req_bits;
| |
| }
| |
|
| |
| /***************************** Layer II ********************************/ | |
|
| |
| int II_bits_for_nonoise(perm_smr, scfsi, fr_ps)
| |
| double FAR perm_smr[2][SBLIMIT];
| |
| unsigned int scfsi[2][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| {
| |
| int sb,ch,ba;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| al_table *alloc = fr_ps->alloc;
| |
| int req_bits = 0, bbal = 0, berr = 0, banc = 32;
| |
| int maxAlloc, sel_bits, sc_bits, smp_bits;
| |
| static int sfsPerScfsi[] = { 3,2,1,2 }; /* lookup # sfs per scfsi */
| |
|
| |
|
| /* added 92-08-11 shn */
| | <pre style="background-color:transparent;border:none;font-family:IPAMonaPGothic,'IPA モナー Pゴシック',Monapo,Mona,'MS PGothic','MS Pゴシック',sans-serif;font-size:12pt;line-height:12pt;"> |
| if (fr_ps->header->error_protection) berr=16; else berr=0;
| | ___ |
|
| | / /| |
| for (sb=0; sb<jsbound; ++sb)
| | / / ..| |
| bbal += stereo * (*alloc)[sb][0].bits;
| | /.__/ .......| |
| for (sb=jsbound; sb<sblimit; ++sb)
| | │: : : │.............| |
| bbal += (*alloc)[sb][0].bits;
| | │: : : │.............| |
| req_bits = banc + bbal + berr;
| | │: : : │.............| このスレッドはもう牌を置けません。 |
|
| | │: : : │;;;;;;,,.....| 次のスレッドへ移って下さい。 |
| for(sb=0; sb<sblimit; ++sb)
| | │: : : │;;;;;;;;;;;;;| |
| for(ch=0; ch<((sb<jsbound)?stereo:1); ++ch) {
| | │: : : │;;;;;;;;;;;;;| |
| maxAlloc = (1<<(*alloc)[sb][0].bits)-1;
| | │: : : │;;;;;;;;;;;;;| |
| sel_bits = sc_bits = smp_bits = 0;
| | │: : : │;;;;;;;;;;;;;| |
| for(ba=0;ba<maxAlloc-1; ++ba)
| | │: : : │;;;;;;;;/;:;:;:;:,,.. |
| if( (-perm_smr[ch][sb] + snr[(*alloc)[sb][ba].quant+((ba>0)?1:0)])
| | │: : : │;;;/;:;:;:;:,,.. Anarchy実況 |
| >= NOISY_MIN_MNR)
| | │: : : |/;:;:;:;:,,.. http://maguro.2ch.net/liveanarchy/ |
| break; /* we found enough bits */
| |  ̄ ̄´ |
| if(stereo == 2 && sb >= jsbound) /* check other JS channel */
| | </pre> |
| for(;ba<maxAlloc-1; ++ba)
| |
| if( (-perm_smr[1-ch][sb]+ snr[(*alloc)[sb][ba].quant+((ba>0)?1:0)])
| |
| >= NOISY_MIN_MNR)
| |
| break;
| |
| if(ba>0) {
| |
| smp_bits = SCALE_BLOCK * ((*alloc)[sb][ba].group * (*alloc)[sb][ba].bits);
| |
| /* scale factor bits required for subband */
| |
| sel_bits = 2;
| |
| sc_bits = 6 * sfsPerScfsi[scfsi[ch][sb]];
| |
| if(stereo == 2 && sb >= jsbound) {
| |
| /* each new js sb has L+R scfsis */
| |
| sel_bits += 2;
| |
| sc_bits += 6 * sfsPerScfsi[scfsi[1-ch][sb]];
| |
| }
| |
| req_bits += smp_bits+sel_bits+sc_bits;
| |
| }
| |
| }
| |
| return req_bits;
| |
| }
| |
|
| |
| /************************************************************************
| |
| *
| |
| * I_main_bit_allocation (Layer I)
| |
| * II_main_bit_allocation (Layer II)
| |
| *
| |
| * PURPOSE:For joint stereo mode, determines which of the 4 joint
| |
| * stereo modes is needed. Then calls *_a_bit_allocation(), which
| |
| * allocates bits for each of the subbands until there are no more bits
| |
| * left, or the MNR is at the noise/no_noise threshold.
| |
| *
| |
| * SEMANTICS:
| |
| *
| |
| * For joint stereo mode, joint stereo is changed to stereo if
| |
| * there are enough bits to encode stereo at or better than the
| |
| * no-noise threshold (NOISY_MIN_MNR). Otherwise, the system
| |
| * iteratively allocates less bits by using joint stereo until one
| |
| * of the following occurs:
| |
| * - there are no more noisy subbands (MNR >= NOISY_MIN_MNR)
| |
| * - mode_ext has been reduced to 0, which means that all but the
| |
| * lowest 4 subbands have been converted from stereo to joint
| |
| * stereo, and no more subbands may be converted
| |
| *
| |
| * This function calls *_bits_for_nonoise() and *_a_bit_allocation().
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void I_main_bit_allocation(perm_smr, bit_alloc, adb, fr_ps)
| |
| double FAR perm_smr[2][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| int *adb;
| |
| frame_params *fr_ps;
| |
| {
| |
| int noisy_sbs;
| |
| int mode, mode_ext, lay, i;
| |
| int rq_db, av_db = *adb;
| |
| static int init = 0;
| |
|
| |
| if(init == 0) {
| |
| /* rearrange snr for layer I */
| |
| snr[2] = snr[3];
| |
| for (i=3;i<16;i++) snr[i] = snr[i+2];
| |
| init = 1;
| |
| }
| |
|
| |
| if((mode = fr_ps->actual_mode) == MPG_MD_JOINT_STEREO) {
| |
| fr_ps->header->mode = MPG_MD_STEREO;
| |
| fr_ps->header->mode_ext = 0;
| |
| fr_ps->jsbound = fr_ps->sblimit;
| |
| if(rq_db = I_bits_for_nonoise(perm_smr, fr_ps) > *adb) {
| |
| fr_ps->header->mode = MPG_MD_JOINT_STEREO;
| |
| mode_ext = 4; /* 3 is least severe reduction */
| |
| lay = fr_ps->header->lay;
| |
| do {
| |
| --mode_ext;
| |
| fr_ps->jsbound = js_bound(lay, mode_ext);
| |
| rq_db = I_bits_for_nonoise(perm_smr, fr_ps);
| |
| } while( (rq_db > *adb) && (mode_ext > 0));
| |
| fr_ps->header->mode_ext = mode_ext;
| |
| } /* well we either eliminated noisy sbs or mode_ext == 0 */
| |
| }
| |
| noisy_sbs = I_a_bit_allocation(perm_smr, bit_alloc, adb, fr_ps);
| |
| }
| |
|
| |
| /***************************** Layer II ********************************/
| |
|
| |
| void II_main_bit_allocation(perm_smr, scfsi, bit_alloc, adb, fr_ps)
| |
| double FAR perm_smr[2][SBLIMIT];
| |
| unsigned int scfsi[2][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| int *adb;
| |
| frame_params *fr_ps;
| |
| {
| |
| int noisy_sbs, nn;
| |
| int mode, mode_ext, lay;
| |
| int rq_db, av_db = *adb;
| |
|
| |
| if((mode = fr_ps->actual_mode) == MPG_MD_JOINT_STEREO) {
| |
| fr_ps->header->mode = MPG_MD_STEREO;
| |
| fr_ps->header->mode_ext = 0;
| |
| fr_ps->jsbound = fr_ps->sblimit;
| |
| if((rq_db=II_bits_for_nonoise(perm_smr, scfsi, fr_ps)) > *adb) {
| |
| fr_ps->header->mode = MPG_MD_JOINT_STEREO;
| |
| mode_ext = 4; /* 3 is least severe reduction */
| |
| lay = fr_ps->header->lay;
| |
| do {
| |
| --mode_ext;
| |
| fr_ps->jsbound = js_bound(lay, mode_ext);
| |
| rq_db = II_bits_for_nonoise(perm_smr, scfsi, fr_ps);
| |
| } while( (rq_db > *adb) && (mode_ext > 0));
| |
| fr_ps->header->mode_ext = mode_ext;
| |
| } /* well we either eliminated noisy sbs or mode_ext == 0 */
| |
| }
| |
| noisy_sbs = II_a_bit_allocation(perm_smr, scfsi, bit_alloc, adb, fr_ps);
| |
| }
| |
|
| |
| /************************************************************************
| |
| *
| |
| * I_a_bit_allocation (Layer I)
| |
| * II_a_bit_allocation (Layer II)
| |
| *
| |
| * PURPOSE:Adds bits to the subbands with the lowest mask-to-noise
| |
| * ratios, until the maximum number of bits for the subband has
| |
| * been allocated.
| |
| *
| |
| * SEMANTICS:
| |
| * 1. Find the subband and channel with the smallest MNR (#min_sb#,
| |
| * and #min_ch#)
| |
| * 2. Calculate the increase in bits needed if we increase the bit
| |
| * allocation to the next higher level
| |
| * 3. If there are enough bits available for increasing the resolution
| |
| * in #min_sb#, #min_ch#, and the subband has not yet reached its
| |
| * maximum allocation, update the bit allocation, MNR, and bits
| |
| available accordingly
| |
| * 4. Repeat until there are no more bits left, or no more available
| |
| * subbands. (A subband is still available until the maximum
| |
| * number of bits for the subband has been allocated, or there
| |
| * aren't enough bits to go to the next higher resolution in the
| |
| subband.)
| |
| *
| |
| ************************************************************************/
| |
|
| |
| int I_a_bit_allocation(perm_smr, bit_alloc, adb, fr_ps) /* return noisy sbs */
| |
| double FAR perm_smr[2][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| int *adb;
| |
| frame_params *fr_ps;
| |
| {
| |
| int i, k, smpl_bits, scale_bits, min_sb, min_ch, oth_ch;
| |
| int bspl, bscf, ad, noisy_sbs, done = 0, bbal ;
| |
| double mnr[2][SBLIMIT], small;
| |
| char used[2][SBLIMIT];
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| al_table *alloc = fr_ps->alloc;
| |
| static char init= 0;
| |
| static int banc=32, berr=0;
| |
|
| |
| if (!init) {
| |
| init = 1;
| |
| if (fr_ps->header->error_protection) berr = 16; /* added 92-08-11 shn */
| |
| }
| |
| bbal = 4 * ( (jsbound * stereo) + (SBLIMIT-jsbound) );
| |
| *adb -= bbal + berr + banc;
| |
| ad= *adb;
| |
|
| |
| for (i=0;i<SBLIMIT;i++) for (k=0;k<stereo;k++) {
| |
| mnr[k][i]=snr[0]-perm_smr[k][i];
| |
| bit_alloc[k][i] = 0;
| |
| used[k][i] = 0;
| |
| }
| |
| bspl = bscf = 0;
| |
|
| |
| do {
| |
| /* locate the subband with minimum SMR */
| |
| small = mnr[0][0]+1; min_sb = -1; min_ch = -1;
| |
| for (i=0;i<SBLIMIT;i++) for (k=0;k<stereo;k++)
| |
| /* go on only if there are bits left */
| |
| if (used[k][i] != 2 && small > mnr[k][i]) {
| |
| small = mnr[k][i];
| |
| min_sb = i; min_ch = k;
| |
| }
| |
| if(min_sb > -1) { /* there was something to find */
| |
| /* first step of bit allocation is biggest */
| |
| if (used[min_ch][min_sb]) { smpl_bits = SCALE_BLOCK; scale_bits = 0; }
| |
| else { smpl_bits = 24; scale_bits = 6; }
| |
| if(min_sb >= jsbound) scale_bits *= stereo;
| |
|
| |
| /* check to see enough bits were available for */
| |
| /* increasing resolution in the minimum band */
| |
|
| |
| if (ad >= bspl + bscf + scale_bits + smpl_bits) {
| |
| bspl += smpl_bits; /* bit for subband sample */
| |
| bscf += scale_bits; /* bit for scale factor */
| |
| bit_alloc[min_ch][min_sb]++;
| |
| used[min_ch][min_sb] = 1; /* subband has bits */
| |
| mnr[min_ch][min_sb] = -perm_smr[min_ch][min_sb]
| |
| + snr[bit_alloc[min_ch][min_sb]];
| |
| /* Check if subband has been fully allocated max bits */
| |
| if (bit_alloc[min_ch][min_sb] == 14 ) used[min_ch][min_sb] = 2;
| |
| }
| |
| else /* no room to improve this band */
| |
| used[min_ch][min_sb] = 2; /* for allocation anymore */
| |
| if(stereo == 2 && min_sb >= jsbound) {
| |
| oth_ch = 1-min_ch; /* joint-st : fix other ch */
| |
| bit_alloc[oth_ch][min_sb] = bit_alloc[min_ch][min_sb];
| |
| used[oth_ch][min_sb] = used[min_ch][min_sb];
| |
| mnr[oth_ch][min_sb] = -perm_smr[oth_ch][min_sb]
| |
| + snr[bit_alloc[oth_ch][min_sb]];
| |
| }
| |
| }
| |
| } while(min_sb>-1); /* i.e. still some sub-bands to find */
| |
| | |
| /* Calculate the number of bits left, add on to pointed var */
| |
| ad -= bspl+bscf;
| |
| *adb = ad;
| |
| | |
| /* see how many channels are noisy */
| |
| noisy_sbs = 0; small = mnr[0][0];
| |
| for(k=0; k<stereo; ++k) {
| |
| for(i = 0; i< SBLIMIT; ++i) {
| |
| if(mnr[k][i] < NOISY_MIN_MNR) ++noisy_sbs;
| |
| if(small > mnr[k][i]) small = mnr[k][i];
| |
| }
| |
| }
| |
| return noisy_sbs;
| |
| }
| |
| | |
| /***************************** Layer II ********************************/
| |
|
| |
| int II_a_bit_allocation(perm_smr, scfsi, bit_alloc, adb, fr_ps)
| |
| double FAR perm_smr[2][SBLIMIT];
| |
| unsigned int scfsi[2][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| int *adb;
| |
| frame_params *fr_ps;
| |
| {
| |
| int i, min_ch, min_sb, oth_ch, k, increment, scale, seli, ba;
| |
| int bspl, bscf, bsel, ad, noisy_sbs, bbal=0;
| |
| double mnr[2][SBLIMIT], small;
| |
| char used[2][SBLIMIT];
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| al_table *alloc = fr_ps->alloc;
| |
| static char init= 0;
| |
| static int banc=32, berr=0;
| |
| static int sfsPerScfsi[] = { 3,2,1,2 }; /* lookup # sfs per scfsi */
| |
|
| |
| if (!init) {
| |
| init = 1;
| |
| if (fr_ps->header->error_protection) berr=16; /* added 92-08-11 shn */
| |
| }
| |
| for (i=0; i<jsbound; ++i)
| |
| bbal += stereo * (*alloc)[i][0].bits;
| |
| for (i=jsbound; i<sblimit; ++i)
| |
| bbal += (*alloc)[i][0].bits;
| |
| *adb -= bbal + berr + banc;
| |
| ad = *adb;
| |
|
| |
| for (i=0;i<sblimit;i++) for (k=0;k<stereo;k++) {
| |
| mnr[k][i]=snr[0]-perm_smr[k][i];
| |
| bit_alloc[k][i] = 0;
| |
| used[k][i] = 0;
| |
| }
| |
| bspl = bscf = bsel = 0;
| |
|
| |
| do {
| |
| /* locate the subband with minimum SMR */
| |
| small = 999999.0; min_sb = -1; min_ch = -1;
| |
| for (i=0;i<sblimit;i++) for(k=0;k<stereo;++k)
| |
| if (used[k][i] != 2 && small > mnr[k][i]) {
| |
| small = mnr[k][i];
| |
| min_sb = i; min_ch = k;
| |
| }
| |
| if(min_sb > -1) { /* there was something to find */
| |
| /* find increase in bit allocation in subband [min] */
| |
| increment = SCALE_BLOCK * ((*alloc)[min_sb][bit_alloc[min_ch][min_sb]+1].group *
| |
| (*alloc)[min_sb][bit_alloc[min_ch][min_sb]+1].bits);
| |
| if (used[min_ch][min_sb])
| |
| increment -= SCALE_BLOCK * ((*alloc)[min_sb][bit_alloc[min_ch][min_sb]].group*
| |
| (*alloc)[min_sb][bit_alloc[min_ch][min_sb]].bits);
| |
|
| |
| /* scale factor bits required for subband [min] */
| |
| oth_ch = 1 - min_ch; /* above js bound, need both chans */
| |
| if (used[min_ch][min_sb]) scale = seli = 0;
| |
| else { /* this channel had no bits or scfs before */
| |
| seli = 2;
| |
| scale = 6 * sfsPerScfsi[scfsi[min_ch][min_sb]];
| |
| if(stereo == 2 && min_sb >= jsbound) {
| |
| /* each new js sb has L+R scfsis */
| |
| seli += 2;
| |
| scale += 6 * sfsPerScfsi[scfsi[oth_ch][min_sb]];
| |
| }
| |
| }
| |
| /* check to see enough bits were available for */
| |
| /* increasing resolution in the minimum band */
| |
| if (ad >= bspl + bscf + bsel + seli + scale + increment) {
| |
| ba = ++bit_alloc[min_ch][min_sb]; /* next up alloc */
| |
| bspl += increment; /* bits for subband sample */
| |
| bscf += scale; /* bits for scale factor */
| |
| bsel += seli; /* bits for scfsi code */
| |
| used[min_ch][min_sb] = 1; /* subband has bits */
| |
| mnr[min_ch][min_sb] = -perm_smr[min_ch][min_sb] +
| |
| snr[(*alloc)[min_sb][ba].quant+1];
| |
| /* Check if subband has been fully allocated max bits */
| |
| if (ba >= (1<<(*alloc)[min_sb][0].bits)-1) used[min_ch][min_sb] = 2;
| |
| }
| |
| else used[min_ch][min_sb] = 2; /* can't increase this alloc */
| |
| if(min_sb >= jsbound && stereo == 2) {
| |
| /* above jsbound, alloc applies L+R */
| |
| ba = bit_alloc[oth_ch][min_sb] = bit_alloc[min_ch][min_sb];
| |
| used[oth_ch][min_sb] = used[min_ch][min_sb];
| |
| mnr[oth_ch][min_sb] = -perm_smr[oth_ch][min_sb] +
| |
| snr[(*alloc)[min_sb][ba].quant+1];
| |
| }
| |
| }
| |
| } while(min_sb > -1); /* until could find no channel */
| |
| /* Calculate the number of bits left */
| |
| ad -= bspl+bscf+bsel; *adb = ad;
| |
| for (i=sblimit;i<SBLIMIT;i++) for (k=0;k<stereo;k++) bit_alloc[k][i]=0;
| |
|
| |
| noisy_sbs = 0; small = mnr[0][0]; /* calc worst noise in case */
| |
| for(k=0;k<stereo;++k) {
| |
| for (i=0;i<sblimit;i++) {
| |
| if (small > mnr[k][i]) small = mnr[k][i];
| |
| if(mnr[k][i] < NOISY_MIN_MNR) ++noisy_sbs; /* noise is not masked */
| |
| | |
| }
| |
| }
| |
| return noisy_sbs;
| |
| }
| |
|
| |
| /************************************************************************
| |
| *
| |
| * I_subband_quantization (Layer I)
| |
| * II_subband_quantization (Layer II)
| |
| *
| |
| * PURPOSE:Quantizes subband samples to appropriate number of bits
| |
| *
| |
| * SEMANTICS: Subband samples are divided by their scalefactors, which
| |
| makes the quantization more efficient. The scaled samples are
| |
| * quantized by the function a*x+b, where a and b are functions of
| |
| * the number of quantization levels. The result is then truncated
| |
| * to the appropriate number of bits and the MSB is inverted.
| |
| *
| |
| * Note that for fractional 2's complement, inverting the MSB for a
| |
| negative number x is equivalent to adding 1 to it.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| static double a[17] = {
| |
| 0.750000000, 0.625000000, 0.875000000, 0.562500000, 0.937500000,
| |
| 0.968750000, 0.984375000, 0.992187500, 0.996093750, 0.998046875,
| |
| 0.999023438, 0.999511719, 0.999755859, 0.999877930, 0.999938965,
| |
| 0.999969482, 0.999984741 };
| |
|
| |
| static double b[17] = {
| |
| -0.250000000, -0.375000000, -0.125000000, -0.437500000, -0.062500000,
| |
| -0.031250000, -0.015625000, -0.007812500, -0.003906250, -0.001953125,
| |
| -0.000976563, -0.000488281, -0.000244141, -0.000122070, -0.000061035,
| |
| -0.000030518, -0.000015259 };
| |
|
| |
| void I_subband_quantization(scalar, sb_samples, j_scale, j_samps,
| |
| bit_alloc, sbband, fr_ps)
| |
| unsigned int scalar[2][3][SBLIMIT];
| |
| double FAR sb_samples[2][3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int j_scale[3][SBLIMIT];
| |
| double FAR j_samps[3][SCALE_BLOCK][SBLIMIT]; /* L+R for j-stereo if necess */
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| unsigned int FAR sbband[2][3][SCALE_BLOCK][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| {
| |
| int i, j, k, n, sig;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| double d;
| |
| static char init = 0;
| |
|
| |
|
| if (!init) {
| | ===1001AAが決定した経緯=== |
| init = 1;
| |
| /* rearrange quantization coef to correspond to layer I table */
| |
| a[1] = a[2]; b[1] = b[2];
| |
| for (i=2;i<15;i++) { a[i] = a[i+2]; b[i] = b[i+2]; }
| |
| }
| |
| for (j=0;j<SCALE_BLOCK;j++) for (i=0;i<SBLIMIT;i++)
| |
| for (k=0;k<((i<jsbound)?stereo:1);k++)
| |
| if (bit_alloc[k][i]) {
| |
| /* for joint stereo mode, have to construct a single subband stream
| |
| for the js channels. At present, we calculate a set of mono
| |
| subband samples and pass them through the scaling system to
| |
| generate an alternate normalised sample stream.
| |
|
| |
| Could normalise both streams (divide by their scfs), then average
| |
| them. In bad conditions, this could give rise to spurious
| |
| cancellations. Instead, we could just select the sb stream from
| |
| the larger channel (higher scf), in which case _that_ channel
| |
| would be 'properly' reconstructed, and the mate would just be a
| |
| scaled version. Spec recommends averaging the two (unnormalised)
| |
| subband channels, then normalising this new signal without
| |
| actually sending this scale factor... This means looking ahead.
| |
| */
| |
| if(stereo == 2 && i>=jsbound)
| |
| /* use the joint data passed in */
| |
| d = j_samps[0][j][i] / multiple[j_scale[0][i]];
| |
| else
| |
| d = sb_samples[k][0][j][i] / multiple[scalar[k][0][i]];
| |
| /* scale and quantize floating point sample */
| |
| n = bit_alloc[k][i];
| |
| d = d * a[n-1] + b[n-1];
| |
| /* extract MSB N-1 bits from the floating point sample */
| |
| if (d >= 0) sig = 1;
| |
| else { sig = 0; d += 1.0; }
| |
| sbband[k][0][j][i] = (unsigned int) (d * (double) (1L<<n));
| |
| /* tag the inverted sign bit to sbband at position N */
| |
| if (sig) sbband[k][0][j][i] |= 1<<n;
| |
| }
| |
| }
| |
|
| |
| /***************************** Layer II ********************************/
| |
|
| |
| void II_subband_quantization(scalar, sb_samples, j_scale, j_samps,
| |
| bit_alloc, sbband, fr_ps)
| |
| unsigned int scalar[2][3][SBLIMIT];
| |
| double FAR sb_samples[2][3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int j_scale[3][SBLIMIT];
| |
| double FAR j_samps[3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| unsigned int FAR sbband[2][3][SCALE_BLOCK][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| {
| |
| int i, j, k, s, n, qnt, sig;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| unsigned int stps;
| |
| double d;
| |
| al_table *alloc = fr_ps->alloc;
| |
|
| |
|
| for (s=0;s<3;s++)
| | かつて穴実で流行った'''Domino Online'''というゲームが元ネタ。今は見る影もない。<br> |
| for (j=0;j<SCALE_BLOCK;j++)
| | http://shimage.net/domino/ |
| for (i=0;i<sblimit;i++)
| |
| for (k=0;k<((i<jsbound)?stereo:1);k++)
| |
| if (bit_alloc[k][i]) {
| |
| /* scale and quantize floating point sample */
| |
| if(stereo == 2 && i>=jsbound) /* use j-stereo samples */
| |
| d = j_samps[s][j][i] / multiple[j_scale[s][i]];
| |
| else
| |
| d = sb_samples[k][s][j][i] / multiple[scalar[k][s][i]];
| |
| if (mod(d) > 1.0)
| |
| printf("Not scaled properly %d %d %d %d\n",k,s,j,i);
| |
| qnt = (*alloc)[i][bit_alloc[k][i]].quant;
| |
| d = d * a[qnt] + b[qnt];
| |
| /* extract MSB N-1 bits from the floating point sample */
| |
| if (d >= 0) sig = 1;
| |
| else { sig = 0; d += 1.0; }
| |
| n = 0;
| |
| #ifndef MS_DOS
| |
| stps = (*alloc)[i][bit_alloc[k][i]].steps;
| |
| while ((1L<<n) < stps) n++;
| |
| #else
| |
| while ( ( (unsigned long)(1L<<(long)n) <
| |
| ((unsigned long) ((*alloc)[i][bit_alloc[k][i]].steps)
| |
| & 0xffff
| |
| )
| |
| ) && ( n <16)
| |
| ) n++;
| |
| #endif
| |
| n--;
| |
| sbband[k][s][j][i] = (unsigned int) (d * (double) (1L<<n));
| |
| /* tag the inverted sign bit to sbband at position N */
| |
| /* The bit inversion is a must for grouping with 3,5,9 steps
| |
| so it is done for all subbands */
| |
| if (sig) sbband[k][s][j][i] |= 1<<n;
| |
| }
| |
| for (s=0;s<3;s++)
| |
| for (j=sblimit;j<SBLIMIT;j++)
| |
| for (i=0;i<SCALE_BLOCK;i++) for (k=0;k<stereo;k++) sbband[k][s][i][j] = 0;
| |
| }
| |
|
| |
| /*************************************************************************
| |
| * I_encode_bit_alloc (Layer I)
| |
| * II_encode_bit_alloc (Layer II)
| |
| *
| |
| * PURPOSE:Writes bit allocation information onto bitstream
| |
| *
| |
| * Layer I uses 4 bits/subband for bit allocation information,
| |
| * and Layer II uses 4,3,2, or 0 bits depending on the
| |
| * quantization table used.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void I_encode_bit_alloc(bit_alloc, fr_ps, bs)
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| int i,k;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
|
| |
| for (i=0;i<SBLIMIT;i++)
| |
| for (k=0;k<((i<jsbound)?stereo:1);k++) putbits(bs,bit_alloc[k][i],4);
| |
| }
| |
|
| |
| /***************************** Layer II ********************************/
| |
|
| |
| void II_encode_bit_alloc(bit_alloc, fr_ps, bs)
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| int i,k;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| al_table *alloc = fr_ps->alloc;
| |
|
| |
| for (i=0;i<sblimit;i++)
| |
| for (k=0;k<((i<jsbound)?stereo:1);k++)
| |
| putbits(bs,bit_alloc[k][i],(*alloc)[i][0].bits);
| |
| }
| |
|
| |
| /************************************************************************ | |
| *
| |
| * I_sample_encoding (Layer I)
| |
| * II_sample_encoding (Layer II)
| |
| *
| |
| * PURPOSE:Put one frame of subband samples on to the bitstream
| |
| *
| |
| * SEMANTICS: The number of bits allocated per sample is read from
| |
| * the bit allocation information #bit_alloc#. Layer 2
| |
| * supports writing grouped samples for quantization steps
| |
| * that are not a power of 2.
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void I_sample_encoding(sbband, bit_alloc, fr_ps, bs)
| |
| unsigned int FAR sbband[2][3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| int i,j,k;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
|
| |
| for(j=0;j<SCALE_BLOCK;j++) {
| |
| for(i=0;i<SBLIMIT;i++)
| |
| for(k=0;k<((i<jsbound)?stereo:1);k++)
| |
| if(bit_alloc[k][i]) putbits(bs,sbband[k][0][j][i],bit_alloc[k][i]+1);
| |
| }
| |
| }
| |
|
| |
| /***************************** Layer II ********************************/
| |
|
| |
| void II_sample_encoding(sbband, bit_alloc, fr_ps, bs)
| |
| unsigned int FAR sbband[2][3][SCALE_BLOCK][SBLIMIT];
| |
| unsigned int bit_alloc[2][SBLIMIT];
| |
| frame_params *fr_ps;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| unsigned int temp;
| |
| unsigned int i,j,k,s,x,y;
| |
| int stereo = fr_ps->stereo;
| |
| int sblimit = fr_ps->sblimit;
| |
| int jsbound = fr_ps->jsbound;
| |
| al_table *alloc = fr_ps->alloc;
| |
|
| |
| for (s=0;s<3;s++)
| |
| for (j=0;j<SCALE_BLOCK;j+=3)
| |
| for (i=0;i<sblimit;i++)
| |
| for (k=0;k<((i<jsbound)?stereo:1);k++)
| |
| if (bit_alloc[k][i]) {
| |
| if ((*alloc)[i][bit_alloc[k][i]].group == 3) {
| |
| for (x=0;x<3;x++) putbits(bs,sbband[k][s][j+x][i],
| |
| (*alloc)[i][bit_alloc[k][i]].bits);
| |
| }
| |
| else {
| |
| y =(*alloc)[i][bit_alloc[k][i]].steps;
| |
| temp = sbband[k][s][j][i] +
| |
| sbband[k][s][j+1][i] * y +
| |
| sbband[k][s][j+2][i] * y * y;
| |
| putbits(bs,temp,(*alloc)[i][bit_alloc[k][i]].bits);
| |
| }
| |
| }
| |
| }
| |
|
| |
| /************************************************************************ | |
| *
| |
| * encode_CRC
| |
| *
| |
| ************************************************************************/
| |
|
| |
| void encode_CRC(crc, bs)
| |
| unsigned int crc;
| |
| Bit_stream_struc *bs;
| |
| {
| |
| putbits(bs, crc, 16);
| |
| }
| |
|
| |
|
| | ==脚注== |
| | <references /> |
|
| |
|
| <br/>
| | ==関連項目== |
| <br/>
| | *[[ゆるゆり]] |
| <br/>
| | *[[Mango Mangue]] |
| <br/>
| | *[[Code Monkey]] |
| <br/>
| | *[[あかり板]] |
| <br/>
| | *[[ニュース速報(杉浦綾乃)板]] |
| <br/>
| | *[[カラオケ桶板]] |
| <br/>
| | *[[松本りせ板]] |
| <br/>
| | *[[ごらく部板]] |
| <br/>
| | *[[船見結衣板]] |
| <br/>
| |
| <br/>
| |
| <br/>
| |
| <br/>
| |
| <br/>ないです
| |
| <!-- カテゴリ表示でのデフォルトソート名 -->
| |
| {{DEFAULTSORT:あなあきいじつきよういた}}
| |
|
| |
|
| <!-- 所属カテゴリ -->
| | ==外部リンク== |
| [[Category:2ちゃんねるの板]]
| | * {{krswwiki|Anarchy実況板}} |
| [[Category:板]]
| |