[FFmpeg-devel] quantized DCT coefficients problems in H263

hong zhao zh1985444
Thu Feb 10 22:01:48 CET 2011

  I'm trying to hide some secret message into the quantized DCT
coefficients. I mainly focus on flash video( FLV) which contains H263 and
AAC. I know that when set FF_DEBUG_DCT_COEFF, we can obtain DCT coefficients
from AVFrame->dct_coeff or coded_frame->dct_coeff. While they are a copy of
the DCT coefficients. I can not hide message into them. What I'm doing is to
make some modifications in the source code of FFMPEG.
First, I obtain the quantized DCT coefficients from the buffer block[][] in
function h263_encode_mb(before calling function h263_encode_block). And hide
message into the non-zero AC coefficients in block[][], then calling
h263_encode_block to encode the modified DCT coefficients. Is it the right
place to do this?
Second, when extracting the hidden message, I am trying to get the decoded
DCT coefficients from block[][] in function ff_h263_decode_mb(after calling
function h263_decode_block).And extract message from these coefficients.
While, for some frames, when I got the DCT coefficients, they are different
from that be coded in the first step. They should be the same. And some
coefficients are very large or very small(for example, 127,172,-127 and
others). The DCT coefficients obtained from AVFrame->dct_coeff(using
FF_DEBUG_DCT_COEFF) are still wrong from some frames. Can someone tell me
what's happen?
And, the order of the AC coefficients in block[][] and AVFrame->dct_coeff
are different. What's the scan method of the AC coefficients?  Is it Z-like

More information about the ffmpeg-devel mailing list