The amv one probably looks suspicious, but since it's an intra-only codec, I couldn't possibly imagine what it would use the edge for, and the vsynth fate result doesn't change, so it's probably OK.tags/n2.8
| @@ -674,9 +674,11 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) | |||||
| case AVMEDIA_TYPE_VIDEO: | case AVMEDIA_TYPE_VIDEO: | ||||
| if(!ist->dec) | if(!ist->dec) | ||||
| ist->dec = avcodec_find_decoder(dec->codec_id); | ist->dec = avcodec_find_decoder(dec->codec_id); | ||||
| #if FF_API_EMU_EDGE | |||||
| if (av_codec_get_lowres(dec)) { | if (av_codec_get_lowres(dec)) { | ||||
| dec->flags |= CODEC_FLAG_EMU_EDGE; | dec->flags |= CODEC_FLAG_EMU_EDGE; | ||||
| } | } | ||||
| #endif | |||||
| ist->resample_height = ist->dec_ctx->height; | ist->resample_height = ist->dec_ctx->height; | ||||
| ist->resample_width = ist->dec_ctx->width; | ist->resample_width = ist->dec_ctx->width; | ||||
| @@ -2577,11 +2577,15 @@ static int stream_component_open(VideoState *is, int stream_index) | |||||
| } | } | ||||
| av_codec_set_lowres(avctx, stream_lowres); | av_codec_set_lowres(avctx, stream_lowres); | ||||
| #if FF_API_EMU_EDGE | |||||
| if(stream_lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; | if(stream_lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; | ||||
| #endif | |||||
| if (fast) | if (fast) | ||||
| avctx->flags2 |= AV_CODEC_FLAG2_FAST; | avctx->flags2 |= AV_CODEC_FLAG2_FAST; | ||||
| #if FF_API_EMU_EDGE | |||||
| if(codec->capabilities & AV_CODEC_CAP_DR1) | if(codec->capabilities & AV_CODEC_CAP_DR1) | ||||
| avctx->flags |= CODEC_FLAG_EMU_EDGE; | avctx->flags |= CODEC_FLAG_EMU_EDGE; | ||||
| #endif | |||||
| opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec); | opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec); | ||||
| if (!av_dict_get(opts, "threads", NULL, 0)) | if (!av_dict_get(opts, "threads", NULL, 0)) | ||||
| @@ -224,9 +224,11 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, | |||||
| av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift); | av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift); | ||||
| #if FF_API_EMU_EDGE | |||||
| //CODEC_FLAG_EMU_EDGE have to be cleared | //CODEC_FLAG_EMU_EDGE have to be cleared | ||||
| if(s->avctx->flags & CODEC_FLAG_EMU_EDGE) | if(s->avctx->flags & CODEC_FLAG_EMU_EDGE) | ||||
| return AVERROR(EINVAL); | return AVERROR(EINVAL); | ||||
| #endif | |||||
| if ((avctx->height & 15) && avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) { | if ((avctx->height & 15) && avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) { | ||||
| av_log(avctx, AV_LOG_ERROR, | av_log(avctx, AV_LOG_ERROR, | ||||
| @@ -1610,7 +1610,11 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, | |||||
| s->lambda = 0; | s->lambda = 0; | ||||
| }//else keep previous frame's qlog until after motion estimation | }//else keep previous frame's qlog until after motion estimation | ||||
| if (s->current_picture->data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) { | |||||
| if (s->current_picture->data[0] | |||||
| #if FF_API_EMU_EDGE | |||||
| && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE) | |||||
| #endif | |||||
| ) { | |||||
| int w = s->avctx->width; | int w = s->avctx->width; | ||||
| int h = s->avctx->height; | int h = s->avctx->height; | ||||
| @@ -453,7 +453,9 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx) | |||||
| Wmv2Context *const w = avctx->priv_data; | Wmv2Context *const w = avctx->priv_data; | ||||
| int ret; | int ret; | ||||
| #if FF_API_EMU_EDGE | |||||
| avctx->flags |= CODEC_FLAG_EMU_EDGE; | avctx->flags |= CODEC_FLAG_EMU_EDGE; | ||||
| #endif | |||||
| if ((ret = ff_msmpeg4_decode_init(avctx)) < 0) | if ((ret = ff_msmpeg4_decode_init(avctx)) < 0) | ||||
| return ret; | return ret; | ||||