示例#1
0
        static DwtTile GetDTS(RfxProgressiveCodecContext encodingContext, ProgressiveChunk_Values chunk)
        {
            DwtBands yBD  = DwtBands.GetFromLinearizationResult(encodingContext.DRS.Y_DwtQ, encodingContext.UseReduceExtrapolate);
            DwtBands cbBD = DwtBands.GetFromLinearizationResult(encodingContext.DRS.Cb_DwtQ, encodingContext.UseReduceExtrapolate);
            DwtBands crBD = DwtBands.GetFromLinearizationResult(encodingContext.DRS.Cr_DwtQ, encodingContext.UseReduceExtrapolate);

            DTS_Component(yBD, TileComponents.Y, chunk);
            DTS_Component(cbBD, TileComponents.Cb, chunk);
            DTS_Component(crBD, TileComponents.Cr, chunk);

            DwtTile dwtDts = new DwtTile(yBD.GetLinearizationData(), cbBD.GetLinearizationData(), crBD.GetLinearizationData());

            return(dwtDts);
        }
示例#2
0
        public static void ProgressiveQuantization(RfxProgressiveCodecContext encodingContext, ProgressiveChunk_Values chunk)
        {
            DwtBands yBD  = DwtBands.GetFromLinearizationResult(encodingContext.DRS.Y_DwtQ, encodingContext.UseReduceExtrapolate);
            DwtBands cbBD = DwtBands.GetFromLinearizationResult(encodingContext.DRS.Cb_DwtQ, encodingContext.UseReduceExtrapolate);
            DwtBands crBD = DwtBands.GetFromLinearizationResult(encodingContext.DRS.Cr_DwtQ, encodingContext.UseReduceExtrapolate);

            ProgressiveQuantization_Component(yBD, TileComponents.Y, chunk);
            ProgressiveQuantization_Component(cbBD, TileComponents.Cb, chunk);
            ProgressiveQuantization_Component(crBD, TileComponents.Cr, chunk);

            DwtTile dwtDts = new DwtTile(yBD.GetLinearizationData(), cbBD.GetLinearizationData(), crBD.GetLinearizationData());

            encodingContext.ProgQ = dwtDts;

            //Compute DTS
            encodingContext.DTS = GetDTS(encodingContext, chunk);
        }