From db2aa92506b42ac3313e0a8152407f713a4ff96c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Thu, 7 Jan 2010 16:47:41 +0100 Subject: [PATCH] Remove tarkin codec module. It is a dead-born codec --- NEWS | 2 +- configure.ac | 28 ---- modules/LIST | 1 - modules/codec/Modules.am | 1 - modules/codec/tarkin.c | 320 --------------------------------------- po/POTFILES.in | 1 - 6 files changed, 1 insertion(+), 352 deletions(-) delete mode 100644 modules/codec/tarkin.c diff --git a/NEWS b/NEWS index b2e3f852d1..69e922bf10 100644 --- a/NEWS +++ b/NEWS @@ -104,7 +104,7 @@ Removed modules: * XvMC accelerated modules. Use VAAPI instead. * opengllayer * cddax. Use cdda instead - * cmml. + * cmml and tarkin codecs are removed because they are dead codecs. Changes between 1.0.4 and 1.0.5 (not yet released): --------------------------------------------------- diff --git a/configure.ac b/configure.ac index 5ac1a13e3a..dfb4a9ca68 100644 --- a/configure.ac +++ b/configure.ac @@ -3292,34 +3292,6 @@ dnl Speex plugin dnl PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex decoder support], [auto]) -dnl -dnl tarkin decoder plugin -dnl -AC_ARG_ENABLE(tarkin, -[ --enable-tarkin experimental tarkin codec (default disabled)]) -if test "${enable_tarkin}" = "yes" -then - AC_ARG_WITH(tarkin-tree, - [ --with-tarkin-tree=PATH tarkin tree for static linking]) - if test -n "${with_tarkin_tree}" - then - AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree}) - real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`" - if test -f "${real_tarkin_tree}/tarkin.o" - then - VLC_ADD_PLUGIN([tarkin]) - VLC_ADD_CPPFLAGS([tarkin],[-I${real_tarkin_tree}]) - VLC_ADD_LIBS([tarkin],[${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg]) - AC_MSG_RESULT(yes) - else - dnl The given tarkin tree wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o, - make sure you compiled tarkin in ${with_tarkin_tree}]) - fi - fi -fi - dnl dnl theora decoder plugin dnl diff --git a/modules/LIST b/modules/LIST index 36018449ba..9e62765cfe 100644 --- a/modules/LIST +++ b/modules/LIST @@ -325,7 +325,6 @@ $Id$ * swscale_omap: Video scaling filter for maemo/omap platform * t140: T.140 text encoder * taglib: Taglib tags parser and writer - * tarkin: a tarkin video decoder using libtarkin * telepathy: Telepathy Presence information using MissionControl notification * telnet: Telnet control interface for VideoLAN Media Manager * telx: teletext subtitles decoder diff --git a/modules/codec/Modules.am b/modules/codec/Modules.am index 65e65b4e39..3404dba10e 100644 --- a/modules/codec/Modules.am +++ b/modules/codec/Modules.am @@ -5,7 +5,6 @@ SOURCES_flac = flac.c SOURCES_lpcm = lpcm.c SOURCES_araw = araw.c SOURCES_vorbis = vorbis.c -SOURCES_tarkin = tarkin.c SOURCES_theora = theora.c SOURCES_tremor = vorbis.c SOURCES_speex = speex.c diff --git a/modules/codec/tarkin.c b/modules/codec/tarkin.c deleted file mode 100644 index 0976832114..0000000000 --- a/modules/codec/tarkin.c +++ /dev/null @@ -1,320 +0,0 @@ -/***************************************************************************** - * tarkin.c: tarkin decoder module making use of libtarkin. - ***************************************************************************** - * Copyright (C) 2001-2003 the VideoLAN team - * $Id$ - * - * Authors: Gildas Bazin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include - -/* FIXME */ -// use 16 bit signed integers as wavelet coefficients -#define TYPE int16_t -// we'll actually use TYPE_BITS bits of type (e.g. 9 magnitude + 1 sign) -#define TYPE_BITS 10 -// use the rle entropy coder -#define RLECODER 1 - -#include - -/***************************************************************************** - * decoder_sys_t : tarkin decoder descriptor - *****************************************************************************/ -struct decoder_sys_t -{ - /* - * Tarkin properties - */ - TarkinStream *tarkin_stream; - - TarkinInfo ti; /* tarkin bitstream settings */ - TarkinComment tc; /* tarkin bitstream user comments */ - TarkinTime tarkdate; - - int i_headers; - mtime_t i_pts; -}; - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static int OpenDecoder ( vlc_object_t * ); -static void CloseDecoder ( vlc_object_t * ); - -static void *DecodeBlock ( decoder_t *, block_t ** ); -static picture_t *DecodePacket ( decoder_t *, block_t **, ogg_packet * ); - -static void tarkin_CopyPicture( decoder_t *, picture_t *, uint8_t *, int ); - -/***************************************************************************** - * Module descriptor - *****************************************************************************/ -vlc_module_begin () - set_description( N_("Tarkin decoder") ) - set_capability( "decoder", 100 ) - set_category( CAT_INPUT ) - set_subcategory( SUBCAT_INPUT_VCODEC ) - set_callbacks( OpenDecoder, CloseDecoder ) - add_shortcut( "tarkin" ) -vlc_module_end () - -/***************************************************************************** - * OpenDecoder: probe the decoder and return score - *****************************************************************************/ -static int OpenDecoder( vlc_object_t *p_this ) -{ - decoder_t *p_dec = (decoder_t*)p_this; - decoder_sys_t *p_sys; - - if( p_dec->fmt_in.i_codec != VLC_CODEC_TARKIN ) - { - return VLC_EGENERIC; - } - - /* Allocate the memory needed to store the decoder's structure */ - if( ( p_dec->p_sys = p_sys = - (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL ) - return VLC_ENOMEM; - - /* Set output properties */ - p_dec->fmt_out.i_cat = VIDEO_ES; - p_sys->i_headers = 0; - - /* Set callbacks */ - p_dec->pf_decode_video = (picture_t *(*)(decoder_t *, block_t **)) - DecodeBlock; - p_dec->pf_packetize = (block_t *(*)(decoder_t *, block_t **)) - DecodeBlock; - - /* Init supporting Tarkin structures needed in header parsing */ - p_sys->tarkin_stream = tarkin_stream_new(); - tarkin_info_init( &p_sys->ti ); - tarkin_comment_init( &p_sys->tc ); - - return VLC_SUCCESS; -} - -/**************************************************************************** - * DecodeBlock: the whole thing - **************************************************************************** - * This function must be fed with ogg packets. - ****************************************************************************/ -static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) -{ - decoder_sys_t *p_sys = p_dec->p_sys; - block_t *p_block; - ogg_packet oggpacket; - - if( !pp_block ) return NULL; - - if( *pp_block ) - { - /* Block to Ogg packet */ - oggpacket.packet = (*pp_block)->p_buffer; - oggpacket.bytes = (*pp_block)->i_buffer; - } - else - { - /* Block to Ogg packet */ - oggpacket.packet = NULL; - oggpacket.bytes = 0; - } - - p_block = *pp_block; - - oggpacket.granulepos = -1; - oggpacket.b_o_s = 0; - oggpacket.e_o_s = 0; - oggpacket.packetno = 0; - - if( p_sys->i_headers == 0 ) - { - /* Take care of the initial Tarkin header */ - - oggpacket.b_o_s = 1; /* yes this actually is a b_o_s packet :) */ - if( tarkin_synthesis_headerin( &p_sys->ti, &p_sys->tc, &oggpacket ) - < 0 ) - { - msg_Err( p_dec, "this bitstream does not contain Tarkin " - "video data."); - block_Release( p_block ); - return NULL; - } - p_sys->i_headers++; - - block_Release( p_block ); - return NULL; - } - - if( p_sys->i_headers == 1 ) - { - if( tarkin_synthesis_headerin( &p_sys->ti, &p_sys->tc, &oggpacket ) - < 0 ) - { - msg_Err( p_dec, "2nd Tarkin header is corrupted." ); - block_Release( p_block ); - return NULL; - } - p_sys->i_headers++; - block_Release( p_block ); - return NULL; - } - - if( p_sys->i_headers == 2 ) - { - if( tarkin_synthesis_headerin( &p_sys->ti, &p_sys->tc, &oggpacket ) - < 0 ) - { - msg_Err( p_dec, "3rd Tarkin header is corrupted." ); - block_Release( p_block ); - return NULL; - } - p_sys->i_headers++; - - /* Initialize the tarkin decoder */ - tarkin_synthesis_init( p_sys->tarkin_stream, &p_sys->ti ); - - msg_Err( p_dec, "Tarkin codec initialized"); - - block_Release( p_block ); - return NULL; - } - - return DecodePacket( p_dec, pp_block, &oggpacket ); -} - -/***************************************************************************** - * DecodePacket: decodes a Tarkin packet. - *****************************************************************************/ -static picture_t *DecodePacket( decoder_t *p_dec, block_t **pp_block, - ogg_packet *p_oggpacket ) -{ - decoder_sys_t *p_sys = p_dec->p_sys; - uint8_t *rgb; - - if( p_oggpacket->bytes ) - { - tarkin_synthesis_packetin( p_sys->tarkin_stream, p_oggpacket ); - //block_Release( *pp_block ); /* FIXME duplicate packet */ - *pp_block = NULL; - } - - if( tarkin_synthesis_frameout( p_sys->tarkin_stream, - &rgb, 0, &p_sys->tarkdate ) == 0 ) - { - int i_width, i_height, i_chroma, i_stride; - picture_t *p_pic; - - msg_Err( p_dec, "Tarkin frame decoded" ); - - i_width = p_sys->tarkin_stream->layer->desc.width; - i_height = p_sys->tarkin_stream->layer->desc.height; - - switch( p_sys->tarkin_stream->layer->desc.format ) - { - case TARKIN_RGB24: - i_chroma = VLC_CODEC_RGB24; - i_stride = i_width * 3; - break; - case TARKIN_RGB32: - i_chroma = VLC_CODEC_RGB32; - i_stride = i_width * 4; - break; - case TARKIN_RGBA: - i_chroma = VLC_CODEC_RGBA; - i_stride = i_width * 4; - break; - default: - i_chroma = VLC_CODEC_I420; - i_stride = i_width; - break; - } - - /* Set output properties */ - p_dec->fmt_out.video.i_width = i_width; - p_dec->fmt_out.video.i_height = i_height; - - p_dec->fmt_out.video.i_sar_num = 1; - p_dec->fmt_out.video.i_sar_den = 1; - p_dec->fmt_out.i_codec = i_chroma; - - /* Get a new picture */ - if( (p_pic = decoder_NewPicture( p_dec )) ) - { - tarkin_CopyPicture( p_dec, p_pic, rgb, i_stride ); - - tarkin_synthesis_freeframe( p_sys->tarkin_stream, rgb ); - - p_pic->date = mdate() + DEFAULT_PTS_DELAY/*i_pts*/; - - return p_pic; - } - } - - return NULL; -} - -/***************************************************************************** - * CloseDecoder: tarkin decoder destruction - *****************************************************************************/ -static void CloseDecoder( vlc_object_t *p_this ) -{ - decoder_t *p_dec = (decoder_t *)p_this; - decoder_sys_t *p_sys = p_dec->p_sys; - - tarkin_stream_destroy( p_sys->tarkin_stream ); - - free( p_sys ); -} - -/***************************************************************************** - * tarkin_CopyPicture: copy a picture from tarkin internal buffers to a - * picture_t structure. - *****************************************************************************/ -static void tarkin_CopyPicture( decoder_t *p_dec, picture_t *p_pic, - uint8_t *p_src, int i_pitch ) -{ - int i_plane, i_line, i_src_stride, i_dst_stride; - uint8_t *p_dst; - - for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ ) - { - p_dst = p_pic->p[i_plane].p_pixels; - i_dst_stride = p_pic->p[i_plane].i_pitch; - i_src_stride = i_pitch; - - for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) - { - vlc_memcpy( p_dst, p_src, i_src_stride ); - - p_src += i_src_stride; - p_dst += i_dst_stride; - } - } -} diff --git a/po/POTFILES.in b/po/POTFILES.in index 27aca9f919..6c8e56be20 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -408,7 +408,6 @@ modules/codec/subtitles/subsdec.h modules/codec/subtitles/subsusf.c modules/codec/subtitles/t140.c modules/codec/svcdsub.c -modules/codec/tarkin.c modules/codec/telx.c modules/codec/theora.c modules/codec/twolame.c -- 2.39.2