Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
mp4_iquant.c
Package: VC++视频传输.rar [view]
Upload User: hxb_1234
Upload Date: 2010-03-30
Package Size: 8328k
Code Size: 1k
Category:
Visual C++ Books
Development Platform:
Visual C++
- #include "mp4_vars.h"
- #include "mp4_predict.h"
- #include "mp4_iquant.h"
- #define _iquant_h263(coeff, q_2scale, q_add) if ((coeff) != 0) {
- if ((coeff) > 0) {
- (coeff) = ((q_2scale) * (coeff)) + (q_add); }
- else if ((coeff) < 0) {
- (coeff) *= -1;
- (coeff) = ((q_2scale) * (coeff)) + (q_add);
- (coeff) *= -1; }
- }
- /**
- *
- **/
- __inline void iquant (short * psblock, int intraFlag)
- {
- int i;
- int q_scale = mp4_state->hdr.quantizer;
- int q_2scale = q_scale << 1;
- int q_add = (q_scale & 1) ? q_scale : (q_scale - 1);
- for (i = intraFlag; i < 64; i++)
- {
- _iquant_h263(psblock[i], q_2scale, q_add);
- }
- }
- void iquant_typefirst (short * psblock)
- {
- int i;
- for (i = 1; i < 64; i++)
- {
- if (psblock[i] != 0) {
- psblock[i] = (psblock[i] * 2 * mp4_state->hdr.quantizer *
- mp4_tables->intra_quant_matrix[mp4_tables->zig_zag_scan[i]]) >> 4;
- }
- }
- }