all repos — mgba @ a42c6aa1f63115ec1851868c5390039ffd55d089

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

a42c6aa1f63115ec1851868c5390039ffd55d089

parent

d9cc9b20ff8d231a15c3b62c85ac4979c24b41d9

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

jump to
M CHANGESCHANGES

@@ -41,6 +41,7 @@ - Util: Fix crash if PNG header fails to write

Misc: - Debugger: Keep track of global cycle count - FFmpeg: Add looping option for GIF/APNG + - FFmpeg: Use range coder for FFV1 to reduce output size - Qt: Renderer can be changed while a game is running - Qt: Add hex index to palette view - Qt: Add transformation matrix info to sprite view
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -383,6 +383,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