p第10章
- 格式:ppt
- 大小:408.50 KB
- 文档页数:32
第10章MPEG电视MPEG-1和-2 Video标准有许多共同之处,基本概念类似,数据压缩编码方法基本相同,都采用以图像块作为基本单元进行变换、量化和移动补偿等技术来获得高压缩比。
MPEG-4 Video部分采用内容基编码技术,它除与MPEG-1和-2 Video向后兼容外,还引入了电视图像对象(VO)的概念,在某些应用场合下,对场景中的图像分别进行编码可以获得很高的压缩比而服务质量也能满足要求。
下面将简要介绍这些标准中压缩电视图像数据的基本方法。
10.1 电视图像的数据率10.1.1 ITU-R BT.601标准数据率按照奈奎斯特(Nyquist)采样理论,模拟电视信号经过采样(把连续的时间信号变成离散的时间信号)和量化(把连续的幅度变成离散的幅度信号)之后,数字电视信号的数据量大得惊人,当前的存储器和网络都还没有足够的能力支持这种数据传输率,因此就要对数字电视信号进行压缩。
为了在PAL、NTSC和SECAM彩色电视制之间确定一个共同的数字化参数,早在1982年国际无线电咨询委员会(CCIR)就制定了演播室质量的数字电视编码标准,这就是非常有名的ITU-R BT.601标准。
按照这个标准,使用4:2:2的采样格式,亮度信号Y的采样频率选择为13.5 MHz/s,而色差信号Cr和Cb的采样频率选择为6.75 MHz/s,在传输数字电视信号通道上的数据传输率就达到为270 Mb/s(兆比特/秒)!,即亮度(Y):858样本/行×525行/帧×30帧/秒×10比特/样本≅ 135兆比特/秒(NTSC)864样本/行×625行/帧×25帧/秒×10比特/样本≅ 135兆比特/秒(PAL)Cr (R-Y):429样本/行×525行/帧×30帧/秒×10比特/样本≅ 68兆比特/秒(NTSC)429样本/行×625行/帧×25帧/秒×10比特/样本≅ 68兆比特/秒(PAL)Cb(B-Y):429样本/行×525行/帧×30帧/秒×10比特/样本≅ 68兆比特/秒(NTSC)429样本/行×625行/帧×25帧/秒×10比特/样本≅ 68兆比特/秒(PAL)总计: 27兆样本/秒×10比特/样本 = 270兆比特/秒实际上,在荧光屏上显示出来的有效图像的数据传输率并没有那么高,亮度(Y): 720×480×30×10 ≅ 104 Mb/s (NTSC)720×576×25×10 ≅ 104 Mb/s (PAL)色差(Cr,Cb): 2×360×480×30×10 ≅ 104 Mb/s (NTSC)2×360×576×25×10 ≅ 104 Mb/s (PAL)总计: ~207 Mb/s如果每个样本的采样精度由10比特降为8比特,彩色数字电视信号的数据传输率就降为166 Mb/s。
第10章1、//Customs.h#include <stdio.h>#include <tchar.h>#include <string>#include <iostream>using namespace std;class Customs{private:string name;string accnum;double balance;public:Customs(const string &client, const string &num, double bal = 0.0);~Customs();void show()const;bool deposit(double cash);bool withdraw(double cash);};//Customs.cpp#include "Customs.h"Customs::Customs(const string &client,const string &num, double bal) {accnum = num;name = client;balance = bal;}Customs::~Customs(){}bool Customs::deposit(double cash){if (cash <= 0){cout << "Deposit must greater than zero\n";return false;}else{cout << "Custom deposits $" << cash << " dolars.\n";balance += cash;return true;}}bool Customs::withdraw(double cash){if (cash <= 0 || (balance - cash) < 0){cout << "Withdraw money error, must less than balance and greater than zero\n";return false;}else{cout << "Custom withdraws $" << cash << " dolars\n";balance -= cash;return true;}}void Customs::show()const{cout << "Account custom's name is " << name << endl;cout << "Account number is " << accnum << endl;cout << "Custom's balance is " << balance << endl;}//main.cpp#include "Customs.h"int main(){double input, output;char ch;Customs custom=Customs("Jacky","Jc",3000.32);custom.show();cout << "Please enter A to deposit balance ,\n"<< "P to withdraw balance, or Q to quit.: ";while (cin >> ch && toupper(ch)!='Q'){while (cin.get() != '\n')continue;if (!isalpha(ch)){cout << '\a';continue;}switch (ch){case'A':case'a':cout << "Enter a account number to deposit: ";cin >> input;if (!custom.deposit(input))cout << "Add error\n";elsecout << "Add success\n";break;case'P':case'p':cout << "Enter a account number to withdraw: ";cin >> output;if (!custom.withdraw(output))cout << "Withdraw error\n";elsecout << "Withdraw success\n";break;}custom.show();cout << "Please enter A to deposit balance ,\n"<< "P to withdraw balance, or Q to quit: ";}cout << "Bye\n";cin.get();cin.get();return 0;}2、//person.h#ifndef PERSON_H_#define PERSON_H_#include <iostream>#include <stdio.h>#include <tchar.h>#include <string>using namespace std;class Person{private:static const int Person::LIMIT = 25;string lname;char fname[LIMIT];public:Person(){ lname = ""; fname[0] = '\0'; }Person(const string &ln, const char *fn = "Heyyou");void Show()const;void FormalShow()const;};#endif//person.cpp#include "person.h"Person::Person(const string &ln, const char *fn){lname = ln;strncpy_s(fname, fn, LIMIT);fname[LIMIT] = '\0';}void Person::Show()const{cout << fname << " " << lname;}void Person::FormalShow()const{cout << lname << ", " << fname; }//usePerson.cpp#include "person.h"int main(){Person one;Person two("Smythecraft");Person three("Dimwiddy", "Sam");one.Show();cout << endl;one.FormalShow();cout << endl;two.Show();cout << endl;two.FormalShow();cout << endl;three.Show();cout << endl;three.FormalShow();cout << endl;cin.get();return 0;}3、//golf.h#ifndef GOLF_H_#define GOLF_H_#include <iostream>#include <string>using namespace std;class golf{private:static const int Len = 40;char fullname[Len];int handicap;public:golf();golf(const char *name, int hc = 0);golf(golf &g);~golf();void handicapf(int hc);void show()const;};#endif//golf.cpp#include "golf.h"golf::golf(){}golf::golf(const char *name, int hc){strncpy_s(fullname, name, Len);fullname[Len] = '\0';handicap = hc;}golf::golf(golf &g){strncpy_s(this->fullname, g.fullname, Len);this->handicap = g.handicap;}golf::~golf(){}void golf::handicapf( int hc){handicap = hc;}void golf::show()const{cout << fullname << ", " << handicap << endl; }//main.cpp#include "golf.h"int main(){char name[40] = "\0";int no;cout << "Enter a name: ";cin.getline(name, 40);cout << "Enter a level: ";cin >> no;golf ann(name, no);ann.show();golf andy = golf(ann);andy.show();cin.get();cin.get();return 0;}4、//Sales.h#ifndef SALE_H_#define SALE_H_#include <iostream>#include <string>using namespace std;namespace SALES{class Sales{private:static const int QUARTERS = 4;double sales[QUARTERS];double average;double max;double min;public:Sales();Sales(const double *ar);Sales(Sales &s);~Sales();void showSales()const;};}#endif//Sales.cpp#include "Sales.h"using namespace SALES;Sales::Sales(){sales[QUARTERS] = '\0';average = 0.0;max = 0.0;min = 0.0;}Sales::Sales(const double *ar){double sum=0.0;for (int i = 0; i < QUARTERS; i++){sales[i] = ar[i];sum += sales[i];}average = sum / QUARTERS;max = sales[0];for (int i = 0; i < QUARTERS-1; i++){if (sales[i] < sales[i + 1])max = sales[i + 1];}min = sales[0];for (int i = 0; i < QUARTERS-1; i++){if (sales[i] > sales[i + 1])min = sales[i + 1];}}Sales::Sales(Sales &s){for (int i = 0; i < QUARTERS; i++)this->sales[i] = s.sales[i];this->average = s.average;this->max = s.max;this->min = s.min;}Sales::~Sales(){}void Sales::showSales()const{cout << "The sales number is \n";for (int i = 0; i < QUARTERS; i++){cout << sales[i] << " ";}cout << endl;cout << "The sales average is " << average << endl;cout << "The sales max is " << max << endl;cout << "The sales min is " << min << endl;}//main.cpp#include "Sales.h"using namespace SALES;int main(){double nums[4];cout << "Please enter four numbers: \n";for (int i = 0; i < 4; i++)cin >> nums[i];Sales sn(nums);sn.showSales();Sales sn1(sn);sn1.showSales();cin.get();cin.get();return 0;}5、//stack.h#ifndef STACK_H_#define STACK_H_#include <iostream>#include <string>#include <stdio.h>using namespace std;struct customer{char fullname[35];double payment;};typedef struct customer Item;class Stack{private:enum{ MAX = 10 };Item items[MAX];double sum;int top;public:Stack();~Stack();bool isempty()const;bool isfull()const;bool push(const Item &item);bool pop(Item &item);};#endif#include "stack.h"Stack::Stack(){top = 0;sum = 0.0;}Stack::~Stack(){}bool Stack::isempty()const{return top == 0;}bool Stack::isfull()const{return top == MAX;}bool Stack::push(const Item &item) {if (top < MAX){items[top++] = item;return true;}elsereturn false;}bool Stack::pop(Item &item){if (top > 0){item = items[--top];sum += item.payment;cout << sum << endl;return true;}return false;}//main.cpp#include "stack.h"int main(){Stack st;char ch;Item cs;cout << "Please enter A to add a purchase order,\n"<< "P to process a PO, or Q to quit.\n";while (cin >> ch && toupper(ch) != 'Q'){while (cin.get() != '\n')continue;if (!isalpha(ch)){cout << '\a';continue;}switch (ch){case 'A':case 'a':cout << "Enter a PO number to add: ";cin >> cs.fullname;cin >> cs.payment;if (st.isfull())cout << "stack already full\n";elsest.push(cs);break;case 'P':case 'p':if (st.isempty())cout << "stack already empty\n";else{st.pop(cs);cout << "PO #" << cs.fullname << "popped\n";}break;}cout << "Please enter A to add a purchase order,\n"<< "P to process a PO, or Q to quit.\n";}cout << "Bye\n";cin.get();cin.get();return 0;}6、//Move.h#ifndef MOVE_H_#define MOVE_H_#include <stdio.h>#include <iostream>#include <string>using namespace std;class Move{private:double x;double y;public:Move(double a = 0, double b = 0);void showmove()const;Move add(const Move &m)const;void reset(double a = 0, double b = 0);};#endif//Move.cpp#include "Move.h"Move::Move(double a, double b){x = a;y = b;}void Move::showmove()const{cout << "x = " << x << endl;cout << "y = " << y << endl;}Move Move::add(const Move &m)const {Move xy_add;xy_add.x = m.x + this->x;xy_add.y = m.y + this->y;return xy_add;}void Move::reset(double a, double b) {x = a;y = b;}//main.cpp#include "Move.h"int main(){Move xy0(1, 1);xy0.showmove();Move xy1;xy1 = Move(2, 2);xy1.showmove();xy1 = xy1.add(xy0);xy1.showmove();xy1.reset(2.5, 2.5);xy1.showmove();cin.get();return 0;}7、//plorg.h#ifndef PLORG_H_#define PLORG_H_#include <iostream>#include <string>#include <stdio.h>using namespace std;class plorg{private:static const int len = 19;char fullname[len];int CI;public:plorg(const char *name = "Plorga", int ci = 50);~plorg();void p_fix(int ci);void show()const;};#endif//plorg.cpp#include "plorg.h"plorg::plorg(const char *name, int ci){strncpy_s(fullname, name, len);CI = ci;}plorg::~plorg(){}void plorg::p_fix(int ci){CI = ci;}void plorg::show()const{cout << fullname << ", " << CI << endl; }//main.cpp#include "plorg.h"int main(){plorg pl;pl.show();pl.p_fix(32);pl.show();plorg pll("Plorgb", 27);pll.show();pll.p_fix(32);pll.show();cin.get();return 0;}8、//list.h#ifndef LIST_H_#define LIST_H_#include <iostream>#include <string>#include <stdio.h>using namespace std;typedef unsigned long Item;class List{private:enum { MAX = 10 };Item items[MAX];int head;int rear;public:List();bool isempty()const;bool isfull()const;bool add(const Item &item);bool cut(Item &item);void show()const;void visit(void(*pf)(Item &)); };#endif//list.cpp#include "list.h"List::List(){head = 0;rear = 0;}bool List::isempty()const{return rear == head;}bool List::isfull()const{return rear - head == MAX; }bool List::add(const Item &item) {if (rear < MAX){items[rear++] = item;return true;}elsereturn false;}bool List::cut(Item &item){if (rear < MAX){item = items[--rear];return true;}elsereturn false;}void List::show()const{for (int i = head; i < rear; i++)cout << items[i] << ", ";cout << endl;}void List::visit(void(*pf)(Item &)){for (int i = 0; i < rear; i++)(*pf)(items[i]);}//main.cpp#include "list.h"void show_s(Item & item);int main(){List st;char ch;unsigned long po;unsigned long *p = &po;cout << "Please enter A to add a purchase order,\n"<< "P to process a PO, or Q to quit.\n";while (cin >> ch && toupper(ch) != 'Q'){while (cin.get() != '\n')continue;if (!isalpha(ch)){cout << '\a';continue;}switch (ch){case 'A':case 'a':cout << "Enter a PO number to add: ";cin >> po;if (st.isfull())cout << "stack already full\n";elsest.add(po);break;case 'P':case 'p':if (st.isempty())cout << "stack already empty\n";else{st.cut(po);cout << "PO #" << po << "popped\n";}break;case 'V':case 'v':st.visit(show_s);}cout << "Please enter A to add a purchase order,\n"<< "P to process a PO, or Q to quit.\n";}st.show();cout << "Bye\n";cin.get();cin.get();return 0;}void show_s(Item &item){item += 100;cout << item << endl;}。
第十章 p 区元素1. (1) KBrO 3 + KBr + H 2SO 4 === Br 2 + K 2SO 4 + H 2O(2) AsF 5 + 4H 2O === H 3AsO 4 + 5H 2O(3) OCl 2 + H 2O === 2HCl + O 2 (4) Cl 2 + OH -(热) === Cl - + ClO 3-(5) Br 2 + OH - === Br - + BrO - + H 2O2.前者放出的能量多 (11402(NaCl),556)(--⋅-=∆⋅-=∆mol kJ rH mol kJ NaF rH ),因为氟的原子半径小,当生成离子化合物时晶格能大。
3. 不矛盾。
因为 )/I I ()/Br Br (2Θ2Θ-->ϕϕ,所以Br 2 + 2I - === 2Br - + I 2能进行,说明氧化性22I Br >;又 因为)/I IO ()/Br BrO (23Θ23Θ-->ϕϕ,所以2BrO 3- + I 2 === Br 2 + 2IO 3-能进行,说明氧化性-->33IO BrO 或还原性22Br I > 4. 黄色为I 3-, 棕褐色沉淀为I 2, 无色为IO 3-。
有关反应为:2I - + Cl 2 === 2Cl - + I 2I 2 + I - === I 3-I 2 + 5Cl 2 + 6H 2O === 2IO 3- + 10Cl - + 12H +电解(2) KI + 3H 2O === KIO 3 + 3H 2↑(4) CaCO 3===CaO+CO 2↑ CaO + H 2O===Ca(OH)2 2Cl 2 + 2Ca(OH)2===CaCl 2 + Ca(ClO)2 + 2H 2O 高温5. (1) NaBr + H 3PO 4=== NaH 2PO 4 + HBr(3) 2I 2 + 3P + 6H 2O === 2H 3PO 4 + 6H 2O6. ⑴ F-F<Cl-Cl⑵ F<Cl⑶ HI>HCl⑷ HI<HB⑸ MgF 2和MgCl 2⑹ HClO>HClO 4 7. A:I 2; B: IO 3-; C:I -2I - + ClO - + 2H 2O === I 2↓ + Cl - + 2OH -I 2 + 5ClO - + H 2O === 2IO 3- + 5Cl - + 2H +2IO 3- + 5SO 32- + 2H + === I 2↓ + 5SO 42- + H 2OSO 32- + I 2 + H 2O === SO 42- + 2I - + 2H +IO 3- + 5I - + 6H + === 3I 2↓ + 3H 2O8. (1) Na 2SO 3 + 2Na 2S + 6HCl === 6NaCl + 3S ↓ + 3H 2O (2) H 2SO 3 + Br 2 + H 2O === H 2SO 4 + 2HBr (3) 2Na 2S 2O 3 + I 2=== Na 2S 4O 6 + 2NaI (4) HNO 3 + H 2S === H 2SO 4 + NO + H 2O(6) 2Mn 2+ + 5S 2O 82- + 8H 2O === 2MnO 4- + 10SO 42- + 16H +(7) 2MnO 4- + 5H 2O 2 + 6H + === 2Mn 2+ + 5SO 2↑ + 8H 2O (5) 2H 2SO 4(浓) + S === 3SO 2↑ + 2H 2O△Ag+9.(1)氧和硫原子的价电子构型均为ns 2np 6, 都有2个单电子,都可形成2个键,所以它们单质有两种键合方式:一种是两个原子之间以双键相连而形成双原子的小分子;另一种是多个原子之间以单键相连形成多原子的“大分子”,它们以哪种方式成键取决于键能。