Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 907284 Details for
Bug 917591
media-video/handbrake-1.7.0 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
/etc/portage/patches/media-video/ffmpeg-6.1.2/ to compile handbrake-1.8.2
0001-avcodec-dovi_rpu-implement-support-for-profile-10.patch (text/plain), 3.61 KB, created by
mehw
on 2024-10-29 23:43:45 UTC
(
hide
)
Description:
/etc/portage/patches/media-video/ffmpeg-6.1.2/ to compile handbrake-1.8.2
Filename:
MIME Type:
Creator:
mehw
Created:
2024-10-29 23:43:45 UTC
Size:
3.61 KB
patch
obsolete
>From 9aecd717ab9fb45bf57329c5afeaf5e80d2a3004 Mon Sep 17 00:00:00 2001 >From: Niklas Haas <git@haasn.dev> >Date: Fri, 23 Feb 2024 21:06:20 +0100 >Subject: [PATCH] avcodec/dovi_rpu: implement support for profile 10 > >Instead of the nal_prefix, this profile inside wraps the RPU inside an >EMDF container, as specified in ETSI TS 102 366. However, this >DV-specific EMDF container is restricted (by the specification) to >a fixed set of hard-coded parameters, which we can effecitvely treat as >a magic byte sequence. > >Validated and tested using official Dolby sample files, which >I unfortunately cannot share. However, there are public sample files >available at the merge request link below. > >Relevant links: >- https://www.etsi.org/deliver/etsi_ts/102300_102399/102366/01.04.01_60/ts_102366v010401p.pdf >- https://patentimages.storage.googleapis.com/8a/0b/da/28294acaed2182/EP3588964A1.pdf >- https://www.etsi.org/deliver/etsi_ts/103500_103599/103572/01.03.01_60/ts_103572v010301p.pdf >- https://gitlab.com/mbunkus/mkvtoolnix/-/merge_requests/2254 >--- > libavcodec/dovi_rpu.c | 45 ++++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 42 insertions(+), 3 deletions(-) > >diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c >index a6b23f4dd1..529062be30 100644 >--- a/libavcodec/dovi_rpu.c >+++ b/libavcodec/dovi_rpu.c >@@ -174,6 +174,18 @@ static inline int64_t get_se_coef(GetBitContext *gb, const AVDOVIRpuDataHeader * > return 0; /* unreachable */ > } > >+static inline unsigned get_variable_bits(GetBitContext *gb, int n) >+{ >+ unsigned int value = get_bits(gb, n); >+ int read_more = get_bits1(gb); >+ while (read_more) { >+ value = (value + 1) << n; >+ value |= get_bits(gb, n); >+ read_more = get_bits1(gb); >+ } >+ return value; >+} >+ > #define VALIDATE(VAR, MIN, MAX) \ > do { \ > if (VAR < MIN || VAR > MAX) { \ >@@ -200,9 +212,36 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size) > if ((ret = init_get_bits8(gb, rpu, rpu_size)) < 0) > return ret; > >- /* RPU header, common values */ >- nal_prefix = get_bits(gb, 8); >- VALIDATE(nal_prefix, 25, 25); >+ /* Container header */ >+ if (s->dv_profile == 10 /* dav1.10 */) { >+ /* DV inside AV1 re-uses an EMDF container skeleton, but with fixed >+ * values - so we can effectively treat this as a magic byte sequence. >+ * >+ * The exact fields are, as follows: >+ * emdf_version : f(2) = 0 >+ * key_id : f(3) = 6 >+ * emdf_payload_id : f(5) = 31 >+ * emdf_payload_id_ext : var(5) = 225 >+ * smploffste : f(1) = 0 >+ * duratione : f(1) = 0 >+ * groupide : f(1) = 0 >+ * codecdatae : f(1) = 0 >+ * discard_unknown_payload : f(1) = 1 >+ */ >+ const unsigned header_magic = 0x01be6841u; >+ unsigned header, emdf_payload_size; >+ header = get_bits_long(gb, 27); >+ VALIDATE(header, header_magic, header_magic); >+ emdf_payload_size = get_variable_bits(gb, 8); >+ VALIDATE(emdf_payload_size, 6, 512); >+ if (emdf_payload_size * 8 > get_bits_left(gb)) >+ return AVERROR_INVALIDDATA; >+ } else { >+ nal_prefix = get_bits(gb, 8); >+ VALIDATE(nal_prefix, 25, 25); >+ } >+ >+ /* RPU header */ > rpu_type = get_bits(gb, 6); > if (rpu_type != 2) { > av_log(s->logctx, AV_LOG_WARNING, "Unrecognized RPU type " >-- >2.45.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 917591
:
875262
|
875263
|
886545
|
887851
|
887852
|
887875
|
887876
|
887877
|
887878
|
887993
|
889164
|
907281
|
907282
|
907283
| 907284 |
907285
|
907286
|
907287
|
907288
|
907289
|
907290
|
907291
|
907292
|
907293
|
907294
|
907295
|
907296
|
907297
|
907298