From patchwork Sun Sep 8 17:27:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51395 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1239157vqu; Sun, 8 Sep 2024 10:39:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhclP5WutTH/yHEIYqKsr7kXMd5aTqWqlUY5Yt7Ul+r9Fhu13m8+zxmcv/T6+ez16aHdaXGAB1PDmHmyt/1VRy@gmail.com X-Google-Smtp-Source: AGHT+IHgsIN2InotRybVgw9IV7WxOIerc9Fu2YdFIcB2XMQAmZyDx/C4iLE/V5Q5EhxiuLiSCtq2 X-Received: by 2002:a17:906:c14e:b0:a8d:495b:c535 with SMTP id a640c23a62f3a-a8d495bc857mr166597666b.11.1725817149545; Sun, 08 Sep 2024 10:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725817149; cv=none; d=google.com; s=arc-20240605; b=AWF23IlnXfrXHUQ+oi5fVClNMtPI5Jbt1vuIGkA531QA4cqMSuJ65wv0D4m+2Cyc2+ 2jtNIvidN9vw/qwQCJuA36VnbjYGQkIAcVtWXE6sPIiPmKXLCJYBys8qp4ax9H+TGy2o z9le8mIVX8FPVhl5lK3jQg1Az1N6qthu039dqu2/Fq8s4RVUeHHCqKgVdC2b0fLKfKjE dZXQh2d6IKpBiP8Wt3h75ZqIAWSpO4nrLGIB5ZcZXPrFcdd+zm7GX1ue+oi6Ca0LFla/ zC5PIg6vvIQ0GnxHR4efIbnYOOCESpmtWi3cdYwcCd9etRiHXJp2C79strKuIAbsu80q TXrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=3EqU3okwfYSXN1HW608XPlD/3rxHIaowU3FKDLEz7bw=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=cbU7N/JSqTZxcWWPX6qOvD7+xm/FxstVJwrMgwmWBokDl2tz6Dm2/rDW334myXFg24 qlddcqB6WTQA+H9NWRZDuqNQuPOcIOohgRT/yYu8GeE4zJBS5y9X4k8W4yN6gTiQuBFs YH3rdFO2Cu6RhX5RIvQDPvFJgfP2yrFUkJMlfzBRP6OMakat1lRvikFQaD5MV9oN9hMA 8SQdioy0GFBIemzzXQ5aeMtv2Ivot1KxiXNsB69Z/Ekk2yieOduh41l/f9GxgU5mdk2u wCrH/uD6DzMUsN0SMvkj3nQYDVD6TCMxUaNNuffL3Qfwto4SyLLwFfcjkw7twmlyuLS1 gKXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@mur.at header.s=dkim2 header.b=hTnb+YOc; 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=mur.at Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25ce9ee2si260482166b.639.2024.09.08.10.39.09; Sun, 08 Sep 2024 10:39:09 -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=@mur.at header.s=dkim2 header.b=hTnb+YOc; 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=mur.at Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A4CE68D57B; Sun, 8 Sep 2024 20:28:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from efeu.mur.at (efeu.mur.at [89.106.208.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4952168D57B for ; Sun, 8 Sep 2024 20:28:46 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 7997D461A4; Sun, 8 Sep 2024 19:28:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1725816525; bh=gEtToGieO2oQyuu1LvMQHoeB7//T7sIGy2ozmlEjdOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hTnb+YOcl3Vsym5iJTcYxNELetO9ablQPG8Rez2/2nQAke1WlZs4BUMVDaaTGxVw9 MQEC1I1cvA66QLdES0T10P0mPTFIEfrvVe8bA1ryyeqZd19Db0PF4XDApB2iFWnyIL FbpzFQukHYj0Cj0RYElfl/n4Ij6mPgdu0975RrrKVanEdknO284voN+ezNzQs6Y6CV v3tPPCVohxr4H0qKwPnEPoKvERAAWawzP9+/89ayIDZDH/SeqJWLU1fww47i6A8Ykx E1coglB+b/zxWqROvA9ew0tHM44pesiIDfSdzXVn2rj+GxZzpqnD4TA6hEs6uaiVpg NCIalOpSbe8742UABtMl97ksI1/1xDGoLwF7uNeuDsodQPPC4arl2WEhDsn/ZdkJXd eMtvAuUyz2wZaQSxcSCb1RPITEfds4DJdYRYXnLUsUvinhifNWqnQX1QG901rfir/0 hunpYz0u5JG0FvjMK+F/BJ/sJ0ViYE+jIbRDsKkt88+CbXdSyA1 From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Sep 2024 19:27:24 +0200 Message-ID: <20240908172725.459656-2-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] libavcodec: implementation of DNxUncompressed decoder 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 Cc: Martin Schitter Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ScjUwkLa2b9y --- Changelog | 1 + doc/general_contents.texi | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/codec_desc.c | 7 + libavcodec/codec_id.h | 1 + libavcodec/dnxucdec.c | 495 ++++++++++++++++++++++++++++++++++++++ libavcodec/parsers.c | 1 + libavcodec/version.c | 2 +- libavcodec/version.h | 2 +- libavformat/mxf.c | 1 + libavformat/mxfdec.c | 21 ++ 12 files changed, 532 insertions(+), 2 deletions(-) create mode 100644 libavcodec/dnxucdec.c diff --git a/Changelog b/Changelog index 583de26..fbda69e 100644 --- a/Changelog +++ b/Changelog @@ -19,6 +19,7 @@ version : - Cropping metadata parsing and writing in Matroska and MP4/MOV de/muxers - Intel QSV-accelerated VVC decoding - MediaCodec AAC/AMR-NB/AMR-WB/MP3 decoding +- DNxUncompressed (SMPTE RDD 50) decoder version 7.0: diff --git a/doc/general_contents.texi b/doc/general_contents.texi index e7cf4f8..1593124 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -619,6 +619,7 @@ library: @item raw DFPWM @tab X @tab X @item raw Dirac @tab X @tab X @item raw DNxHD @tab X @tab X +@itme raw DNxUncompressed @tab @tab X @item raw DTS @tab X @tab X @item raw DTS-HD @tab @tab X @item raw E-AC-3 @tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 75ae377..cfa8fba 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -325,6 +325,7 @@ OBJS-$(CONFIG_DFPWM_DECODER) += dfpwmdec.o OBJS-$(CONFIG_DFPWM_ENCODER) += dfpwmenc.o OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o +OBJS-$(CONFIG_DNXUC_DECODER) += dnxucdec.o OBJS-$(CONFIG_DOLBY_E_DECODER) += dolby_e.o dolby_e_parse.o kbdwin.o OBJS-$(CONFIG_DPX_DECODER) += dpx.o OBJS-$(CONFIG_DPX_ENCODER) += dpxenc.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 563afde..ea8f2a4 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -93,6 +93,7 @@ extern const FFCodec ff_dfa_decoder; extern const FFCodec ff_dirac_decoder; extern const FFCodec ff_dnxhd_encoder; extern const FFCodec ff_dnxhd_decoder; +extern const FFCodec ff_dnxuc_decoder; extern const FFCodec ff_dpx_encoder; extern const FFCodec ff_dpx_decoder; extern const FFCodec ff_dsicinvideo_decoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index a28ef68..2b83ea2 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1952,6 +1952,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("vMix Video"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, + { + .id = AV_CODEC_ID_DNXUC, + .type = AVMEDIA_TYPE_VIDEO, + .name = "dnxuc", + .long_name = NULL_IF_CONFIG_SMALL("DNxUncompressed / SMPTE RDD 50"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + }, { .id = AV_CODEC_ID_LEAD, .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 0ab1e34..27b229b 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -321,6 +321,7 @@ enum AVCodecID { AV_CODEC_ID_EVC, AV_CODEC_ID_RTV1, AV_CODEC_ID_VMIX, + AV_CODEC_ID_DNXUC, AV_CODEC_ID_LEAD, /* various PCM "codecs" */ diff --git a/libavcodec/dnxucdec.c b/libavcodec/dnxucdec.c new file mode 100644 index 0000000..502e736 --- /dev/null +++ b/libavcodec/dnxucdec.c @@ -0,0 +1,495 @@ +/* + * Avid DNxUncomressed / SMPTE RDD 50 demuxer + * Copyright (c) 2024 Martin Schitter + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + This partial implementation of a decoder for DNxUncompressed video data + is based on reverse engineering of output generated by DaVinci Resolve 19 + because the SMPTE RDD 50 specification is unfortunately not freely accessible. + + It's therefor limited by the present export capabilities of Resolve (YUV444 + variants, YUV422 16bit, and alpha support is missing). But also some ffmpeg + shortcomings are affecting the range of available formats (no YUV half and + float pixel formats and filters are provided by ffmpeg until now and RGB half + content always requires an alpha plane). + + A wide range of DNxUncompressed formats are nevertheless already supported: + + - YUV 4:2:2 8-/10-/12-bit + - RGB 8-/10-/12-bit/half/float + +*/ + +#include "avcodec.h" +#include "codec_internal.h" +#include "decode.h" +#include "libavutil/imgutils.h" +#include "thread.h" + +typedef struct DNxUcParseContext { + uint32_t fourcc_tag; + uint32_t width; + uint32_t height; + uint32_t nr_bytes; +} DNxUcParseContext; + +/* +DNxUncompressed frame data comes wrapped in simple metadata +and fourcc markers: + +[0-4] number of raw data (37 bytes header + frame data) +[4-7] fourcc 'pack' +[8-11] unknown value (allways: 0x15) +[12-15] fourcc 'sinf' +[16-19] frame width / line packing size +[20-23] frame hight / nr of lines +[24-27] fourcc pixel format indicator +[28] unknown value (alpha?) +[29-32] nr of bytes in frame data + 8 +[33-36] fourcc 'sdat' +[37-..] frame data +*/ + +static int dnxuc_parse(AVCodecParserContext *s, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size){ + + char fourcc_buf[5]; + const int HEADER_SIZE = 37; + + DNxUcParseContext *pc; + pc = (DNxUcParseContext *) s->priv_data; + + if (!buf_size) { + return 0; + } else if ( buf_size < 37 /* check metadata structure expectations */ + || MKTAG('p','a','c','k') != *(uint32_t*) (buf+4) + || MKTAG('s','i','n','f') != *(uint32_t*) (buf+12) + || MKTAG('s','d','a','t') != *(uint32_t*) (buf+33)){ + av_log(0, AV_LOG_ERROR, "can't read DNxUncompressed metadata.\n"); + *poutbuf_size = 0; + return buf_size; + } + + pc->fourcc_tag = *(uint32_t*)(buf+24); + pc->width = *(uint32_t*)(buf+16); + pc->height = *(uint32_t*)(buf+20); + pc->nr_bytes = *(uint32_t*)(buf+29) - 8; + + if (!avctx->codec_tag) { + av_fourcc_make_string(fourcc_buf, pc->fourcc_tag); + av_log(0, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n", + fourcc_buf, + pc->width, pc->height, + (pc->nr_bytes*8)/(pc->width*pc->height), + pc->nr_bytes); + avctx->codec_tag = pc->fourcc_tag; + } + + if (pc->nr_bytes != buf_size - HEADER_SIZE){ + av_log(avctx, AV_LOG_ERROR, "Insufficient size of data.\n"); + *poutbuf_size = 0; + return buf_size; + } + + *poutbuf = buf + HEADER_SIZE; + *poutbuf_size = pc->nr_bytes; + + return buf_size; +} + +static av_cold int dnxuc_decode_init(AVCodecContext *avctx){ + return 0; +} + + +static int pass_though(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt){ + + /* there is no need to copy as the data already match + * a known pixel format */ + + frame->buf[0] = av_buffer_ref(avpkt->buf); + + if (!frame->buf[0]) { + return AVERROR(ENOMEM); + } + + return av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, + avctx->pix_fmt, avctx->width, avctx->height, 1); +} + +static int float2planes(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt){ + + int ret, x, y, lw; + const size_t sof = 4; + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + lw = frame->width; + + for(y = 0; y < frame->height; y++){ + for(x = 0; x < frame->width; x++){ + memcpy(&frame->data[2][sof*(lw*y + x)], &pkt->data[sof* 3*(lw*y + x)], sof); + memcpy(&frame->data[0][sof*(lw*y + x)], &pkt->data[sof*(3*(lw*y + x) + 1)], sof); + memcpy(&frame->data[1][sof*(lw*y + x)], &pkt->data[sof*(3*(lw*y + x) + 2)], sof); + } + } + return pkt->size; +} + +static int half_add_alpha(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt){ + + /* ffmpeg doesn't provide RGB half bit depth without alpha channel right now + * we simply add an opaque alpha layer as workaround */ + + int ret, x, y, lw; + const size_t soh = 2; + const uint16_t opaque = 0x3c00; + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + lw = frame->width; + + for(y = 0; y < frame->height; y++){ + for(x = 0; x < frame->width; x++){ + memcpy(&frame->data[0][soh*4*(lw*y + x)], &pkt->data[soh*3*(lw*y + x)], soh*3); + memcpy(&frame->data[0][soh*(4*(lw*y + x) + 3)], &opaque, soh); + } + } + return pkt->size; +} + +/* DNxUncompressed utilizes a very dense bitpack representation of 10bit and 12bit pixel data. + +Lines of Image data, which look like in their ordinary 8bit counterpart, contain the most +significant upper bits of the pixel data. These sections alternate with shorter segments in +which the complementary least significant bits of information get packed in a gapless sequence. + ++----------------------+ +----------------------+ +------------------------+ +----------~ +| 8 m.s.bits of R[1] | | 8 m.s.bits of G[1] | | 8 m.s.bits of B[1] | | msb R[2] ... one line ++----------------------+ +----------------------+ +------------------------+ +----------~ + ++---------------------------------------------------------------+ +-----------~ +| +------------+ +------------+ +------------+ +--------------+ | | +--------~ +| | 2 lsb R[1] | | 2 lsb G[1] | | 2 lsb B[1] | | 2 lsb R[2] | | | | G[2]lsb ... LSB bits for line +| +------------+ +------------+ +------------+ +--------------+ | | +--------~ ++---------------------------- one byte ------------------------ + +-----------~ + +next line of MSB bytes... */ + +static int unpack_rg10(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt){ + + int ret, x, y, lw, msp, pack, lsp, p_off; + uint16_t r,g,b; + + if (avctx->width % 4){ + av_log(0, AV_LOG_ERROR, + "Image width has to be dividable by 4 for 10bit RGB DNxUncompressed!\n"); + return AVERROR_EXIT; + } + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + lw = frame->width; + + for(y = 0; y < frame->height; y++){ + for(x = 0; x < frame->width; x++){ + msp = pkt->data[y*3*(lw + lw/4) + 3*x]; + p_off = y*(3*(lw + lw/4)) + 3*lw + 3*x/4; + pack = pkt->data[p_off]; + lsp = (pack >> (3*x%4)*2) & 0x3; + r = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "r: %04x, %02x, %02x, %02x, %d\n", + // r, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/4) + 3*x + 1]; + p_off = y*(3*(lw + lw/4)) + 3*lw + (3*x+1)/4; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+1)%4)*2) & 0x3; + g = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "g: %04x, %02x, %02x, %02x, %d\n", + // g, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/4) + 3*x + 2]; + p_off = y*(3*(lw + lw/4)) + 3*lw + (3*x+2)/4; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+2)%4)*2) & 0x3; + b = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "b: %04x, %02x, %02x, %02x, %d\n\n", + // b, msp, lsp, pack, p_off); + + memcpy(&frame->data[2][2*(y*lw + x)], &r, 2); + memcpy(&frame->data[0][2*(y*lw + x)], &g, 2); + memcpy(&frame->data[1][2*(y*lw + x)], &b, 2); + } + } + return pkt->size; +} + +static int unpack_rg12(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt){ + + int ret, x, y, lw, msp, pack, lsp, p_off; + uint16_t r,g,b; + + if (avctx->width % 2){ + av_log(0, AV_LOG_ERROR, + "Image width has to be dividable by 2 for 12bit RGB DNxUncompressed!\n"); + return AVERROR_EXIT; + } + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + lw = frame->width; + + for(y = 0; y < frame->height; y++){ + for(x = 0; x < frame->width; x++){ + msp = pkt->data[y*3*(lw + lw/2) + 3*x]; + p_off = y*(3*(lw + lw/2)) + 3*lw + 3*x/2; + pack = pkt->data[p_off]; + lsp = (pack >> (3*x%2)*4) & 0xf; + r = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "r: %04x, %02x, %02x, %02x, %d\n", + // r, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/2) + 3*x + 1]; + p_off =y*(3*(lw + lw/2)) + 3*lw + (3*x+1)/2; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+1)%2)*4) & 0xf; + g = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "g: %04x, %02x, %02x, %02x, %d\n", + // g, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/2) + 3*x + 2]; + p_off = y*(3*(lw + lw/2)) + 3*lw + (3*x+2)/2; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+2)%2)*4) & 0xf; + b = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "b: %04x, %02x, %02x, %02x, %d\n\n", + // b, msp, lsp, pack, p_off); + + memcpy(&frame->data[2][2*(y*lw + x)], &r, 2); + memcpy(&frame->data[0][2*(y*lw + x)], &g, 2); + memcpy(&frame->data[1][2*(y*lw + x)], &b, 2); + } + } + return pkt->size; +} + + +static int unpack_y210(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt){ + + int ret, x, y, lw, msp, pack, lsp, p_off; + uint16_t y1, y2, u, v; + + if (avctx->width % 2){ + av_log(0, AV_LOG_ERROR, + "Image width has to be dividable by 2 for 10bit YUV 4:2:2 DNxUncompressed!\n"); + return AVERROR_EXIT; + } + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + lw = frame->width; + + for(y = 0; y < frame->height; y++){ + for(x = 0; x < frame->width; x += 2){ + + p_off = y*(2*(lw + lw/4)) + 2*lw + x/2; + pack = pkt->data[p_off]; + + msp = pkt->data[y*2*(lw + lw/4) + 2*x]; + lsp = pack & 0x3; + u = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, " u: %04x, %02x, %02x, %02x, %d\n", + // u, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/4) + 2*x + 1]; + lsp = (pack >> 2) & 0x3; + y1 = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "y1: %04x, %02x, %02x, %02x, %d\n", + // y1, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/4) + 2*x + 2]; + lsp = (pack >> 4) & 0x3; + v = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, " v: %04x, %02x, %02x, %02x, %d\n", + // v, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/4) + 2*x + 3]; + lsp = (pack >> 6) & 0x3; + y2 = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "y2: %04x, %02x, %02x, %02x, %d\n\n", + // y2, msp, lsp, pack, p_off); + + memcpy(&frame->data[0][2*(y*lw + x)], &y1, 2); + memcpy(&frame->data[0][2*(y*lw + x+1)], &y2, 2); + memcpy(&frame->data[1][2*(y*lw/2 + x/2)], &u, 2); + memcpy(&frame->data[2][2*(y*lw/2 + x/2)], &v, 2); + } + } + return pkt->size; +} + + +static int unpack_y212(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt){ + + int ret, x, y, lw, msp, pack, lsp, p_off; + uint16_t y1, y2, u, v; + + if (avctx->width % 2){ + av_log(0, AV_LOG_ERROR, + "Image width has to be dividable by 2 for 12bit YUV 4:2:2 DNxUncompressed!\n"); + return AVERROR_EXIT; + } + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + lw = frame->width; + + for(y = 0; y < frame->height; y++){ + for(x = 0; x < frame->width; x += 2){ + + p_off = y*(2*(lw + lw/2)) + 2*lw + x; + pack = pkt->data[p_off]; + + msp = pkt->data[y*2*(lw + lw/2) + 2*x]; + lsp = pack & 0xf; + u = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, " u: %04x, %02x, %02x, %02x, %d\n", + // u, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/2) + 2*x + 1]; + lsp = (pack >> 4) & 0xf; + y1 = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "y1: %04x, %02x, %02x, %02x, %d\n", + // y1, msp, lsp, pack, p_off); + + p_off = y*(2*(lw + lw/2)) + 2*lw + x+1; + pack = pkt->data[p_off]; + + msp = pkt->data[y*2*(lw + lw/2) + 2*x + 2]; + lsp = pack & 0xf; + v = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, " v: %04x, %02x, %02x, %02x, %d\n", + // v, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/2) + 2*x + 3]; + lsp = (pack >> 4) & 0xf; + y2 = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "y2: %04x, %02x, %02x, %02x, %d\n\n", + // y2, msp, lsp, pack, p_off); + + memcpy(&frame->data[0][2*(y*lw + x)], &y1, 2); + memcpy(&frame->data[0][2*(y*lw + x+1)], &y2, 2); + memcpy(&frame->data[1][2*(y*lw/2 + x/2)], &u, 2); + memcpy(&frame->data[2][2*(y*lw/2 + x/2)], &v, 2); + } + } + return pkt->size; +} + + +static int dnxuc_decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) { + + char fourcc_buf[5]; + int ret; + + switch (avctx->codec_tag) { + case MKTAG('r','g','0','8'): + avctx->pix_fmt = AV_PIX_FMT_RGB24; + ret = pass_though(avctx, frame, avpkt); + break; + case MKTAG('r','g','1','0'): + avctx->pix_fmt = AV_PIX_FMT_GBRP10LE; + ret = unpack_rg10(avctx, frame, avpkt); + break; + case MKTAG('r','g','1','2'): + avctx->pix_fmt = AV_PIX_FMT_GBRP12LE; + ret = unpack_rg12(avctx, frame, avpkt); + break; + case MKTAG(' ','r','g','h'): + avctx->pix_fmt = AV_PIX_FMT_RGBAF16LE; + ret = half_add_alpha(avctx, frame, avpkt); + break; + case MKTAG(' ','r','g','f'): + avctx->pix_fmt = AV_PIX_FMT_GBRPF32LE; + ret = float2planes(avctx, frame, avpkt); + break; + + case MKTAG('y','2','0','8'): + avctx->pix_fmt = AV_PIX_FMT_UYVY422; + ret = pass_though(avctx, frame, avpkt); + break; + case MKTAG('y','2','1','0'): + avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE; + ret = unpack_y210(avctx, frame, avpkt); + break; + case MKTAG('y','2','1','2'): + avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE; + ret = unpack_y212(avctx, frame, avpkt); + break; + + default: + av_fourcc_make_string(fourcc_buf, avctx->codec_tag); + av_log(0, AV_LOG_ERROR, + "Unsupported DNxUncompressed pixel format variant: '%s'\n", + fourcc_buf); + return AVERROR(ENOSYS); + } + + if (ret < 0) { + av_buffer_unref(&frame->buf[0]); + return ret; + } + + *got_frame = 1; + + return avpkt->size; +} + +const AVCodecParser ff_dnxuc_parser = { + .codec_ids = { AV_CODEC_ID_DNXUC }, + .priv_data_size = sizeof(DNxUcParseContext), + .parser_parse = dnxuc_parse, +}; + +const FFCodec ff_dnxuc_decoder = { + .p.name = "dnxuc", + CODEC_LONG_NAME()"DNxUncompressed (SMPTE RDD 50)", + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_DNXUC, + .init = dnxuc_decode_init, + FF_CODEC_DECODE_CB(dnxuc_decode_frame), + .p.capabilities = AV_CODEC_CAP_FRAME_THREADS, +}; \ No newline at end of file diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c index 5128009..8bfd2db 100644 --- a/libavcodec/parsers.c +++ b/libavcodec/parsers.c @@ -35,6 +35,7 @@ extern const AVCodecParser ff_cri_parser; extern const AVCodecParser ff_dca_parser; extern const AVCodecParser ff_dirac_parser; extern const AVCodecParser ff_dnxhd_parser; +extern const AVCodecParser ff_dnxuc_parser; extern const AVCodecParser ff_dolby_e_parser; extern const AVCodecParser ff_dpx_parser; extern const AVCodecParser ff_dvaudio_parser; diff --git a/libavcodec/version.c b/libavcodec/version.c index 27f9432..c3b576a 100644 --- a/libavcodec/version.c +++ b/libavcodec/version.c @@ -31,7 +31,7 @@ const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; unsigned avcodec_version(void) { - static_assert(AV_CODEC_ID_LEAD == 269 && + static_assert(AV_CODEC_ID_LEAD == 270 && AV_CODEC_ID_PCM_SGA == 65572 && AV_CODEC_ID_ADPCM_XMD == 69683 && AV_CODEC_ID_CBD2_DPCM == 81928 && diff --git a/libavcodec/version.h b/libavcodec/version.h index 8b53586..da2264a 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 11 +#define LIBAVCODEC_VERSION_MINOR 12 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git a/libavformat/mxf.c b/libavformat/mxf.c index a73e40e..35fb73e 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -61,6 +61,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = { { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0E,0x04,0x02,0x01,0x02,0x04,0x01,0x00 }, 16, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD Legacy Avid Media Composer MXF */ + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0E,0x04,0x02,0x01,0x02,0x1E,0x01,0x00 }, 16, AV_CODEC_ID_DNXUC }, /* DNxUncompressed/SMPTE RDD 50 */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC SPS/PPS in-band */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x01 }, 16, AV_CODEC_ID_V210 }, /* V210 */ diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index ac63c0d..dc07e27 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -208,13 +208,18 @@ typedef struct MXFDescriptor { int field_dominance; int channels; int bits_per_sample; + int padding_bits; int64_t duration; /* ContainerDuration optional property */ unsigned int component_depth; + unsigned int color_siting; unsigned int black_ref_level; unsigned int white_ref_level; unsigned int color_range; unsigned int horiz_subsampling; unsigned int vert_subsampling; + unsigned int reversed_byte_order; + unsigned int image_start_offset; + unsigned int image_end_offset; UID *file_descriptors_refs; int file_descriptors_count; UID *sub_descriptors_refs; @@ -1364,6 +1369,12 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int case 0x3212: descriptor->field_dominance = avio_r8(pb); break; + case 0x3213: + descriptor->image_start_offset = avio_rb32(pb); + break; + case 0x3214: + descriptor->image_end_offset = avio_rb32(pb); + break; case 0x3219: avio_read(pb, descriptor->color_primaries_ul, 16); break; @@ -1376,6 +1387,9 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int case 0x3302: descriptor->horiz_subsampling = avio_rb32(pb); break; + case 0x3303: + descriptor->color_siting = avio_r8(pb); + break; case 0x3304: descriptor->black_ref_level = avio_rb32(pb); break; @@ -1385,9 +1399,15 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int case 0x3306: descriptor->color_range = avio_rb32(pb); break; + case 0x3307: + descriptor->padding_bits = avio_rb16(pb); + break; case 0x3308: descriptor->vert_subsampling = avio_rb32(pb); break; + case 0x330B: + descriptor->reversed_byte_order = avio_r8(pb); + break; case 0x3D03: descriptor->sample_rate.num = avio_rb32(pb); descriptor->sample_rate.den = avio_rb32(pb); @@ -1597,6 +1617,7 @@ static const MXFCodecUL mxf_picture_essence_container_uls[] = { { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0c,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000, NULL, 14, J2KWrap }, { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x10,0x60,0x01 }, 14, AV_CODEC_ID_H264, NULL, 15 }, /* H.264 */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x11,0x01,0x00 }, 14, AV_CODEC_ID_DNXHD, NULL, 14 }, /* VC-3 */ + { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x1e,0x01,0x00 }, 14, AV_CODEC_ID_DNXUC, NULL, 14 }, /* DNxUncompressed / SMPTE RDD 50 */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x12,0x01,0x00 }, 14, AV_CODEC_ID_VC1, NULL, 14 }, /* VC-1 */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x14,0x01,0x00 }, 14, AV_CODEC_ID_TIFF, NULL, 14 }, /* TIFF */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x15,0x01,0x00 }, 14, AV_CODEC_ID_DIRAC, NULL, 14 }, /* VC-2 */ From patchwork Sun Sep 8 17:27:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51394 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1236201vqu; Sun, 8 Sep 2024 10:29:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUezdp0sFG8MLluWeDm8ejOIpY0CyjJ3JJkG1c49IIVj70dWWWIo+00n5WwtN+des1zIKWbh6wyCfXwgJA0PeBM@gmail.com X-Google-Smtp-Source: AGHT+IE7DPT1X+T8Yp7SZvYD2LvC18yMqLkaoC+IvJxshgD8AkzHTKH/RJdgxI7emcBHH+2jui3D X-Received: by 2002:a05:6402:2692:b0:5c2:5523:7de9 with SMTP id 4fb4d7f45d1cf-5c3dc77ad2amr2927055a12.1.1725816548340; Sun, 08 Sep 2024 10:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725816548; cv=none; d=google.com; s=arc-20240605; b=b2yAi6ezndnf3RlLPJRhOFaEoLA+KfHAK1g++gicnQJDzV1vwCcijv6JS4OyHe3B4o 5g0iDJhScRVvCr4vHHoxKnNmLfA6lMEnMJOh7dnYoRgNY/iwTZQ0QY/7oLNQhPATGQWk fZgT97/vx2U7zt9gdXzD4p69GXaqMACXCRsYWaIlqEqPfbTs4X6+rJ3mSbVJl39nYm85 gc4crwQTUNDFGuhu0cIYyL7vCYH6TsICjAdqdgd8Z9pSGrkp2ai24bPQVaHhc86C62iW J2uIPU8sBdVU+dMX3hTuooxbFupf6rFE0sNm54Xw9xdmh209EnKJxlS1c//tciwcrAT+ WWIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=bWbeo3uSGN0/oI/g3OcdiXp60EsbgnedW5UU0rD0Yuo=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=M1Ru953C1cIMAn2p+J3z7yFagzcw/fDAS2RrN4msq35ccESSzA0LU8rKtF32feKiyK oLwZKTw5qY/CBD7WTT8nj4TS80HQPy0jXfSvcqUi6PWK4Oc2vMBJk9Lp9NEgXYpt8eM3 6TSxAs1kji6QjpTBxFn35wW6TqPpcFVLenMK1amw7pXM9mJ7mVOy0Srp8IISGXXXIihp ckJrwngjooFgkv2EyA3nEgqfU8bouNjIxm3KCHt3wszhRLqRn2PI2bGov1OVnZfyHQGY xZ3aTcimidgqHRMH83ym1Ah1vr/9vz/4wXmwTX6SMLyVSUd/wAnbFUQDEuwy3DhTkY9m Vs/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@mur.at header.s=dkim2 header.b=fYqMaQkb; 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=mur.at Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebdb5f30si2420189a12.625.2024.09.08.10.29.08; Sun, 08 Sep 2024 10:29:08 -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=@mur.at header.s=dkim2 header.b=fYqMaQkb; 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=mur.at Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8402168DC13; Sun, 8 Sep 2024 20:28:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from efeu.mur.at (efeu.mur.at [89.106.208.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B9E668DABC for ; Sun, 8 Sep 2024 20:28:46 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 01B41461A5; Sun, 8 Sep 2024 19:28:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1725816526; bh=gmk/+Q1yXN8TLfxLIgWlLHdZhxIYon9eMmG4PnmDY2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fYqMaQkb4PoPmEEVAtmjDu2/zpCpgu8eQF1EnPMVX9GZJf3Wt9KP1X2CZMeQYyq/8 TazX2SSkk8rjsuTOsghIp8ic4Y/vr9wevsfN15BLPfnCdpH108Z+I5eCw6bEqezyAW b4Z/JS2QBZfx6PsAcl0R040rBetSjLBpvopCOL53mq2Y/zKtdipzlZV4nRzyI1SQZA Hp4LYw0Dyeez/4E6J/QaE08tZ4qnNk7a4MJMHPqZXAI+b3/zY3DwS0MNbP8t2WnWf1 7/cCO30IU37/0C/V2oAUerPVhobXZHV/XHSHoP7vUIvPiK11/n2H6IPDRxJ8dYCgaF NKjvOMXxeQ5AVqtxoEk0AxbHb8IpXJ9sJ5Y7BxjjshX1g2bt0y62ppXN+bOt7wTiWM qnl1aVpZS8CFqHsY2EVoFgWPcjUdk6/AtXVf+oPqzZp2Hdwlmc/Yhbz/Ta/CXkyDwG QUyMPwNmvyHxF3+7lpwu/2FSBvwYDdFuKlfX40slhkIJvuKNuOz From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Sep 2024 19:27:25 +0200 Message-ID: <20240908172725.459656-3-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] libavcodec/dnxucdec.c: fix displaced bracket 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 Cc: Martin Schitter Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mY/ryPaUD357 --- libavcodec/dnxucdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dnxucdec.c b/libavcodec/dnxucdec.c index 502e736..e9a2157 100644 --- a/libavcodec/dnxucdec.c +++ b/libavcodec/dnxucdec.c @@ -486,7 +486,7 @@ const AVCodecParser ff_dnxuc_parser = { const FFCodec ff_dnxuc_decoder = { .p.name = "dnxuc", - CODEC_LONG_NAME()"DNxUncompressed (SMPTE RDD 50)", + CODEC_LONG_NAME("DNxUncompressed (SMPTE RDD 50)"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_DNXUC, .init = dnxuc_decode_init, From patchwork Sun Sep 8 17:27:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51400 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1322513vqu; Sun, 8 Sep 2024 15:54:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURrwgQN8Cww+TsfW2hmiy6kkRrIUK7VI+jzTN//sSr/PM4A2FUyiASP73loUhjjcl2yjxxBAsAWA0URua2ywPy@gmail.com X-Google-Smtp-Source: AGHT+IFIO0m7lMobfmGDAdkheNTsdb3Ud1JG0HU2J1dJSdpLU44y1AOt4xK9ZSoFrSKAjBK5ltD2 X-Received: by 2002:a05:6512:3a85:b0:52f:cdb0:11c0 with SMTP id 2adb3069b0e04-536587ac225mr5866238e87.21.1725836049489; Sun, 08 Sep 2024 15:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725836049; cv=none; d=google.com; s=arc-20240605; b=Z2u2ZwdCaewHVdrVKJ1JeEr7aqhQZkIsv9D6HbLRd+72BeRXHWim9JzZzDUDe1a8gp lAFzBSzTmZSabx5TW/TZs1xx/OMzSsY3N9kNJRV+4jjuuB2vs/t9yw6dEEtN6zN1sKHn LJK3uTfHWxWyFQ759qSHJUS6kZtTw2RR4LbJ3mrWd4/MERqgT/185+h/drPdl9HxlbdE Y4yXC/DjuKl78YwtS2e8cQiT0HLEQzxho/rR8LH1ALET6X2Zf6DQvcRlFCFKEROL5iK6 OKlMrrIgc43P5D0ALqJsmxTFEPhSNkU4UXWaICSuNcGUPIlll3iTHshv5/uOV8yj96YS rGSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=ZDxDGa02lyeQHlITA6DelHtgK0h1SBhIfkDPMnlRUXs=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=PekxDCBhdM9X2slVRClHLMiw29FM/GUhyo01ykLsPm0HyoAdqYYTMK+6nZNXVPw5iV ks+xzQdeyw2HVtTnJRG3LT3pugbzjdotglw1VcMjdzR1T2E5f7S7Hne1zde7+dmBqMYW Re4ljoSFdte+CYWVzl82lNgCDJfkJoZ6cq1HWWhX5R/xrbLbWxLUQ8H/rG3gHkZ00Ppy Rs1YZ2OKIyhuahZyvkKaOAP9cT6I8fGTMh/7IFlJH8iOIqXE9xfiQVdvhWmQj0w+7Gg9 TnzLlrjMon/9QPpAlNU8lxJ0hM8bKWfTBWLdhizSCp/X2jqv9211cyAKo6CfEzBSzDEZ JMtg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@mur.at header.s=dkim2 header.b=W7ZlznLL; 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=mur.at Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f90641esi1302985e87.500.2024.09.08.15.54.08; Sun, 08 Sep 2024 15:54:08 -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=@mur.at header.s=dkim2 header.b=W7ZlznLL; 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=mur.at Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 339D568DC28; Sun, 8 Sep 2024 20:28:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from efeu.mur.at (efeu.mur.at [89.106.208.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8FFFD68DABC for ; Sun, 8 Sep 2024 20:28:46 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 26F2B461A9; Sun, 8 Sep 2024 19:28:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1725816526; bh=185O1me+P9gRzpGjqgrRQ72K+p/4xs1SxkWTUYMv2zE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W7ZlznLLkaOsYGILpqLs6oNox40mm8psD+J/LUBK8dzM4P4oinCXrjHl7rDH8+i51 zn2pjh4BWk4n1ijLYIgiGdO2tvvsEF9ckHfVrEd4jNdWOBEsg9dQXDflLj4FUdfPhv wNmaw79DaLyl1k+ph/FKolx3ZR+SVmwkWZXo6myaHvjt+juIgtVWdTwh0x82+U1jRx 4h+SUtksJUbJhhNG0mxNnQ+PBf59rCPr35xa8Vo+XsisMHR/Ll6Y5wNG9671er2/7E xd6Su3pCivRXYV210+VlNxQjV7PPeLtKktkvR64R86i2ptitRo/+P398rATnO5ixhi DvL5Nsm5WEsr/5cQoDv1r9xf5O5l/RHzfm7bV7bta+81m0lD2r+9dcUQOjlJpHKt8m 3sYZE2cw0WbPOx1o7p0h0Agy3pyLzcpyIglQoJ0RZlM4oWOCy3zCAIj7+zyt58wdCf n46M1QX6BlV/ZXl96+cmuCd+4UWJt4IFZUCmyjtg1o0uD/hBe0E From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Sep 2024 19:27:26 +0200 Message-ID: <20240908172725.459656-4-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] libavcodec/dnxucdec.c: fix missing newline at EOF 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 Cc: Martin Schitter Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HiFkrslDC1t8 --- libavcodec/dnxucdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dnxucdec.c b/libavcodec/dnxucdec.c index e9a2157..455c374 100644 --- a/libavcodec/dnxucdec.c +++ b/libavcodec/dnxucdec.c @@ -492,4 +492,4 @@ const FFCodec ff_dnxuc_decoder = { .init = dnxuc_decode_init, FF_CODEC_DECODE_CB(dnxuc_decode_frame), .p.capabilities = AV_CODEC_CAP_FRAME_THREADS, -}; \ No newline at end of file +};