libhevcenc: deblk sao low res race condition

While encoding inputs for size 64 x ht for ht > 64, there is a possible
race condition. Before performing deblocking/sao for current CTB, its
top right CTB is checked for its deblocking/sao completion. This can be
skipped for last CTB of a row, provided you have atleast 2 CTB's per row.
The skip is happening for rows with single CTB as well. This is corrected.

Test: hevcenc -c vid_enc_cfg.txt --src_width 64 --src_height 512 \
--input night_64x512.yuv --num_cores 4
Bug: 135516662

Change-Id: Ifed1ae25e5e460cb59d84533e5ad87730ebb3395
1 file changed