From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 9FB07407C4 for ; Wed, 2 Mar 2022 11:36:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0005D68B273; Wed, 2 Mar 2022 13:36:37 +0200 (EET) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E9A2568B0E6 for ; Wed, 2 Mar 2022 13:36:31 +0200 (EET) Received: by mail-ej1-f50.google.com with SMTP id d10so3059763eje.10 for ; Wed, 02 Mar 2022 03:36:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=6RSnH14KtoFB4FMblnHLfNoOO3CfmoPttIh3QvQ/Kdg=; b=oXGGxUQJu3aAcuf7EVv5YEX1Vf8VU2HEUg9gHFg5E5T4hR5Y8Wqq6mF0hMCllBx4bp QyUVHbGRf7tzVFSEDVZ9EBiRptMRaDmBRVubFNHVHsTEAUh2QDJu4HF1EKSjP6tTW4+9 PiNF7KG3/0VMw3503KzacyMbKYkVllXOV318SKg8MPJZWMD7Pa9xe0y+2qsPsB88z+aF RbiH9kflS6AYJ9x+GNALyxQ9yawia7na85L6N2JoYvWUQojeAdIbl3ZBjpMcv9Ci+bQD pqkWh/5nQHag9r/oqdt/6N0YJ92QO2I7PujVs1nTZDr3+7CZ4Ti/VVE+BYB3bZb80pB1 HJ4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=6RSnH14KtoFB4FMblnHLfNoOO3CfmoPttIh3QvQ/Kdg=; b=0QTGldCqsB6MGsc5QsN/dnFQlyDQY5+Jtjf+5E/Nhnc3LLTdRz2gG99NM4R3fww4Ig GbN6v6d0BaEjPmkLyiMwbRNfRhI4Y1+4nEY/f6HCPHdQ02RxYHWjUxZ5vKqP0J6oCSgp C/fuSjHMmAa91W2srfwfCpIUA9DdCY8fZ+RNyqMIAGN7ehy8lhQHzTwY9O3pZWVsB1M6 fsxuNHGR6ivf5/JEnndona7ffNZzG3eRlLfMkxVzIdpes0MYgyx0VQ1LPGYTZ52x/Yl4 shIHb7qRnI8npCWP3S4LnVoEaXuKbYz3nff3610mWO7BqBf21wgl0wSMPZL2K04Spag3 bEag== X-Gm-Message-State: AOAM530Nd4UsvUMrYaqHfHfdlnDr/xHhpitCLcj2K9yiHho9NfIU9ftW GWVPhx83UAfUjat2fFZRYXcIeSW4kUg= X-Google-Smtp-Source: ABdhPJzkdzdVr5Rv9yAunVXjVmo/cGwnV9tbzuwkDA/V2/fxLSHImklIf/dcucVZLcU5dmT4gLbUXA== X-Received: by 2002:a17:906:231a:b0:6cf:276a:e838 with SMTP id l26-20020a170906231a00b006cf276ae838mr21671114eja.412.1646220991289; Wed, 02 Mar 2022 03:36:31 -0800 (PST) Received: from localhost.localdomain ([212.15.177.18]) by smtp.gmail.com with ESMTPSA id fq14-20020a1709069d8e00b006da650af5a9sm414736ejc.3.2022.03.02.03.36.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:36:30 -0800 (PST) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Wed, 2 Mar 2022 12:38:05 +0100 Message-Id: <20220302113805.272888-1-onemda@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/mpegvideo_enc: remove direct=1 support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: It seems it does not work properly. Signed-off-by: Paul B Mahol --- libavcodec/mpegvideo_enc.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index c69114ea15..fb36c8e2d8 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1009,7 +1009,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) int encoding_delay = s->max_b_frames ? s->max_b_frames : (s->low_delay ? 0 : 1); int flush_offset = 1; - int direct = 1; if (pic_arg) { pts = pic_arg->pts; @@ -1042,37 +1041,21 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) } } - if (!pic_arg->buf[0] || - pic_arg->linesize[0] != s->linesize || - pic_arg->linesize[1] != s->uvlinesize || - pic_arg->linesize[2] != s->uvlinesize) - direct = 0; - if ((s->width & 15) || (s->height & 15)) - direct = 0; - if (((intptr_t)(pic_arg->data[0])) & (STRIDE_ALIGN-1)) - direct = 0; - if (s->linesize & (STRIDE_ALIGN-1)) - direct = 0; - ff_dlog(s->avctx, "%d %d %"PTRDIFF_SPECIFIER" %"PTRDIFF_SPECIFIER"\n", pic_arg->linesize[0], pic_arg->linesize[1], s->linesize, s->uvlinesize); - i = ff_find_unused_picture(s->avctx, s->picture, direct); + i = ff_find_unused_picture(s->avctx, s->picture, 0); if (i < 0) return i; pic = &s->picture[i]; pic->reference = 3; - if (direct) { - if ((ret = av_frame_ref(pic->f, pic_arg)) < 0) - return ret; - } - ret = alloc_picture(s, pic, direct); + ret = alloc_picture(s, pic, 0); if (ret < 0) return ret; - if (!direct) { + if (1) { if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] && pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] && pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) { -- 2.33.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".