Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec: add APV encoder using liboapv
Date: Wed, 30 Apr 2025 11:42:31 -0300
Message-ID: <dbabd700-4641-4d3a-9c3a-9bf1c9fbd08d@gmail.com> (raw)
In-Reply-To: <007b01dbb9d8$b79d85b0$26d89110$@samsung.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1898 bytes --]

On 4/30/2025 11:03 AM, Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff 
Engineer/Samsung Electronics wrote:
>> -----Original Message-----
>> From: ffmpeg-devel<ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of James
>> Almer
>> Sent: środa, 30 kwietnia 2025 02:40
>> To:ffmpeg-devel@ffmpeg.org
>> Subject: [FFmpeg-devel] [PATCH] avcodec: add APV encoder using liboapv
>>
>> From: Dawid Kozinski<d.kozinski@samsung.com>
>>
>> Co-authored-by: James Almer<jamrial@gmail.com>
>> Signed-off-by: James Almer<jamrial@gmail.com>
>> ---
>> Touched up Dawid's patch to fix several issues. The most important one
> being
>> the image rescaling code that's out of place in an encoder.
>> liboapv does not seem to properly support 12bit content yet (Which is why
> the
>> scaling code was added, to reduce the input to 10bit), so i removed it
>> altogether. Same with all the references to GRAY, 420P, A444P, and Y210,
> which
>> are also not supported.
>>
> Thank you for the review and your changes. We are aware that the encoder is
> not the best place for data rescaling. However, the oapve_encode() function
> requires data which size is a multiple of 16. Any suggestions for resolving
> this problem?

I allocated the oapv_imgb_t with dimensions aligned to a multiple of 16. 
The input frame data is then copied to it, leaving the padding zeroed. A 
variation of your attempt, like this:

     imgb->aw[i] = FFALIGN(imgb->w[i], OAPV_MB_W);
     imgb->s[i] = imgb->aw[i] * OAPV_CS_GET_BYTE_DEPTH(cs);
     imgb->ah[i] = FFALIGN(imgb->h[i], OAPV_MB_H);

     imgb->padr[i] = imgb->aw[i] - imgb->w[i];
     imgb->padb[i] = imgb->ah[i] - imgb->h[i];

     imgb->bsize[i] = imgb->s[i] * imgb->ah[i];
     imgb->a[i] = imgb->baddr[i] = av_mallocz(imgb->bsize[i]);

Where imgb->w[i] and imgb->h[i] are the actual (not necessarily multiple 
of 16) image plane dimensions.


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

      reply	other threads:[~2025-04-30 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250430004031eucas1p1b66ae7108a5ccfdccf8a3e6a9de4bd66@eucas1p1.samsung.com>
2025-04-30  0:40 ` James Almer
2025-04-30 14:03   ` Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics
2025-04-30 14:42     ` James Almer [this message]

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=dbabd700-4641-4d3a-9c3a-9bf1c9fbd08d@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /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