网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 61IC中国电子在线 >> DSP >> 代码示例 >> TI DSP代码示例 >> C5000 >> 文章正文
  基于TI C55X的静止图像JPEG算法中的哈夫马编码的实现         ★★★ 【字体:
基于TI C55X的静止图像JPEG算法中的哈夫马编码的实现
作者:61IC    文章来源:本站原创    点击数:    更新时间:2007-1-22    

#include <stdio.h>
#include<imagelib.h> 

#include "test.h"  // Quantized DCT coefficents (2 Macro Blocks (YUV4:2;0) 12 blocks)
#pragma DATA_SECTION( VLC_status,"status"); 
 void IMG_jpeg_vlc(int *,int *, int *,int);
int VLC_status[80];// the memory location of VLC_status should start of a new data page

int output[64]; // JPEG baseline VLC coded bitestream. The legnth of output is
                // data-dependent.            
 

 void main()
 { 
  
   int *ptr;
   int blocks;
   int type;
 
   int i, temp;
 
   for(i=0;i<64;i++)
    output[i]=0;
   
  
   
   JPEG_vlc_init(VLC_status); // JPEG VLC variables initialization. 
  
 
   for(blocks=0;blocks<12;blocks++)
      { 
         temp=blocks%6;
         if (temp==0 | temp==1 | temp==2 | temp==3 ) type=0;
         if (temp==4) type=1;
         if (temp==5) type=2;
         ptr=(Q_dct_coef+blocks*64);
         IMG_jpeg_vlc(ptr,output,VLC_status,type);
      }
      
     
       // If "0xFF" add "0x00"
      
   
      
  } 

               欢迎点击进入:TI德州中文网   (国内唯一针对TI应用的中文技术网站)    文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    C55x系列特点以及与C54x的比…
    C55x DSP的内核结构及并行处…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    站长:61IC 湘ICP备05002478号