亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dctcalculationdialog.cs

?? mpeg4壓縮算法程序
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using BitmapImage;

namespace MPEGBuilder1UI
{
	/// <summary>
	/// Summary description for DCTCalculationDialog.
	/// </summary>
	public class DCTCalculationDialog : System.Windows.Forms.Form
	{
		private System.Windows.Forms.ListView listView1;
		private System.Windows.Forms.ListView listView2;
		private System.Windows.Forms.ColumnHeader columnHeader1;
		private System.Windows.Forms.ColumnHeader columnHeader2;
		private System.Windows.Forms.ColumnHeader columnHeader3;
		private System.Windows.Forms.ColumnHeader columnHeader4;
		private System.Windows.Forms.ColumnHeader columnHeader5;
		private System.Windows.Forms.ColumnHeader columnHeader6;
		private System.Windows.Forms.ColumnHeader columnHeader7;
		private System.Windows.Forms.ColumnHeader columnHeader8;
		private System.Windows.Forms.ColumnHeader columnHeader9;
		private System.Windows.Forms.ColumnHeader columnHeader10;
		private System.Windows.Forms.ColumnHeader columnHeader11;
		private System.Windows.Forms.ColumnHeader columnHeader12;
		private System.Windows.Forms.ColumnHeader columnHeader13;
		private System.Windows.Forms.ColumnHeader columnHeader14;
		private System.Windows.Forms.ColumnHeader columnHeader15;
		private System.Windows.Forms.ColumnHeader columnHeader16;
		private System.Windows.Forms.ColumnHeader columnHeader17;
		private System.Windows.Forms.ColumnHeader columnHeader18;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
		private System.Windows.Forms.Button button2;

		public double[,] B = new double[8,8];
		public int[,] S1 = new int[8,8];
		public int[] zz = new int[64];

		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.Button button4;
		private System.Windows.Forms.Button button5;

		MPEGFunctions MPEG = new MPEGFunctions();

