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

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [src/] [mkDeblockFilter.bsv] - Diff between revs 60 and 61

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

Rev 60 Rev 61
Line 711... Line 711...
         $display( " Left Vector");
         $display( " Left Vector");
         if(chromaFlagVer==0)
         if(chromaFlagVer==0)
           begin
           begin
             if((blockVer == 3) && (columnToRowState == 3))
             if((blockVer == 3) && (columnToRowState == 3))
               begin
               begin
                 process <= Cleanup;
                 chromaFlagVer <= 1;
 
                 process <= Initialize;
               end
               end
             //check for last macro block
             //check for last macro block
             leftVector.upd({1'b0,blockVer,columnToRowState}, data_out);
             leftVector.upd({1'b0,blockVer,columnToRowState}, data_out);
           end
           end
         else
         else
           begin
           begin
             // Only cleanup a single time after the chroma blocks
             // Only cleanup a single time after the chroma blocks
             if((blockHor == 3) && (blockVer[0] == 1) && (columnToRowState == 3))
             if((blockHor == 3) && (blockVer[0] == 1) && (columnToRowState == 3))
               begin
               begin
 
                 $display( "TRACE Deblocking Filter: horizontal bsFIFO chroma completed");
 
                 chromaFlagVer <= 0;
 
                 Bit#(PicWidthSz) temp = truncate(currMbHor);
 
                 parameterMemReqQ.enq(StoreReq {addr:temp,data:{curr_intra,curr_qpc,curr_qpy}});
 
                 currMb <= currMb+1;
 
                 currMbHor <= currMbHor+1;
 
                 if(currMbVer==picHeight-1 && currMbHor==zeroExtend(picWidth-1))
 
                   begin
                 process <= Cleanup;
                 process <= Cleanup;
               end
               end
 
                 else
 
                   begin
 
                     process <= Passing;
 
                   end
 
               end
             leftVector.upd({1'b1,blockHor[1],blockVer[0],columnToRowState}, data_out);
             leftVector.upd({1'b1,blockHor[1],blockVer[0],columnToRowState}, data_out);
           end
           end
         end
         end
 
 
   endrule
   endrule
Line 927... Line 941...
          end
          end
        blockNum <= 0;
        blockNum <= 0;
        process <= Vertical;// we enter this state to wait for the vertical processing to complete
        process <= Vertical;// we enter this state to wait for the vertical processing to complete
        if(chromaFlagHor == 1)
        if(chromaFlagHor == 1)
          begin
          begin
 
            chromaFlagHor <= 0;
            left_intra <= curr_intra;
            left_intra <= curr_intra;
            left_qpc <= curr_qpc;
            left_qpc <= curr_qpc;
            left_qpy <= curr_qpy;
            left_qpy <= curr_qpy;
          end
          end
 
        else
 
          begin
 
            chromaFlagHor <= 1;
 
          end
        rowToColumnStoreBlock.enq(tuple2(blockNum,0));
        rowToColumnStoreBlock.enq(tuple2(blockNum,0));
      end
      end
    else if(pixelNum == 3)
    else if(pixelNum == 3)
      begin
      begin
        blockNum <= blockNum + 1;
        blockNum <= blockNum + 1;
Line 1110... Line 1129...
       columnToRowStore[columnNumber].enq(w_data);
       columnToRowStore[columnNumber].enq(w_data);
     end
     end
  endrule
  endrule
 
 
 
 
  rule cleanup ( process==Cleanup && currMbHor
  rule cleanup ( process==Cleanup && currMbHor
    $display( "TRACE Deblocking Filter: cleanup %0d", currMb);
    $display( "TRACE Deblocking Filter: cleanup %0d", currMb);
    Bit#(PicWidthSz) currMbHorT = truncate(currMbHor);
 
    if(chromaFlagVer==0)
 
      begin
 
        chromaFlagVer <= 1;
 
        chromaFlagHor <= 1;
 
        process <= Initialize;
 
        $display( "TRACE Deblocking Filter: horizontal bsFIFO luma completed");
 
      end
 
    else
 
      begin
 
        $display( "TRACE Deblocking Filter: horizontal bsFIFO chroma completed");
 
        chromaFlagVer <= 0;
 
        chromaFlagHor <= 0;
 
        process <= Passing;
 
        Bit#(PicWidthSz) temp = truncate(currMbHor);
 
        parameterMemReqQ.enq(StoreReq {addr:temp,data:{curr_intra,curr_qpc,curr_qpy}});
 
        currMb <= currMb+1;
 
        currMbHor <= currMbHor+1;
 
        if(currMbVer==picHeight-1 && currMbHor==zeroExtend(picWidth-1))
 
          begin
 
            outfifo.enq(EndOfFrame);
            outfifo.enq(EndOfFrame);
          end
    process <= Passing;
      end
 
   endrule
   endrule
 
 
   interface Client mem_client_data;
   interface Client mem_client_data;
      interface Get request  = fifoToGet(dataMemReqQ);
      interface Get request  = fifoToGet(dataMemReqQ);
      interface Put response = fifoToPut(dataMemRespQ);
      interface Put response = fifoToPut(dataMemRespQ);
   endinterface
   endinterface
 
 
   interface Client mem_client_parameter;
   interface Client mem_client_parameter;
      interface Get request  = fifoToGet(parameterMemReqQ);
      interface Get request  = fifoToGet(parameterMemReqQ);
 
 
      interface Put response = fifoToPut(parameterMemRespQ);
      interface Put response = fifoToPut(parameterMemRespQ);
   endinterface
   endinterface
 
 
   interface Put ioin  = fifoToPut(fifofToFifo(infifo));
   interface Put ioin  = fifoToPut(fifofToFifo(infifo));
   interface Get ioout = fifoToGet(outfifo);
   interface Get ioout = fifoToGet(outfifo);

powered by: WebSVN 2.1.0

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