anchor.diff:              tmp[i] = matrix[i][0];
            end
         end
  +
  +      // 2D Transform
         let x = satd_1d(tmp);
  +
  +      // Sum of row
         Bit#(16) sum = 0;
   
         for(Integer i = 0; i < 8; i = i + 1) begin
  
positive.code:          sum = sum + zExtend(pack(abs(v)));
        end
  
        fifo_out.enq(sum);
     endrule
  
     rule do_1d(fifo_inp.notEmpty());
  
negative.code: 
  interface ISatd8;
     interface Put#(Vector#(8, Bit#(9))) inp;
     interface Get#(Bit#(19)) oup;
  endinterface
  
  interface ISatd8x2;
     interface Put#(Vector#(16, Bit#(9))) inp;
     interface Get#(Vector#(2, Bit#(19))) oup;
  endinterface
  
  function Vector#(8, Bit#(na)) satd_1d(Vector#(8, Bit#(n)) x)
  