all repos — mgba @ 42a1f9598479af3173ccac47700cfaa69950baf4

mGBA Game Boy Advance Emulator

FFmpeg: Use range coder for FFV1 to reduce output size
Vicki Pfau vi@endrift.com
Fri, 03 Jul 2020 03:50:12 -0700
commit

42a1f9598479af3173ccac47700cfaa69950baf4

parent

8f616f4a253007d8afd445139ea49a65f9c014bf

2 files changed, 6 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -15,6 +15,7 @@ - Qt: Fix file handle leak on opening an invalid ROM

- 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)
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -378,6 +378,11 @@ strcasecmp(encoder->containerFormat, "mov"))) {

// 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