From 84d3fe84b64280221f3e478c57c70f3aedcb1491 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 6 Aug 2003 01:06:30 +0000 Subject: [PATCH] putbits removed because of licensing concerns. Code was moved back to the plugins it was derived from. Original commit message from CVS: putbits removed because of licensing concerns. Code was moved back to the plugins it was derived from. --- libs/gst/Makefile.am | 4 +- libs/gst/putbits/Makefile.am | 10 ---- libs/gst/putbits/putbits.c | 117 ------------------------------------------- libs/gst/putbits/putbits.h | 78 ----------------------------- 4 files changed, 2 insertions(+), 207 deletions(-) delete mode 100644 libs/gst/putbits/Makefile.am delete mode 100644 libs/gst/putbits/putbits.c delete mode 100644 libs/gst/putbits/putbits.h diff --git a/libs/gst/Makefile.am b/libs/gst/Makefile.am index 5363897..f4d1e34 100644 --- a/libs/gst/Makefile.am +++ b/libs/gst/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = bytestream control getbits putbits +SUBDIRS = bytestream control getbits -DIST_SUBDIRS = bytestream control getbits putbits +DIST_SUBDIRS = bytestream control getbits diff --git a/libs/gst/putbits/Makefile.am b/libs/gst/putbits/Makefile.am deleted file mode 100644 index 5e154c9..0000000 --- a/libs/gst/putbits/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -librarydir = $(libdir)/gstreamer-@GST_MAJORMINOR@ - -library_LTLIBRARIES = libgstputbits.la - -libgstputbitsincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/putbits -libgstputbitsinclude_HEADERS = putbits.h - -libgstputbits_la_SOURCES = putbits.c -libgstputbits_la_CFLAGS = $(GST_CFLAGS) -funroll-all-loops -finline-functions -ffast-math -libgstputbits_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/libs/gst/putbits/putbits.c b/libs/gst/putbits/putbits.c deleted file mode 100644 index 572f19f..0000000 --- a/libs/gst/putbits/putbits.c +++ /dev/null @@ -1,117 +0,0 @@ -/* putbits.c, bit-level output */ - -/* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */ - -/* - * Disclaimer of Warranty - * - * These software programs are available to the user without any license fee or - * royalty on an "as is" basis. The MPEG Software Simulation Group disclaims - * any and all warranties, whether express, implied, or statuary, including any - * implied warranties or merchantability or of fitness for a particular - * purpose. In no event shall the copyright-holder be liable for any - * incidental, punitive, or consequential damages of any kind whatsoever - * arising from the use of these programs. - * - * This disclaimer of warranty extends to the user of these programs and user's - * customers, employees, agents, transferees, successors, and assigns. - * - * The MPEG Software Simulation Group does not represent or warrant that the - * programs furnished hereunder are free of infringement of any third-party - * patents. - * - * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware, - * are subject to royalty fees to patent holders. Many of these patents are - * general enough such that they are unavoidable regardless of implementation - * design. - * - */ - -#include -#include -#include "putbits.h" -#include -#include - -/* initialize buffer, call once before first putbits or alignbits */ -void gst_putbits_init(gst_putbits_t *pb) -{ - pb->outcnt = 8; - pb->bytecnt = 0; - pb->outbase = 0; -} - -void gst_putbits_new_empty_buffer(gst_putbits_t *pb, int len) -{ - pb->outbfr = pb->outbase = malloc(len); - pb->temp = 0; - pb->len = len; - pb->newlen = 0; - pb->outcnt = 8; -} - -void gst_putbits_new_buffer(gst_putbits_t *pb, unsigned char *buffer, int len) -{ - pb->outbfr = buffer; - pb->temp = 0; - pb->outcnt = 8; - pb->bytecnt = 0; - pb->len = len; -} - -/* write rightmost n (0<=n<=32) bits of val to outfile */ -void gst_putbits(gst_putbits_t *pb, int val, int n) -{ - int i; - unsigned int mask; - - /*printf("putbits: %p %08x %d %d %d\n", pb, val, n, pb->outcnt, pb->newlen); */ - mask = 1 << (n-1); /* selects first (leftmost) bit */ - - for (i=0; itemp <<= 1; - - if (val & mask) - pb->temp|= 1; - - mask >>= 1; /* select next bit */ - pb->outcnt--; - - if (pb->outcnt==0) /* 8 bit buffer full */ - { - pb->len--; - pb->newlen++; - *(pb->outbfr++) = pb->temp; - pb->outcnt = 8; - pb->bytecnt++; - } - } -} - -/* zero bit stuffing to next byte boundary (5.2.3, 6.2.1) */ -void gst_putbits_align(gst_putbits_t *pb) -{ - if (pb->outcnt!=8) - gst_putbits(pb, 0, pb->outcnt); -} - -/* return total number of generated bits */ -int gst_putbits_bitcount(gst_putbits_t *pb) -{ - return 8*pb->bytecnt + (8-pb->outcnt); -} - -static gboolean -plugin_init (GModule *module, GstPlugin *plugin) -{ - gst_plugin_set_longname (plugin, "Accelerated routines for putting bits into a data stream"); - return TRUE; -} - -GstPluginDesc plugin_desc = { - GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "gstputbits", - plugin_init -}; diff --git a/libs/gst/putbits/putbits.h b/libs/gst/putbits/putbits.h deleted file mode 100644 index 10954b9..0000000 --- a/libs/gst/putbits/putbits.h +++ /dev/null @@ -1,78 +0,0 @@ -/* putbits.h, bit-level output */ - -/* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */ - -/* - * Disclaimer of Warranty - * - * These software programs are available to the user without any license fee or - * royalty on an "as is" basis. The MPEG Software Simulation Group disclaims - * any and all warranties, whether express, implied, or statuary, including any - * implied warranties or merchantability or of fitness for a particular - * purpose. In no event shall the copyright-holder be liable for any - * incidental, punitive, or consequential damages of any kind whatsoever - * arising from the use of these programs. - * - * This disclaimer of warranty extends to the user of these programs and user's - * customers, employees, agents, transferees, successors, and assigns. - * - * The MPEG Software Simulation Group does not represent or warrant that the - * programs furnished hereunder are free of infringement of any third-party - * patents. - * - * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware, - * are subject to royalty fees to patent holders. Many of these patents are - * general enough such that they are unavoidable regardless of implementation - * design. - * - */ - -#ifndef __GST_PUTBITS_H__ -#define __GST_PUTBITS_H__ - -typedef struct _gst_putbits_t gst_putbits_t; - -struct _gst_putbits_t { - unsigned char *outbfr; - unsigned char *outbase; - unsigned char temp; - int outcnt; - int bytecnt; - int len; - int newlen; -}; - -void gst_putbits_init(gst_putbits_t *pb); -void gst_putbits_new_empty_buffer(gst_putbits_t *pb, int len); -void gst_putbits_new_buffer(gst_putbits_t *pb, unsigned char *buffer, int len); -void gst_putbits(gst_putbits_t *pb, int val, int n); -void gst_putbits_align(gst_putbits_t *pb); -int gst_putbits_bitcount(gst_putbits_t *pb); - -#define gst_putbits1(gb, val) gst_putbits(gb, val, 1) -#define gst_putbits2(gb, val) gst_putbits(gb, val, 2) -#define gst_putbits3(gb, val) gst_putbits(gb, val, 3) -#define gst_putbits4(gb, val) gst_putbits(gb, val, 4) -#define gst_putbits5(gb, val) gst_putbits(gb, val, 5) -#define gst_putbits6(gb, val) gst_putbits(gb, val, 6) -#define gst_putbits7(gb, val) gst_putbits(gb, val, 7) -#define gst_putbits8(gb, val) gst_putbits(gb, val, 8) -#define gst_putbits9(gb, val) gst_putbits(gb, val, 9) -#define gst_putbits10(gb, val) gst_putbits(gb, val, 10) -#define gst_putbits11(gb, val) gst_putbits(gb, val, 11) -#define gst_putbits12(gb, val) gst_putbits(gb, val, 12) -#define gst_putbits13(gb, val) gst_putbits(gb, val, 13) -#define gst_putbits14(gb, val) gst_putbits(gb, val, 14) -#define gst_putbits15(gb, val) gst_putbits(gb, val, 15) -#define gst_putbits16(gb, val) gst_putbits(gb, val, 16) -#define gst_putbits17(gb, val) gst_putbits(gb, val, 17) -#define gst_putbits18(gb, val) gst_putbits(gb, val, 18) -#define gst_putbits19(gb, val) gst_putbits(gb, val, 19) -#define gst_putbits20(gb, val) gst_putbits(gb, val, 20) -#define gst_putbits21(gb, val) gst_putbits(gb, val, 21) -#define gst_putbits22(gb, val) gst_putbits(gb, val, 22) -#define gst_putbits32(gb, val) gst_putbits(gb, val, 32) - -#define gst_putbitsn(gb, val, n) gst_putbits(gb, val, n) - -#endif /* __GST_PUTBITS_H__ */ -- 2.7.4