Actually the allocation of delegates favors Obama. The Democrats allocate delegates proportionally within each state senatorial district of which there are 31. The senate districts are redrawn each decade based on the census and are pretty close to having equal population at the time they were drawn. The allocation of delegates depends on recent voting trends in those districts. Districts that have high historical turnout in elections for congress, governor or president are rewarded with more delegates as are districts that vote for the Democrat candidate in those elections. Many of the districts where Hillary is expected to win have low voter turnout largely due to large numbers of non-citizens (legal and illegal) who can't vote. The districts that are likely to go heavily for Obama also have disproportional numbers of delegates due to their heavy support of Democrat candidates in previous races. It is hillarious to find out that Hillary's campaign was unaware of the Texas allocation process prior to last week.
The Republicans have a somwhat simpler delegate allocation process. Each congressional district, of which there are currently 33, has 3 delegates, and they are allocated proportionally to candidates more than 20% of the vote in the district but having less than a majority. If a canidate gets a majority in a congressional district, that candidate wins all 3 of the delegates. There are 41 additional delegates that are allocated statewide. They are winner take all if a candidate gets a majority of the vote state wide, but proportionally among those getting at least 20 percent state wide if no candidate has a majority.