Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Dev via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: Roman Volkov <riv10d@pm.me>
Subject: [FFmpeg-devel] [PATCH 1/1] avcodec/mediacodecenc: 10-bit pixfmt support
Date: Fri, 20 Feb 2026 23:25:33 +0000
Message-ID: <20260220232505.275887-2-riv10d@pm.me> (raw)
In-Reply-To: <20260220232505.275887-1-riv10d@pm.me>

From: Roman Volkov <riv10d@pm.me>

Signed-off-by: Roman Volkov <riv10d@pm.me>
---
 libavcodec/mediacodecenc.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 507c48df9c..d86a866e6b 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -107,6 +107,7 @@ typedef struct MediaCodecEncContext {
 enum {
     COLOR_FormatYUV420Planar                              = 0x13,
     COLOR_FormatYUV420SemiPlanar                          = 0x15,
+    COLOR_FormatYUVP010                                   = 0x36,
     COLOR_FormatSurface                                   = 0x7F000789,
 };
 
@@ -116,6 +117,7 @@ static const struct {
 } color_formats[] = {
     { COLOR_FormatYUV420Planar,         AV_PIX_FMT_YUV420P },
     { COLOR_FormatYUV420SemiPlanar,     AV_PIX_FMT_NV12    },
+    { COLOR_FormatYUVP010,              AV_PIX_FMT_P010LE  },
     { COLOR_FormatSurface,              AV_PIX_FMT_MEDIACODEC },
 };
 
@@ -123,6 +125,7 @@ static const enum AVPixelFormat avc_pix_fmts[] = {
     AV_PIX_FMT_MEDIACODEC,
     AV_PIX_FMT_YUV420P,
     AV_PIX_FMT_NV12,
+    AV_PIX_FMT_P010LE,
     AV_PIX_FMT_NONE
 };
 
@@ -238,6 +241,12 @@ static void copy_frame_to_buffer(AVCodecContext *avctx, const AVFrame *frame,
 
         dst_linesize[0] = s->width;
         dst_linesize[1] = s->width;
+    } else if (avctx->pix_fmt == AV_PIX_FMT_P010LE) {
+        dst_data[0] = dst;
+        dst_data[1] = dst + s->width * s->height * 2;
+
+        dst_linesize[0] = s->width * 2;
+        dst_linesize[1] = s->width * 2;
     } else {
         av_assert0(0);
     }
-- 
2.53.0


_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

  reply	other threads:[~2026-02-24 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20 23:25 [FFmpeg-devel] [PATCH 0/1] " Dev via ffmpeg-devel
2026-02-20 23:25 ` Dev via ffmpeg-devel [this message]
2026-02-24  9:09 Dev via ffmpeg-devel
2026-02-24  9:09 ` [FFmpeg-devel] [PATCH 1/1] " Dev via ffmpeg-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260220232505.275887-2-riv10d@pm.me \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=riv10d@pm.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git