[libbluray-devel] Splitted pg_decode_palette_entry() from pg_decode_palette_update()
hpi1
git at videolan.org
Mon Jun 17 11:39:22 CEST 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Jun 13 11:23:24 2013 +0300| [a0b97fb2c2cb1cd06dde8ea4bc8b5dc75444f7ec] | committer: hpi1
Splitted pg_decode_palette_entry() from pg_decode_palette_update()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=a0b97fb2c2cb1cd06dde8ea4bc8b5dc75444f7ec
---
src/libbluray/decoders/ig.h | 2 +-
src/libbluray/decoders/ig_decode.c | 2 +-
src/libbluray/decoders/ig_decode.h | 2 +-
src/libbluray/decoders/pg.h | 2 +-
src/libbluray/decoders/pg_decode.c | 19 ++++++++++++-------
src/libbluray/decoders/pg_decode.h | 3 ++-
6 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/src/libbluray/decoders/ig.h b/src/libbluray/decoders/ig.h
index 7d242fd..d2d2ffc 100644
--- a/src/libbluray/decoders/ig.h
+++ b/src/libbluray/decoders/ig.h
@@ -1,6 +1,6 @@
/*
* This file is part of libbluray
- * Copyright (C) 2010 hpi1
+ * Copyright (C) 2010 Petri Hintukainen <phintuka at users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/libbluray/decoders/ig_decode.c b/src/libbluray/decoders/ig_decode.c
index 019b30d..1f55cbe 100644
--- a/src/libbluray/decoders/ig_decode.c
+++ b/src/libbluray/decoders/ig_decode.c
@@ -1,6 +1,6 @@
/*
* This file is part of libbluray
- * Copyright (C) 2010 hpi1
+ * Copyright (C) 2010 Petri Hintukainen <phintuka at users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/libbluray/decoders/ig_decode.h b/src/libbluray/decoders/ig_decode.h
index e510abd..9f1c518 100644
--- a/src/libbluray/decoders/ig_decode.h
+++ b/src/libbluray/decoders/ig_decode.h
@@ -1,6 +1,6 @@
/*
* This file is part of libbluray
- * Copyright (C) 2010 hpi1
+ * Copyright (C) 2010 Petri Hintukainen <phintuka at users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/libbluray/decoders/pg.h b/src/libbluray/decoders/pg.h
index cbc9b99..ee83a86 100644
--- a/src/libbluray/decoders/pg.h
+++ b/src/libbluray/decoders/pg.h
@@ -1,6 +1,6 @@
/*
* This file is part of libbluray
- * Copyright (C) 2010 hpi1
+ * Copyright (C) 2010 Petri Hintukainen <phintuka at users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/libbluray/decoders/pg_decode.c b/src/libbluray/decoders/pg_decode.c
index 7e85c54..fca647d 100644
--- a/src/libbluray/decoders/pg_decode.c
+++ b/src/libbluray/decoders/pg_decode.c
@@ -1,6 +1,6 @@
/*
* This file is part of libbluray
- * Copyright (C) 2010 hpi1
+ * Copyright (C) 2010 Petri Hintukainen <phintuka at users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -78,6 +78,16 @@ void pg_decode_composition_object(BITBUFFER *bb, BD_PG_COMPOSITION_OBJECT *p)
}
}
+void pg_decode_palette_entry(BITBUFFER *bb, BD_PG_PALETTE_ENTRY *entry)
+{
+ uint8_t entry_id = bb_read(bb, 8);
+
+ entry[entry_id].Y = bb_read(bb, 8);
+ entry[entry_id].Cr = bb_read(bb, 8);
+ entry[entry_id].Cb = bb_read(bb, 8);
+ entry[entry_id].T = bb_read(bb, 8);
+}
+
/*
* segments
*/
@@ -88,12 +98,7 @@ int pg_decode_palette_update(BITBUFFER *bb, BD_PG_PALETTE *p)
p->version = bb_read(bb, 8);
while (!bb_eof(bb)) {
- uint8_t entry_id = bb_read(bb, 8);
-
- p->entry[entry_id].Y = bb_read(bb, 8);
- p->entry[entry_id].Cr = bb_read(bb, 8);
- p->entry[entry_id].Cb = bb_read(bb, 8);
- p->entry[entry_id].T = bb_read(bb, 8);
+ pg_decode_palette_entry(bb, p->entry);
}
return 1;
diff --git a/src/libbluray/decoders/pg_decode.h b/src/libbluray/decoders/pg_decode.h
index ade166c..49dc3b0 100644
--- a/src/libbluray/decoders/pg_decode.h
+++ b/src/libbluray/decoders/pg_decode.h
@@ -1,6 +1,6 @@
/*
* This file is part of libbluray
- * Copyright (C) 2010 hpi1
+ * Copyright (C) 2010 Petri Hintukainen <phintuka at users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -34,6 +34,7 @@ BD_PRIVATE void pg_decode_composition_descriptor(BITBUFFER *bb, BD_PG_COMPOSITIO
BD_PRIVATE void pg_decode_sequence_descriptor(BITBUFFER *bb, BD_PG_SEQUENCE_DESCRIPTOR *p);
BD_PRIVATE void pg_decode_window(BITBUFFER *bb, BD_PG_WINDOW *p);
BD_PRIVATE void pg_decode_composition_object(BITBUFFER *bb, BD_PG_COMPOSITION_OBJECT *p);
+BD_PRIVATE void pg_decode_palette_entry(BITBUFFER *bb, BD_PG_PALETTE_ENTRY *p);
/*
* segments
More information about the libbluray-devel
mailing list