[FFmpeg-devel] [PATCH] Add support for AFDs in H.264
Michael Niedermayer
michaelni
Mon Jan 17 02:04:21 CET 2011
On Thu, Jan 13, 2011 at 04:06:49PM -0800, Kieran Kunhya wrote:
> Patch update after review by Ronald on IRC. (yes really, an ffmpeg patch review on irc...)
> h264.h | 1 +
> h264_sei.c | 26 ++++++++++++++++++++++++++
> 2 files changed, 27 insertions(+)
> 587cbd31499accc8ddbff078e37c90c6231ddb2f 0001-Add-support-for-AFDs-to-H.264.patch
> From 077e69784d8d84e5b1746f005258d71f8ecb3ef0 Mon Sep 17 00:00:00 2001
> From: Kieran Kunhya <kieran at kunhya.com>
> Date: Fri, 14 Jan 2011 00:01:31 +0000
> Subject: [PATCH] Add support for AFDs in H.264.
>
> ---
> libavcodec/h264.h | 1 +
> libavcodec/h264_sei.c | 26 ++++++++++++++++++++++++++
> 2 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/h264.h b/libavcodec/h264.h
> index 7158d97..d44935e 100644
> --- a/libavcodec/h264.h
> +++ b/libavcodec/h264.h
> @@ -133,6 +133,7 @@ enum {
> typedef enum {
> SEI_BUFFERING_PERIOD = 0, ///< buffering period (H.264, D.1.1)
> SEI_TYPE_PIC_TIMING = 1, ///< picture timing
> + SEI_TYPE_USER_DATA_REGISTERED = 4, ///< registered user data
> SEI_TYPE_USER_DATA_UNREGISTERED = 5, ///< unregistered user data
> SEI_TYPE_RECOVERY_POINT = 6 ///< recovery point (frame # to decoder sync)
> } SEI_Type;
> diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
> index 195ea28..3e0c37a 100644
> --- a/libavcodec/h264_sei.c
> +++ b/libavcodec/h264_sei.c
> @@ -95,6 +95,28 @@ static int decode_picture_timing(H264Context *h){
> return 0;
> }
>
> +static int decode_registered_user_data(H264Context *h, int size){
> + MpegEncContext * const s = &h->s;
> + uint8_t flag;
> +
> + if(size == 9){
> + /* many variations of country and provider code for AFDs so ignore them */
> + skip_bits(&s->gb, 8); //itu_t_t35_country_code
> + skip_bits(&s->gb, 16); //itu_t_t35_provider_code
> + if(get_bits_long(&s->gb, 32) == MKBETAG('D', 'T', 'G', '1')){
AV_RL32("DTG1")
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110117/a87a5d45/attachment.pgp>
More information about the ffmpeg-devel
mailing list