OpenCores
URL https://opencores.org/ocsvn/bluespec-h264/bluespec-h264/trunk

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [LumaChromaParallel/] [mkPrediction.bsv] - Diff between revs 86 and 87

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 86 Rev 87
Line 559... Line 559...
      Vector#(4,Bit#(8)) outputVector = replicate(0);
      Vector#(4,Bit#(8)) outputVector = replicate(0);
      Bit#(2) blockHor = {outBlockNum[2],outBlockNum[0]};
      Bit#(2) blockHor = {outBlockNum[2],outBlockNum[0]};
      Bit#(2) blockVer = {outBlockNum[3],outBlockNum[1]};
      Bit#(2) blockVer = {outBlockNum[3],outBlockNum[1]};
      Bit#(2) pixelVer = {outPixelNum[3],outPixelNum[2]};
      Bit#(2) pixelVer = {outPixelNum[3],outPixelNum[2]};
      Bit#(4) totalVer = {blockVer,pixelVer};
      Bit#(4) totalVer = {blockVer,pixelVer};
      //$display( "Trace Prediction: outputing" );
      $display( "bsFIFO Trace Prediction: outputing (%d,%d)", blockVer,blockHor );
      if(outFirstQPFlag)
      if(outFirstQPFlag)
         begin
         begin
            if(infifo_ITB.first() matches tagged IBTmb_qp .xdata)
            if(infifo_ITB.first() matches tagged IBTmb_qp .xdata)
               begin
               begin
                  infifo_ITB.deq();
                  infifo_ITB.deq();
Line 582... Line 582...
                  interBSfifo.deq();
                  interBSfifo.deq();
                  Bit#(2) tempHorBS = tpl_1(interBSfifo.first());
                  Bit#(2) tempHorBS = tpl_1(interBSfifo.first());
                  Bit#(2) tempVerBS = tpl_2(interBSfifo.first());
                  Bit#(2) tempVerBS = tpl_2(interBSfifo.first());
                  Bit#(3) horBS = (tempHorBS==3 ? 4 : (interLeftNonZeroTransCoeff[blockVer] ? 2 : zeroExtend(tempHorBS)));
                  Bit#(3) horBS = (tempHorBS==3 ? 4 : (interLeftNonZeroTransCoeff[blockVer] ? 2 : zeroExtend(tempHorBS)));
                  Bit#(3) verBS = (tempVerBS==3 ? 4 : (interTopNonZeroTransCoeff[blockHor]&&blockVer!=0 ? 2 : zeroExtend(tempVerBS)));
                  Bit#(3) verBS = (tempVerBS==3 ? 4 : (interTopNonZeroTransCoeff[blockHor]&&blockVer!=0 ? 2 : zeroExtend(tempVerBS)));
                  outfifo.enq(PBbS {bShor:horBS,bSver:verBS});
                  outfifo.enq(PBbS {bShor:horBS,bSver:verBS,blockNum: outBlockNum});
                  interLeftNonZeroTransCoeff <= update(interLeftNonZeroTransCoeff, blockVer, False);
                  interLeftNonZeroTransCoeff <= update(interLeftNonZeroTransCoeff, blockVer, False);
                  interTopNonZeroTransCoeff <= update(interTopNonZeroTransCoeff, blockHor, False);
                  interTopNonZeroTransCoeff <= update(interTopNonZeroTransCoeff, blockHor, False);
                  $display( "Trace Prediction: outputing SkipMB bS %h %h %h %h", outBlockNum, outPixelNum, currMbHor, currMbVer);
                  $display( "Trace Prediction: outputing SkipMB bS %h %h %h %h", outBlockNum, outPixelNum, currMbHor, currMbVer);
               end
               end
            else
            else
