The first operation sounds like a max pooling op.
The latter is quite undefined and I would guess you might be able to unfold the input and perform your operations via a matmul and additional operations, if needed.