mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/frame_thread_encoder: Check the private option for huffy's context modelling
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
5b0d4c247a
commit
1a2d6055be
|
@ -136,9 +136,15 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
|
||||||
if (avctx->codec_id == AV_CODEC_ID_HUFFYUV ||
|
if (avctx->codec_id == AV_CODEC_ID_HUFFYUV ||
|
||||||
avctx->codec_id == AV_CODEC_ID_FFVHUFF) {
|
avctx->codec_id == AV_CODEC_ID_FFVHUFF) {
|
||||||
int warn = 0;
|
int warn = 0;
|
||||||
|
int context_model = 0;
|
||||||
|
AVDictionaryEntry *con = av_dict_get(options, "context", NULL, AV_DICT_MATCH_CASE);
|
||||||
|
|
||||||
|
if (con && con->value)
|
||||||
|
context_model = atoi(con->value);
|
||||||
|
|
||||||
if (avctx->flags & AV_CODEC_FLAG_PASS1)
|
if (avctx->flags & AV_CODEC_FLAG_PASS1)
|
||||||
warn = 1;
|
warn = 1;
|
||||||
else if(avctx->context_model > 0) {
|
else if(context_model > 0) {
|
||||||
AVDictionaryEntry *t = av_dict_get(options, "non_deterministic",
|
AVDictionaryEntry *t = av_dict_get(options, "non_deterministic",
|
||||||
NULL, AV_DICT_MATCH_CASE);
|
NULL, AV_DICT_MATCH_CASE);
|
||||||
warn = !t || !t->value || !atoi(t->value) ? 1 : 0;
|
warn = !t || !t->value || !atoi(t->value) ? 1 : 0;
|
||||||
|
|
Loading…
Reference in New Issue