		public DCTCalculationDialog()
		{
			InitializeComponent();

			button1.Enabled = true;
			button2.Enabled = true;
			button3.Enabled = false;
			button4.Enabled = false;
			button5.Enabled = false;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
	
		public DCTCalculationDialog(byte[,] valueMatrix)
		{
			// Write valueMatrix[] into ListView and initialize buttons
			InitializeComponent();

			FillPixelLV(valueMatrix);
			B = MPEG.calculateDCT(valueMatrix);
			FillDCTLV(B);

			button1.Enabled = true;
			button2.Enabled = true;
			button3.Enabled = false;
			button4.Enabled = false;
			button5.Enabled = false;
		}

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.listView1 = new System.Windows.Forms.ListView();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader8 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader9 = new System.Windows.Forms.ColumnHeader();
			this.listView2 = new System.Windows.Forms.ListView();
			this.columnHeader10 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader11 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader12 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader13 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader14 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader15 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader16 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader17 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader18 = new System.Windows.Forms.ColumnHeader();
			this.button1 = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.button4 = new System.Windows.Forms.Button();
			this.button5 = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// listView1
			// 
			this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																						this.columnHeader1,
																						this.columnHeader2,
																						this.columnHeader3,
																						this.columnHeader4,
																						this.columnHeader5,
																						this.columnHeader6,
																						this.columnHeader7,
																						this.columnHeader8,
																						this.columnHeader9});
			this.listView1.GridLines = true;
			this.listView1.Location = new System.Drawing.Point(16, 32);
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(368, 152);
			this.listView1.TabIndex = 1;
			this.listView1.View = System.Windows.Forms.View.Details;
			// 
			// columnHeader1
			// 
			this.columnHeader1.Text = "Pixel";
			this.columnHeader1.Width = 40;
			// 
			// columnHeader2
			// 
			this.columnHeader2.Text = "x0";
			this.columnHeader2.Width = 40;
			// 
			// columnHeader3
			// 
			this.columnHeader3.Text = "x1";
			this.columnHeader3.Width = 40;
			// 
			// columnHeader4
			// 
			this.columnHeader4.Text = "x2";
			this.columnHeader4.Width = 40;
			// 
			// columnHeader5
			// 
			this.columnHeader5.Text = "x3";
			this.columnHeader5.Width = 40;
			// 
			// columnHeader6
			// 
			this.columnHeader6.Text = "x4";
			this.columnHeader6.Width = 40;
			// 
			// columnHeader7
			// 
			this.columnHeader7.Text = "x5";
			this.columnHeader7.Width = 40;
			// 
			// columnHeader8
			// 
			this.columnHeader8.Text = "x6";
			this.columnHeader8.Width = 40;
			// 
			// columnHeader9
			// 
			this.columnHeader9.Text = "x7";
			this.columnHeader9.Width = 40;
			// 
			// listView2
			// 
			this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																						this.columnHeader10,
																						this.columnHeader11,
																						this.columnHeader12,
																						this.columnHeader13,
																						this.columnHeader14,
																						this.columnHeader15,
																						this.columnHeader16,
																						this.columnHeader17,
																						this.columnHeader18});
			this.listView2.GridLines = true;
			this.listView2.Location = new System.Drawing.Point(16, 232);
			this.listView2.Name = "listView2";
			this.listView2.Size = new System.Drawing.Size(520, 168);
			this.listView2.TabIndex = 2;
			this.listView2.View = System.Windows.Forms.View.Details;
			// 
			// columnHeader10
			// 
			this.columnHeader10.Text = "S(i,j)";
			this.columnHeader10.Width = 40;
			// 
			// columnHeader11
			// 
			this.columnHeader11.Text = "i0";
			// 
			// columnHeader12
			// 
			this.columnHeader12.Text = "i1";
			// 
			// columnHeader13
			// 
			this.columnHeader13.Text = "i2";
			// 
			// columnHeader14
			// 
			this.columnHeader14.Text = "i3";
			// 
			// columnHeader15
			// 
			this.columnHeader15.Text = "i4";
			// 
			// columnHeader16
			// 
			this.columnHeader16.Text = "i5";
			// 
			// columnHeader17
			// 
			this.columnHeader17.Text = "i6";
			// 
			// columnHeader18
			// 
			this.columnHeader18.Text = "i7";
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(456, 416);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 40);
			this.button1.TabIndex = 3;
			this.button1.Text = "Close";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(16, 8);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(100, 16);
			this.label1.TabIndex = 4;
			this.label1.Text = "PIXELS";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(16, 208);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(176, 16);
			this.label2.TabIndex = 5;
			this.label2.Text = "FREQUENCY COMPONENTS";
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(24, 416);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(75, 40);
			this.button2.TabIndex = 6;
			this.button2.Text = "Quantize Default";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(128, 416);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(75, 40);
			this.button3.TabIndex = 7;
			this.button3.Text = "Zigzag Order";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// button4
			// 
			this.button4.Location = new System.Drawing.Point(232, 416);
			this.button4.Name = "button4";
			this.button4.Size = new System.Drawing.Size(75, 40);
			this.button4.TabIndex = 8;
			this.button4.Text = "DC Encode";
			this.button4.Click += new System.EventHandler(this.button4_Click);
			// 
			// button5
			// 
			this.button5.Location = new System.Drawing.Point(336, 416);
			this.button5.Name = "button5";
			this.button5.Size = new System.Drawing.Size(75, 40);
			this.button5.TabIndex = 9;
			this.button5.Text = "AC Encode";
			this.button5.Click += new System.EventHandler(this.button5_Click);
			// 
			// DCTCalculationDialog
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(568, 469);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.button5,
																		  this.button4,
																		  this.button3,
																		  this.button2,
																		  this.label2,
																		  this.label1,
																		  this.button1,
																		  this.listView2,
																		  this.listView1});
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "DCTCalculationDialog";
			this.Text = "DCTCalculationDialog";
			this.ResumeLayout(false);

		}
		#endregion

		private void button1_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void FillPixelLV(byte[,] values)
		{
			// Write pixel values[] into ListView1
			int i, j;
			string[] rowRGB = new string[9];
			byte pixelColor;

			listView1.Items.Clear();
			for (i=0; i<8; i++)
			{
				rowRGB[0] = "y" + i.ToString();
				for (j=0; j<8; j++)
				{
					pixelColor = values[i,j];
					rowRGB[j+1] = pixelColor.ToString();
				}
				listView1.Items.Add(new ListViewItem(rowRGB));
			}
		}

		private void FillDCTLV(double[,] values)
		{
			// Write calculated DCT values into ListView2
			int i, j;
			string[] rowRGB = new string[9];
			double DCTresult;

			listView2.Items.Clear();
			for (i=0; i<8; i++)
			{
				rowRGB[0] = "y" + i.ToString();
				for (j=0; j<8; j++)
				{
					DCTresult = values[i,j];
					rowRGB[j+1] = DCTresult.ToString("f3");
				}
				listView2.Items.Add(new ListViewItem(rowRGB));
			}
		}

		private void FillDCTLV1(int[,] values)
		{
			// Write quantized DCT values[] into ListView2
			int i, j;
			string[] rowRGB = new string[9];
			int Qresult;

			listView2.Items.Clear();
			for (i=0; i<8; i++)
			{
				rowRGB[0] = "y" + i.ToString();
				for (j=0; j<8; j++)
				{
					Qresult = values[i,j];
					rowRGB[j+1] = Qresult.ToString();
				}
				listView2.Items.Add(new ListViewItem(rowRGB));
			}
		}

		private void FillDCTLV2(int[] values)
		{
			// Write reordered quantized DCT values[] into ListView2
			int i, j;
			string[] rowRGB = new string[9];
			int ZZresult;

			listView2.Items.Clear();
			for (i=0; i<8; i++)
			{
				rowRGB[0] = "y" + i.ToString();
				for (j=0; j<8; j++)
				{
					ZZresult = values[i*8 + j];
					rowRGB[j+1] = ZZresult.ToString();
				}
				listView2.Items.Add(new ListViewItem(rowRGB));
			}
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			// Quantize DCT coefficients
			S1 = MPEG.Quantize(B);
			FillDCTLV1(S1);		
			button3.Enabled = true;
			button4.Enabled = false;
			button5.Enabled = false;
		}

		private void button3_Click(object sender, System.EventArgs e)
		{
			// Put in zigzag order
			zz = MPEG.Zigzag(S1);
			FillDCTLV2(zz);		
			button4.Enabled = true;
			button5.Enabled = true;
		}

		private void button4_Click(object sender, System.EventArgs e)
		{
			// Display DC coefficient
			DCEncodeDialog dlg = new DCEncodeDialog(zz[0]);
			dlg.ShowDialog();
		}

		private void button5_Click(object sender, System.EventArgs e)
		{
			// Display AC coefficient
			byte[] ACbits = new byte[2048];
			int i = 0;

			ACbits = MPEG.ACHuffmanEncode(zz);
			
			while (ACbits[i] != 255)
				i++;

			ByteListDialog dlg = new ByteListDialog(ACbits, i);
			dlg.ShowDialog();
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人理论电影网| 国产精品一区2区| 亚洲人xxxx| 中文字幕第一区二区| 国产精品视频在线看| 国产精品久久久久婷婷二区次| 国产日韩在线不卡| 亚洲欧洲av一区二区三区久久| 自拍偷拍亚洲综合| 亚洲成人免费视| 日本女优在线视频一区二区| 国内精品国产三级国产a久久| 国模少妇一区二区三区| 成人免费毛片aaaaa**| 91亚洲午夜精品久久久久久| 欧美私模裸体表演在线观看| 91精品国产aⅴ一区二区| 精品久久久久久最新网址| 国产网红主播福利一区二区| 一区二区中文字幕在线| 亚洲综合丁香婷婷六月香| 日韩国产在线一| 国产夫妻精品视频| 欧美图区在线视频| 久久中文字幕电影| 亚洲日本电影在线| 日韩和欧美的一区| 不卡一区在线观看| 51精品国自产在线| 国产精品入口麻豆九色| 五月激情六月综合| 粉嫩一区二区三区性色av| 在线视频国产一区| 久久久久久综合| 亚洲6080在线| 菠萝蜜视频在线观看一区| 欧美日韩mp4| 17c精品麻豆一区二区免费| 日韩一区精品字幕| 色菇凉天天综合网| 久久理论电影网| 日韩高清国产一区在线| www.欧美日韩国产在线| 日韩免费高清电影| 亚洲一区二区三区在线看| 成人中文字幕合集| 日韩一区二区视频在线观看| 亚洲欧洲性图库| 国产激情一区二区三区| 91精品国产综合久久香蕉麻豆| 亚洲欧美在线另类| 国产成人在线免费| 日韩欧美电影一区| 香蕉影视欧美成人| 欧美在线看片a免费观看| 国产精品色哟哟| 国产剧情av麻豆香蕉精品| 日韩一二三四区| 日韩精品亚洲一区二区三区免费| 91浏览器在线视频| 国产精品视频看| 粉嫩绯色av一区二区在线观看 | 黄色精品一二区| 欧美日韩一区小说| 有坂深雪av一区二区精品| 99riav一区二区三区| 中文字幕一区二区在线观看| 国产成人小视频| 久久免费看少妇高潮| 国产剧情一区在线| 国产清纯白嫩初高生在线观看91| 老司机一区二区| 日韩免费观看2025年上映的电影| 午夜一区二区三区视频| 欧美精品三级日韩久久| 亚洲国产一区在线观看| 欧美视频在线观看一区二区| 一区二区三区不卡视频在线观看| 91亚洲精品乱码久久久久久蜜桃| 综合婷婷亚洲小说| 91免费版pro下载短视频| 亚洲欧洲综合另类| 99re成人在线| 亚洲成a人片在线观看中文| 欧美老肥妇做.爰bbww视频| 天堂资源在线中文精品| 日韩写真欧美这视频| 国内精品久久久久影院薰衣草| 久久综合久久综合久久| 国产成人一区二区精品非洲| 中文字幕一区二区三区乱码在线| 国产成人丝袜美腿| 久久综合九色综合欧美就去吻 | 日韩亚洲欧美成人一区| 韩国一区二区视频| 中文字幕久久午夜不卡| 色婷婷狠狠综合| 久久国产婷婷国产香蕉| 日本一区二区高清| 欧美性一二三区| 狠狠色综合色综合网络| 亚洲婷婷国产精品电影人久久| 在线观看成人免费视频| 久久国产夜色精品鲁鲁99| **性色生活片久久毛片| 日韩视频一区二区| 99re这里都是精品| 久久精品国产**网站演员| 国产精品网站在线| 91精品国产综合久久精品图片 | 91精品欧美综合在线观看最新| 国产在线精品免费| 亚洲国产综合色| 欧美国产日韩精品免费观看| 欧美精品在线一区二区三区| 成人三级伦理片| 免费成人在线视频观看| 亚洲久草在线视频| 精品福利一二区| 欧美日韩精品三区| 91在线视频播放| 国产精品一区二区视频| 午夜精品久久久久久久久久久 | 国产精品一区不卡| 午夜精品国产更新| 亚洲色图一区二区| 国产日韩欧美不卡在线| 91精品在线免费观看| 欧美最新大片在线看 | 日韩精品亚洲一区二区三区免费| 国产精品区一区二区三| 欧美精品一区二区三区蜜臀| 91麻豆精品国产91| 欧美三级中文字幕在线观看| 北条麻妃国产九九精品视频| 国产精品一区二区免费不卡| 喷白浆一区二区| 五月天丁香久久| 亚洲gay无套男同| 一区二区久久久久| 一区二区三区欧美久久| 亚洲欧美色综合| 亚洲毛片av在线| 一区二区在线电影| 亚洲免费观看高清完整版在线观看| 国产免费久久精品| 国产精品理论片| 最新国产成人在线观看| 1000精品久久久久久久久| 最新热久久免费视频| 亚洲色图19p| 亚洲一区视频在线观看视频| 亚洲精品国产a久久久久久| 亚洲三级免费观看| 一区二区三区在线观看欧美| 亚洲欧美另类久久久精品| 一区二区三区精品| 婷婷久久综合九色综合绿巨人 | 悠悠色在线精品| 一区二区三区美女视频| 亚洲一二三专区| 天天免费综合色| 麻豆精品在线播放| 国产裸体歌舞团一区二区| 国产一区二区三区最好精华液| 国产盗摄精品一区二区三区在线| 国产精品香蕉一区二区三区| 成人黄色软件下载| 欧美在线视频不卡| 日韩欧美www| 国产三级精品在线| 亚洲综合视频网| 免费看日韩精品| 不卡视频在线看| 欧美视频一区二区在线观看| 日韩一区二区在线免费观看| 久久久久久9999| 一片黄亚洲嫩模| 久久成人免费网站| 99久精品国产| 欧美一区二区三区视频免费 | 一区二区欧美视频| 精品一区二区三区在线播放| 99久久久无码国产精品| 欧美另类高清zo欧美| 国产午夜精品理论片a级大结局| 中文字幕一区二区日韩精品绯色| 亚洲小说春色综合另类电影| 国产一区二区网址| 欧美日韩国产系列| 国产色一区二区| 亚洲福利一区二区| 成人激情动漫在线观看| 日韩一区二区三区视频| 日韩理论片中文av| 国产麻豆欧美日韩一区| 欧美高清dvd| 亚洲精品va在线观看| 国产精品18久久久久久久久| 884aa四虎影成人精品一区|