|
From: Charles 'B. K. <kr...@ac...> - 2001-01-02 23:31:25
|
Arne Schirmacher <ar...@sc...> writes: > As far as I know some compressed video data of a particular frame > can be stored in the next (or previous?) frame if there is room for > it. No. The "spilling" of bits in DV refers only to units of data within frames. The byte-stream for a frame is divided into units called DIF segments. A DIF segment is a fixed size, 150*80=12000 bytes. NTSC frames contain 10 DIF segments, PAL frames contain 12. Each DIF segment contains 27 video segments. Each video segment contains 5 macroblocks. Each macroblock contains 6 blocks, 4 luma plus 2 chroma. A block is an 8x8 array of video samples. In DV, the space allocated to each unit is a fixed size. If the compressed data doesn't fit, it is allowed to spill, but only upto the level of a video segment. So, if the compressed data for a block does not fit into it's own space, it is allowed to spill over into unused space of other blocks in the same macroblock. If there is no room in the current macroblock, then it is allowed to spill into unused space of other macroblocks in the same video segment. If there is still not enough space, then the data is dropped. This is why the parsing algorithm in libdv makes 3 passes over each video segment. > What happens if I rearrange the frames in my editor program? Would > the decoder attempt to access the spilled bits from the wrong frame? > Maybe we need a clear_spilled_bits() function? No. See above. :) > Arne -- Buck (back from the holidays) |