December 26 2006

  Today I wrote a function alike (delay proc) from my memory.

(define (memproc proc)
  (let ((read? #f)
        (result #f))
    (lambda ()
       (if read?
           result
           (begin
             (set! result (proc))
             (set! read? #t)
             result)))))

  It is not easy to implement the above function in C or C++ programming language.  Perhaps, you
have to use a global variable or define a pointer to a funtion, even make a special class.  However,
it is so natural and simple in lisp.

  This afternoon I read some aticles on MPEG4.  I learned some concepts from them.  All MPEG films
are made from a sequence of pictures.  So, experts call those pictures as frames.  They also divide
a picture into more blocks, the blocks are all 16x16.  The encoding or decoding must be based on these
blocks.

  There are three kinds of frame, I-frame, P-frame, B-frame.  The I-frame is a key frame.  In order
to compress much data, in MPEG4, it is not true that all frames are real pictures.  As a matter of fact,
some frame just save little key data so as to decrease a film file size.  But we still need frames for
making those virtual frames based on them.  These frames are called key frames, I-frames.  It usualy
is the head of a GOP (Group of Picture).  If you know what is I-frame, the P-frame and B-frame will be
easy to understand.

  The P-frame is just to save different data from its previous frame which maybe a I-frame or not.  The
B-frame is used to save data different from its previous frame or its next frame.

  You can think P-frame and B-frame both virtual frames 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值