Line 613... Line 613...
                  begin
                  begin
                     if(interBSoutput && outChromaFlag==Luma && outPixelNum==0)
                     if(interBSoutput && outChromaFlag==Luma && outPixelNum==0)
                        begin
                        begin
                           interBSoutput <= False;
                           interBSoutput <= False;
                           if(outstatefifo.first() != Inter)
                           if(outstatefifo.first() != Inter)
                              outfifo.enq(tagged PBbS {bShor:(blockHor==0 ? 4 : 3),bSver:(blockVer==0 ? 4 : 3)});
                              outfifo.enq(tagged PBbS {bShor:(blockHor==0 ? 4 : 3),bSver:(blockVer==0 ? 4 : 3),blockNum: outBlockNum});
                           else
                           else
                              begin
                              begin
                                 interBSfifo.deq();
                                 interBSfifo.deq();
                                 Bit#(2) tempHorBS = tpl_1(interBSfifo.first());
                                 Bit#(2) tempHorBS = tpl_1(interBSfifo.first());
                                 Bit#(2) tempVerBS = tpl_2(interBSfifo.first());
                                 Bit#(2) tempVerBS = tpl_2(interBSfifo.first());
                                 Bit#(3) horBS = (tempHorBS==3 ? 4 : 2);
                                 Bit#(3) horBS = (tempHorBS==3 ? 4 : 2);
                                 Bit#(3) verBS = (tempVerBS==3 ? 4 : 2);
                                 Bit#(3) verBS = (tempVerBS==3 ? 4 : 2);
                                 outfifo.enq(tagged PBbS {bShor:horBS,bSver:verBS});
                                 outfifo.enq(tagged PBbS {bShor:horBS,bSver:verBS,blockNum: outBlockNum});
                              end
                              end
                           interLeftNonZeroTransCoeff <= update(interLeftNonZeroTransCoeff, blockVer, True);
                           interLeftNonZeroTransCoeff <= update(interLeftNonZeroTransCoeff, blockVer, True);
                           interTopNonZeroTransCoeff <= update(interTopNonZeroTransCoeff, blockHor, True);
                           interTopNonZeroTransCoeff <= update(interTopNonZeroTransCoeff, blockHor, True);
                           $display( "Trace Prediction: outputing ITBresidual bS %h %h %h %h %h", outChromaFlag, outBlockNum, outPixelNum, currMbHor, currMbVer);
                           $display( "Trace Prediction: outputing ITBresidual bS %h %h %h %h %h", outChromaFlag, outBlockNum, outPixelNum, currMbHor, currMbVer);
                        end
                        end
Line 654... Line 654...
                  begin
                  begin
                     if(interBSoutput && outChromaFlag==Luma && outPixelNum==0)
                     if(interBSoutput && outChromaFlag==Luma && outPixelNum==0)
                        begin
                        begin
                           interBSoutput <= False;
                           interBSoutput <= False;
                           if(outstatefifo.first() != Inter)
                           if(outstatefifo.first() != Inter)
                              outfifo.enq(tagged PBbS {bShor:(blockHor==0 ? 4 : 3),bSver:(blockVer==0 ? 4 : 3)});
                              outfifo.enq(tagged PBbS {bShor:(blockHor==0 ? 4 : 3),bSver:(blockVer==0 ? 4 : 3),blockNum: outBlockNum});
                           else
                           else
                              begin
                              begin
                                 interBSfifo.deq();
                                 interBSfifo.deq();
                                 Bit#(2) tempHorBS = tpl_1(interBSfifo.first());
                                 Bit#(2) tempHorBS = tpl_1(interBSfifo.first());
                                 Bit#(2) tempVerBS = tpl_2(interBSfifo.first());
                                 Bit#(2) tempVerBS = tpl_2(interBSfifo.first());
                                 Bit#(3) horBS = (tempHorBS==3 ? 4 : (interLeftNonZeroTransCoeff[blockVer] ? 2 : zeroExtend(tempHorBS)));
                                 Bit#(3) horBS = (tempHorBS==3 ? 4 : (interLeftNonZeroTransCoeff[blockVer] ? 2 : zeroExtend(tempHorBS)));
                                 Bit#(3) verBS = (tempVerBS==3 ? 4 : (interTopNonZeroTransCoeff[blockHor]&&blockVer!=0 ? 2 : zeroExtend(tempVerBS)));
                                 Bit#(3) verBS = (tempVerBS==3 ? 4 : (interTopNonZeroTransCoeff[blockHor]&&blockVer!=0 ? 2 : zeroExtend(tempVerBS)));
                                 outfifo.enq(tagged PBbS {bShor:horBS,bSver:verBS});
                                 outfifo.enq(tagged PBbS {bShor:horBS,bSver:verBS,blockNum: outBlockNum});
                              end
                              end
                           interLeftNonZeroTransCoeff <= update(interLeftNonZeroTransCoeff, blockVer, False);
                           interLeftNonZeroTransCoeff <= update(interLeftNonZeroTransCoeff, blockVer, False);
                           interTopNonZeroTransCoeff <= update(interTopNonZeroTransCoeff, blockHor, False);
                           interTopNonZeroTransCoeff <= update(interTopNonZeroTransCoeff, blockHor, False);
                           $display( "Trace Prediction: outputing ITBcoeffLevelZeros bS %h %h %h %h %h", outChromaFlag, outBlockNum, outPixelNum, currMbHor, currMbVer);
                           $display( "Trace Prediction: outputing ITBcoeffLevelZeros bS %h %h %h %h %h", outChromaFlag, outBlockNum, outPixelNum, currMbHor, currMbVer);
                        end
                        end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.