We've scratched our heads over DS lots. I think there were a few possible physical issues, and a few temperamental ones, and they have blurred a bit as he's got older.
He was 10 weeks prem, so he (and his twin) were weaned at 6 mo actual - which meant purees not BLW. They were both quite slow to get finger foods, so he never really did that thing of sucking at/playing with food - he just wanted it in his mouth NOW, either by me spooning it in, or once he could hold it himself, shovelling it in. He is the only person I know who eats toast sideways - literally all in, regardless of geometry!
The paed said that sensitivity to textures is quite common in premmies, so the sudden pulling food out of his mouth, refusing meats etc seems to be related to that. He was also reflux vomity and possibly lactose intolerant for many months when he was little, so it's possible food/swallowing has some negative connotations for him also.
On the other hand, his sister is obviously the same age, but much more relaxed around meal times, and that's just down to temperament. DS will scream with rage, bang his head in his high chair, hurl food or sippy cups actually they both do that etc etc. Some of this may be related to physical issues, but a lot of it is just his personality - he did the same when I refused to give him my iPhone when he was in the bath yesterday
.
The eating better outside the house thing has baffled me too - it can't be because we're more relaxed, because sometimes I find it utterly terrifying! It could well be copying more people around him, as he does eat well around friends' babies, and nursery rarely report a problem. It could be that he tends to like more highly seasoned food than he usually gets at home. Or it could just be the Law of Sod, which also works at home - don't have quite enough of anything, and they'll love it. Rely on a meal, and they'll hate it!
Any kind of cold/cough/teeth issue sends him back to Square One too. So I'm just trying to accept that there will be days and weeks when he eats loads, days when he will try things, and days when everything will be POISON! Trying to maintain a state of Zen-like calm about it is not easy though!