Added min/max per block

Change-Id: Ibe48aa43698ec0aff95dbd3b51b9e1fc0bb15385
Added new test

Change-Id: I07cd51236b747c0468095513b0f5b19881ff780a