Closed Nevcairiel closed 8 years ago
Tested by fate-rv20-1239, currently failing of course, just in case anyone wonders.
Delete lowres
The best solution. Or just remove the tests and let michaelni fix it later. He wants to keep it, he fixes it, simple.
Fix ffmpeg.c somehow
ffmpeg.c could just apply lowres manually, which is relatively sane, given that AVCodec.max_lowres indicates lowres support sufficiently.
Possible solutions: Export coded w/h like michaelni suggested (ugly just for lowres)
its ugly just for lowres, but if you think of the 2 width/height sets as full stored and cropped i dont see that as ugly. This would also allow the cropped resolution to be exported and displayed
Using some fields for cropping probably makes sense, but for lowres, it kind of defeats the point of codecpar.
That said:
Export coded w/h like michaelni suggested (ugly just for lowres)
A patch exists for this, might be useful for cropping. Is very
Fix ffmpeg.c somehow
How much work is this? I wager a lot, to the extent that it may not be worth it at this point in time? Unless you want to put off merging codecpar because of a shitty feature nobody but certain devs use, and is only for very old codecs.
Belete lowres
My preference, but, realistically, is politically impossible because for some reason certain FFmpeg developers defend it to the death, for some reason I really can't fathom.
Another option is to make the coded_*
fields non-publically available, I suppose, and work on fixing ffmpeg.c in an ongoing manner. This is possible because sizeof(AVCodecParamaters)
is not part of the public ABI or API, and is documented as such.
Am I missing something else? :crying_cat_face:
On Mon, Apr 04, 2016 at 01:11:25PM -0700, Derek Buitenhuis wrote:
Fix ffmpeg.c somehow
How much work is this? I wager a lot, to the extent that it may not be worth it at this point in time? Unless you want to put off merging codecpar because of a shitty feature nobody but certain devs use, and is only for very old codecs.
I dont know how much work it would be, the width/height from the demuxer would need to be compansated by lowres
the problem is that this breaks API
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because microsoft did it is even more stupid. If everything ms did were stupid they would be bankrupt already.
Fixed.
For lowres decoding, ffmpeg.c relies on the demuxer giving it "lowres'ed" width/height, otherwise it sets up its video graph with the original width/height, and any lowres decoding afterwards would get upscaled again because ffmpeg.c is just this inflexible.
Which means, even if lowres is forcefully disabled in avformat, it still screws everything up, because ffmpeg.c then has the wrong resolution.
Possible solutions: