[Ffmpeg-devel] [PATCH] dvbsub encoder
Wolfram Gloger
wmglo
Sat Sep 24 20:40:16 CEST 2005
Hi,
Here is an "inverse" of dvbsub.c. Some details may have to be further
refined, but it produces output viewable with mplayer.
I'm appending dvbsubenc.c attached, not as part of the patch.
An obvious fix for dvbsub.c is included in the patch, since
it was apparently overlooked when I first submitted it.
Regards,
Wolfram.
diff -urb ffmpeg/libavcodec/Makefile ffmpeg-wg/libavcodec/Makefile
--- ffmpeg/libavcodec/Makefile Sun Sep 18 17:29:49 2005
+++ ffmpeg-wg/libavcodec/Makefile Thu Sep 22 13:39:55 2005
@@ -17,7 +17,8 @@
ratecontrol.o adpcm.o eval.o error_resilience.o \
fft.o mdct.o raw.o golomb.o cabac.o\
dpcm.o adx.o faandct.o parser.o g726.o \
- vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o dvdsub.o dvbsub.o dvbsubdec.o\
+ vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o \
+ dvdsub.o dvdsubenc.o dvbsub.o dvbsubdec.o\
opt.o
ifeq ($(CONFIG_AASC_DECODER),yes)
diff -urb ffmpeg/libavcodec/allcodecs.c ffmpeg-wg/libavcodec/allcodecs.c
--- ffmpeg/libavcodec/allcodecs.c Sun Sep 4 17:38:32 2005
+++ ffmpeg-wg/libavcodec/allcodecs.c Thu Sep 22 18:36:05 2005
@@ -562,6 +562,7 @@
#undef PCM_CODEC
/* subtitles */
+ register_avcodec(&dvdsub_encoder);
register_avcodec(&dvdsub_decoder);
register_avcodec(&dvbsub_encoder);
register_avcodec(&dvbsub_decoder);
diff -urb ffmpeg/libavcodec/avcodec.h ffmpeg-wg/libavcodec/avcodec.h
--- ffmpeg/libavcodec/avcodec.h Sun Sep 18 17:29:49 2005
+++ ffmpeg-wg/libavcodec/avcodec.h Thu Sep 22 18:36:43 2005
@@ -2119,6 +2120,7 @@
extern AVCodec dts_decoder;
/* subtitles */
+extern AVCodec dvdsub_encoder;
extern AVCodec dvdsub_decoder;
extern AVCodec dvbsub_encoder;
extern AVCodec dvbsub_decoder;
diff -urb ffmpeg/libavcodec/dvbsub.c ffmpeg-wg/libavcodec/dvbsub.c
--- ffmpeg/libavcodec/dvbsub.c Mon Jul 18 10:52:34 2005
+++ ffmpeg-wg/libavcodec/dvbsub.c Thu Sep 22 13:23:42 2005
@@ -343,10 +343,10 @@
for (object_id = 0; object_id < h->num_rects; object_id++) {
/* Object Data segment */
- if (h->rects[region_id].nb_colors <= 4) {
+ if (h->rects[object_id].nb_colors <= 4) {
/* 2 bpp, some decoders do not support it correctly */
bpp_index = 0;
- } else if (h->rects[region_id].nb_colors <= 16) {
+ } else if (h->rects[object_id].nb_colors <= 16) {
/* 4 bpp, standard encoding */
bpp_index = 1;
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-gunzip
Size: 2360 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050924/0a6d1b80/attachment.bin>
More information about the ffmpeg-devel
mailing list