HEVC anche nei flussi di programma MPEG: codec e dimensioni dall'SPS
verifica / controlli (push) Canceled after 0s
verifica / prove (push) Canceled after 0s
verifica / installatore (push) Canceled after 0s
verifica / immagine (push) Canceled after 0s

Il lettore MPEG arrivato con il ramo H.264 prendeva le dimensioni solo
dall'SPS dell'H.264; un flusso con il tipo 0x24 nella mappa restava HEVC
senza dimensioni. H265StreamInfo legge l'SPS di un flusso Annex B (dopo la
finestra di conformità), come H264StreamInfo. Senza mappa un HEVC non si
riconosce; i campioni non si elencano, quindi niente miniatura, come per
l'H.264. Due righe in decisioni.md: questa e le scelte dell'unione (HEIC
nella facciata dei codec, fotogrammi H.264 a 16 bit nel convertitore
comune).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-25 11:39:23 +01:00
1 parent 7e5eccd1ec
commit 281b2e5bc3
6 files changed
+115 -9

No files matched your search

@@ -2,6 +2,7 @@ using System.Buffers;
using System.Buffers.Binary;
using System.Globalization;
using Febe.Core.Codecs.H264;
using Febe.Core.Codecs.H265;
namespace Febe.Core.Codecs.Containers;
@@ -524,6 +525,13 @@ public static class MpegPsReader
return;
}
// HEVC only with its stream type (0x24) in the stream map: without one, the H.264 look above has the stream.
if (type == 0x24 && H265StreamInfo.TryPictureSizeFromAnnexB(data, whole, out width, out height))
{
(Codec, Width, Height, VideoDone) = (VideoCodec.Hevc, width, height, true);
return;
}
if (final)
{
Codec = type switch
@@ -620,7 +628,7 @@ public static class MpegPsReader
: Codec.ToString(),
Width = Width,
Height = Height,
AnnexB = Codec == VideoCodec.H264,
AnnexB = Codec is VideoCodec.H264 or VideoCodec.Hevc,
Timescale = ClockRate,
Duration = ticks ?? 0,
};