Refactor repeated code for ext-inter compound type search
Refactor repeated code for ext-inter compound type search

BUG=aomedia:442

Change-Id: I1919da0dc36ac68cd8ad633335af96dbee4a6c0a

GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom