mirror of https://github.com/mgba-emu/mgba.git
FFmpeg: Use range coder for FFV1 to reduce output size
This commit is contained in:
parent
8f616f4a25
commit
42a1f95984
1
CHANGES
1
CHANGES
|
@ -15,6 +15,7 @@ Other fixes:
|
|||
- Qt: Fix Italian RTC translation (fixes mgba.io/i/1798)
|
||||
- Util: Fix crash if PNG header fails to write
|
||||
Misc:
|
||||
- FFmpeg: Use range coder for FFV1 to reduce output size
|
||||
- Qt: Add per-page scrolling to memory view (fixes mgba.io/i/1795)
|
||||
- Qt: Add setting to display ROM filename in title (closes mgba.io/i/1784)
|
||||
|
||||
|
|
|
@ -378,6 +378,11 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
|
|||
// QuickTime and a few other things require YUV420
|
||||
encoder->video->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
}
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 57
|
||||
if (encoder->video->codec->id == AV_CODEC_ID_FFV1) {
|
||||
av_opt_set(encoder->video->priv_data, "coder", "range_tab", 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (strcmp(vcodec->name, "libx264") == 0) {
|
||||
// Try to adaptively figure out when you can use a slower encoder
|
||||
|
|
Loading…
Reference in New Issue