From patchwork Tue Oct 31 02:05:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 5772 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp3386723jah; Mon, 30 Oct 2017 19:05:33 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QBsUrjry5GM7JbfbNWuH3/obymzyyOD9XyHTY+pe7EvXRAYpsGAhw9scvLDFbQVzdo6EVV X-Received: by 10.28.35.67 with SMTP id j64mr398559wmj.55.1509415532971; Mon, 30 Oct 2017 19:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509415532; cv=none; d=google.com; s=arc-20160816; b=SWwmDExIGkAtW8UhRvwbt89vVqbL9X/3+4BDD7LGi2xG7sanFoThsZo/Ga9VPLWENB IjRzVKzZwlZ3ge3ATQvjAFMGoepD+xDq8y+4pUDrzORwVkUvvb0puPPQnAm/W8MMaio6 NcINnCa1wPHYYedgZIPR3GPPNfwUkz3vAGQRbSoAXPmgYajD1bZQ4dWZdnphTwUDrpP7 ThCt5sxfrCZsRk97kcRta0aD/Rxpe4dVyUyIKnJJy21XKp6QxjHnEYGkM1QaWOWQ9syl 6uNVx+b1q8twniRzTlEQrIe6gN2fhHs0jT7E3R8wLz9EZ+RVXwanVbFP1ioYFLb46iz5 Y/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=WHstKQHp1lP+GzJqXR9NuF7hE2Onulzz3xgDITSRZfg=; b=U+1fwqdPRaTSlIZOs2nqyaGNE6UcTCR5/XGo9ND2cMUm0aXAdOBidd2SF+hPR4Tusj VEZBooVwPAoZ6FluQbjztFRJDphcBv1TsivVfSAJ2D10Pgsx0jzoQVOObSKuBm7HLKgA zXhDGBqVkIApwgN//0jDeluqqcodKYg8uijnne8hKyd6fw7XOzRtnzbsdzgN+TciR3HP 0nei4KKsaiyTyICVdFb2Nv/oNepBnvN2wazYgoH6ulEL2J5DEBxL59Bnt7tXRdEtn3WV Gd/2ITWL/lOsyaTnqmys3BFMIJrLquI/z5372k3ZBW+WCiD/VDHn77Jjt0DHzAfrXPd3 Yegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=HwQsExdX; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q129si525688wme.92.2017.10.30.19.05.32; Mon, 30 Oct 2017 19:05:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=HwQsExdX; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57368689F2A; Tue, 31 Oct 2017 04:05:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8D52C680497 for ; Tue, 31 Oct 2017 04:05:15 +0200 (EET) Received: by mail-io0-f177.google.com with SMTP id j17so31669855iod.5 for ; Mon, 30 Oct 2017 19:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=yXE5CYd+bDh1vphI9ThxARrfZSbkLbhNqcErYE7FTr4=; b=HwQsExdX1lpMRsG77JLwV0LsBK5pPPoiPUVnp5/7/kWYBsirk1OUAqctQb08EJkvWk 8EGuc5qIMBz41NlnQprlU/f8M0gfBpnVzZrCTDwxhYwDXuSdE7kuEC+lfPmt7kfhQYGu qABhUkVXl3xPgzyfH26CXp8WUNffPnj8rHTZRdVGoHGX1SKP7TTIKDiTV0lBUbrA9/qU ILybGZ2WW5MctGaE0w96ktQHpnTF3ZhAVjdavHq23Pl2WXXCaORMSbzelR1iphgNMjvC LLNA76wcplBHyQdd+34O3+KwFEVzRzlIfR1fL05HnZFJYI7Y75F6x8F//v6NeQMXRQrH tjIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yXE5CYd+bDh1vphI9ThxARrfZSbkLbhNqcErYE7FTr4=; b=DhgDJj3n3GFggomk0wUSDQ/T23SYl3WDYYXoELh03kfDB/YAfUK/8fddHi2bBDv9uN kdUshEUt8SXeG9q4vHU+jfWYt6m+5rdybjFT3iaFcnrTlfSoqq1dxrJfF0yTE2PhiQHW g2YR6K+MVYlFWPk5AqF+GgDzSHVvxVY5tvuHXDtAFWYH6rUW30HhLJbxYdSz4XaG8qj9 FmNSlIjF4CNY7jBVe/kTpBHEKK+5Nw+FydsQc1vcbJTr9K89YWRQqd0ehmMjwx5JQCN1 o6MW9sp6WTA5d267TlglK2Lh7jY7giHwrPGIFjyJvsPM/hGwhOx+zD9pNMQfMHE8FCDh B0Zw== X-Gm-Message-State: AMCzsaX7bpiJYXZnsylXMo9XeVYF23wbSarOMIE2nba/NuE+xe9/8wzF H+I+Dd/CpQFYfVSayY1GU0pSyMeKNthlxTwCzSw= X-Received: by 10.107.12.170 with SMTP id 42mr464517iom.268.1509415523720; Mon, 30 Oct 2017 19:05:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.63.101 with HTTP; Mon, 30 Oct 2017 19:05:03 -0700 (PDT) From: Carl Eugen Hoyos Date: Tue, 31 Oct 2017 03:05:03 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavc/dnxhddata: Do not print frame rates with supported profiles X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch is meant to fix ticket #4815: Nobody can maintain the list of frame-rates, the current output primarily leads to confusion instead of helping users. Please comment, Carl Eugen From ab2371ace24d4e2ed99b4f5beb2676433cf15e88 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 31 Oct 2017 02:56:31 +0100 Subject: [PATCH] lavc/dnxhddata: Do not print frame rates with supported profiles. The list is unmaintained, misleading and the frame rates are ignored by all compatible players. --- libavcodec/dnxhddata.c | 50 ++++++++++++++++++------------------------------ libavcodec/dnxhddata.h | 1 - 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index 4462df3..e995449 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -939,96 +939,84 @@ const CIDEntry ff_dnxhd_cid_table[] = { dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 175, 185, 365, 440 }, - { { 24000, 1001 }, { 25, 1 }, { 50, 1 }, { 60000, 1001 } } }, + { 175, 185, 365, 440 } }, { 1237, 1920, 1080, 606208, 606208, 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 115, 120, 145, 240, 290 }, - { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 115, 120, 145, 240, 290 } }, { 1238, 1920, 1080, 917504, 917504, 0, 4, 8, 4, dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1238_run, - { 175, 185, 220, 365, 440 }, - { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 175, 185, 220, 365, 440 } }, { 1241, 1920, 1080, 917504, 458752, DNXHD_INTERLACED, 6, 10, 4, dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 185, 220 }, - { { 25, 1 }, { 30000, 1001 } } }, + { 185, 220 } }, { 1242, 1920, 1080, 606208, 303104, DNXHD_INTERLACED, 4, 8, 3, dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 120, 145 }, - { { 25, 1 }, { 30000, 1001 } } }, + { 120, 145 } }, { 1243, 1920, 1080, 917504, 458752, DNXHD_INTERLACED, 4, 8, 4, dnxhd_1243_luma_weight, dnxhd_1243_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1238_run, - { 185, 220 }, - { { 25, 1 }, { 30000, 1001 } } }, + { 185, 220 } }, { 1244, 1440, 1080, 606208, 303104, DNXHD_INTERLACED, 4, 8, 3, dnxhd_1260_luma_weight, dnxhd_1260_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 120, 145 }, - { { 25, 1 }, { 30000, 1001 } } }, + { 120, 145 } }, { 1250, 1280, 720, 458752, 458752, 0, 6, 10, 4, dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, dnxhd_1250_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, - { 90, 90, 180, 220 }, - { { 24000, 1001 }, { 25, 1 }, { 50, 1 }, { 60000, 1001 } } }, + { 90, 180, 220 } }, { 1251, 1280, 720, 458752, 458752, 0, 4, 8, 4, dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1251_ac_codes, dnxhd_1251_ac_bits, dnxhd_1251_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, - { 90, 90, 110, 180, 220 }, - { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 90, 110, 180, 220 } }, { 1252, 1280, 720, 303104, 303104, 0, 4, 8, 5, dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, - { 60, 60, 75, 120, 145 }, - { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 60, 75, 120, 145 } }, { 1253, 1920, 1080, 188416, 188416, 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 36, 36, 45, 75, 90 }, - { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 36, 45, 75, 90 } }, { 1256, 1920, 1080, 1835008, 1835008, DNXHD_444, 6, 10, 4, dnxhd_1235_luma_weight, dnxhd_1235_luma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 350, 390, 440, 730, 880 }, - { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 350, 390, 440, 730, 880 } }, { 1258, 960, 720, 212992, 212992, 0, 4, 8, 5, dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight, @@ -1056,35 +1044,35 @@ const CIDEntry ff_dnxhd_cid_table[] = { dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 0 }, { { 0 } }, { 57344, 255} }, + { 0 }, { 57344, 255} }, { 1271, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, 0, 6, DNXHD_VARIABLE, 4, dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 0 }, { { 0 } }, { 28672, 255} }, + { 0 }, { 28672, 255} }, { 1272, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, 0, 4, 8, 4, dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1238_run, - { 0 }, { { 0 } }, { 28672, 255} }, + { 0 }, { 28672, 255} }, { 1273, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 0 }, { { 0 } }, { 18944, 255} }, + { 0 }, { 18944, 255} }, { 1274, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 0 }, { { 0 } }, { 5888, 255} }, + { 0 }, { 5888, 255} }, }; int ff_dnxhd_get_cid_table(int cid) @@ -1175,9 +1163,9 @@ void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel) if (!cid->bit_rates[j]) break; - av_log(avctx, loglevel, "Frame size: %dx%d%c; bitrate: %dMbps; pixel format: %s; framerate: %d/%d\n", + av_log(avctx, loglevel, "Frame size: %dx%d%c; bitrate: %dMbps; pixel format: %s\n", cid->width, cid->height, cid->flags & DNXHD_INTERLACED ? 'i' : 'p', cid->bit_rates[j], - cid->bit_depth == 10 ? "yuv422p10" : "yuv422p", cid->frame_rates[j].num, cid->frame_rates[j].den); + cid->bit_depth == 10 ? "yuv422p10" : "yuv422p"); } } } diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h index c96c5e8..6de2c09 100644 --- a/libavcodec/dnxhddata.h +++ b/libavcodec/dnxhddata.h @@ -55,7 +55,6 @@ typedef struct CIDEntry { const uint16_t *run_codes; const uint8_t *run_bits, *run; int bit_rates[5]; ///< Helper to choose variants, rounded to nearest 5Mb/s - AVRational frame_rates[5]; AVRational packet_scale; } CIDEntry; -- 1.7.10.4