Fix invalid tx_type returned by get_tx_type

1) Check if tx_type is valid in get_tx_type

2) Remove scan_order from rdcost_block_args
When lv_map is on, scan_order depends on tx_type but tx_type is
not decided before entering block_rd_txfm yet. Therefore
assigning a scan_order into rdcost_block_args and then passing it
into block_rd_txfm will cause error.

3) Pass correct index into intra_mode_to_tx_type_context in
get_tx_type

This CL doesn't affect baseline/supertx's stats.

Change-Id: I59eb12aaf1edd9110ce7a92ce61f81bf89cd5920
2 files changed