I'm having trouble decoding the sample BBC streams, for example,
sage-640x360.mov. It appears that my spec based decoder diverges from
dirac-research and Schroedinger on codeblock quantiser offset. Both specs
(Dirac 13.4.3.4) clearly states that if state[CODEBLOCK MODE] != 0 implies
that the quantifier offset is read from the stream.
However Schroedinger and dirac-research does something more complicated
here. Schroedinger 1.0.8 has
if (params->codeblock_mode_index == 1) {
ctx->have_quant_offset = TRUE;
if (picture->decoder_instance->compat_quant_offset &&
ctx->horiz_codeblocks == 1 && ctx->vert_codeblocks == 1) {
ctx->have_quant_offset = FALSE;
}
} else {
ctx->have_quant_offset = FALSE;
}
in schro_decoder_setup_codeblocks and uses have_quant_offset and uses
if (ctx->have_quant_offset && ctx->horiz_codeblocks == 1 &&
ctx->vert_codeblocks == 1 && ctx->index == 0 &&
ctx->ymin == 0 && ctx->xmin == 0) {
if (params->is_noarith) {
SchroUnpack unpack_copy;
schro_unpack_copy (&unpack_copy, &ctx->unpack);
quant_index += schro_unpack_decode_sint (&unpack_copy);
....
where the spec states simply
if (params->code_mode_index) {
if (params->is_noarith) {
SchroUnpack unpack_copy;
schro_unpack_copy (&unpack_copy, &ctx->unpack);
quant_index += schro_unpack_decode_sint (&unpack_copy);
...
dirac-research is harder to correlate, but it looks like
// Multiple quantiser are used only if
// a. The global code_block_mode is QUANT_MULTIPLE
// and
// b. More than one code block is present in the subband.
bands(b).SetUsingMultiQuants(
m_decparams.SpatialPartition() &&
m_decparams.GetCodeBlockMode() == QUANT_MULTIPLE
&&
(bands(b).GetCodeBlocks().LengthX() > 1 ||
bands(b).GetCodeBlocks().LengthY() > 1)
);
in CompDecompressor::Decompress is the equivalent logic.
So, is the spec wrong or is the BBC sample
http://diracvideo.org/download/test-streams/quicktime/sage-640x360.mov not
compliant with the spec?
Thanks
Tommy
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Schrodinger-devel mailing list
Schrodinger-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/schrodinger-devel