def _compute_input_padding(size, bcount, bsize, boffset, bstride):
  """Computes the padding for the operation.

  :param size: `[SZH, SZW]` list-like of ints, size of image
  :param bcount: `[BCH, BCW]` list of ints
  :param bsize:
  :param boffset:
  :param bstride:
  :returns: `pad_h, pad_w` for _pad_inputs function, possibly negative.
  :rtype:

  """
  pad_h = [boffset[0],
           boffset[0] + bstride[0] * bcount[0] + bsize[0] - size[0]]
  pad_w = [boffset[1],
           boffset[1] + bstride[1] * bcount[1] + bsize[1] - size[1]]
  return pad_h, pad_w