foo86 / dcadec

DTS Coherent Acoustics decoder with support for HD extensions
117 stars 40 forks source link

Why did you integrate it into FFmpeg and drop the standalone decoder? #59

Open MarcusJohnson91 opened 7 years ago

MarcusJohnson91 commented 7 years ago

You're tying your wagon to a less-than-healthy horse for no real benefit that I can see?

Also, FFmpeg in general clashes with the unix philosophy, and makes it harder to get what you need done.

If it was a standalone decoder, I could pipe the output PCM into any encoder I wanted, but now I either have to deal with what ffmpeg provides, OR output to a wave file on disk.

But hey, whateve. I've learned a TON about programming my projects, BitIO, etc, so it's not a huge deal.

Nevcairiel commented 7 years ago

ffmpeg can also output to a pipe, so any usage scenarios you used before can be done after as well.

MarcusJohnson91 commented 7 years ago

Technically, but it's still against the unix philosophy.

captainadamo commented 7 years ago

Big deal. The "unix philosophy" is not a religious dogma.

MarcusJohnson91 commented 7 years ago

Neither is FFmpeg. in fact it's code base is horrific.

I mean seriously who the fuck iterates over command line options by using pointer math?

ghost commented 6 years ago

I mean seriously who the fuck iterates over command line options by using pointer math?

How else would you do that, given that C provides command line options as array, which always require pointer math for accessing them?

MarcusJohnson91 commented 6 years ago

Uh, index it as an array and let the compiler do the pointer math?

ghost commented 6 years ago

That's the same. a[b] is just syntactic sugar for *(a+b). Even 2[a] is allowed and equivalent to a[2].

I agree that FFmpeg does some strange things, but dismissing it just because of some minor stylistic issues seems a bit strange. There's much more valid criticism you could make. Besides I looked at some of your code and I found strange or broken things too.

MarcusJohnson91 commented 6 years ago

But it's less confusing.

I don't dismiss FFmpeg because of a few minor stylistic issues, their entire approach is wrong, tools should work together, not be built up together containing everything monolithically IMO.

Not to menton is kind of a huge mess, how many different functions do you need to read a variable amount of bits? I mean seriously.

AFAIK there's at least 3, tho it's been a while so I may be misremembering their names.

One reads one bit, one variant reads I believe up to 25 bits? and another that's more general, and can read up to 64 bits, all in use at the same time, without buffering or anything, sorry dude that's just a badly designed API.

Nevcairiel commented 6 years ago

You should ask the people that make audio/video formats how many different ways to encode variable length data you need. Its probably one more then the number of people you asked.

MarcusJohnson91 commented 6 years ago

Hey! that's me! turns out the answer is that it's really not that difficult.

ghost commented 6 years ago

Does your code support as many media formats at at least the same performance? Link to your library?

MarcusJohnson91 commented 6 years ago

Which one?

I haven't had a decade and dozens of volunteers writing code for me, of course I don't support as many formats as ffmpeg, and that's before you factor in the fact that about a quarter of the formats it supports are entirely useless (one off game specific formats are grody).

Feel free to peruse my profile.