Re: [FFmpeg-devel] [PATCH]lavc/dvbsub: Allow 256 colour encoding

2017-10-24 Thread Carl Eugen Hoyos
2017-10-24 22:11 GMT+02:00 Michael Niedermayer :
> On Tue, Oct 24, 2017 at 02:04:28AM +0200, Carl Eugen Hoyos wrote:

>> Subject: [PATCH] lavc/dvbsub: Allow 256 colour encoding.
>>
>> Fixes ticket #6769.
>
> probably ok

Patch applied.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavc/dvbsub: Allow 256 colour encoding

2017-10-24 Thread Michael Niedermayer
On Tue, Oct 24, 2017 at 02:04:28AM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Trying to encode 256-colour subtitles to dvbsub currently fails in the
> "region" section, a hunk of Joolz' patch was not committed six years
> ago.
> Attached patch has two hunks: The forgotten hunk from the original
> patch and further up a fix that I created now (to be committed
> separately):
> The line separator from the ETSI DVB blue book was missing for rle8 encodings.
> 
> Please comment, Carl Eugen

>  dvbsub.c |7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 66361a461f9ed49d55b7f753243ffd585b647e23  
> 0001-lavc-dvbsub-Allow-256-colour-encoding.patch
> From 06fd4904b6aa04c3ab8e056ef4f6be4a89093a1c Mon Sep 17 00:00:00 2001
> From: JULIAN GARDNER 
> Date: Tue, 24 Oct 2017 01:59:51 +0200
> Subject: [PATCH] lavc/dvbsub: Allow 256 colour encoding.
> 
> Fixes ticket #6769.

probably ok

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]lavc/dvbsub: Allow 256 colour encoding

2017-10-23 Thread Carl Eugen Hoyos
Hi!

Trying to encode 256-colour subtitles to dvbsub currently fails in the
"region" section, a hunk of Joolz' patch was not committed six years
ago.
Attached patch has two hunks: The forgotten hunk from the original
patch and further up a fix that I created now (to be committed
separately):
The line separator from the ETSI DVB blue book was missing for rle8 encodings.

Please comment, Carl Eugen
From 06fd4904b6aa04c3ab8e056ef4f6be4a89093a1c Mon Sep 17 00:00:00 2001
From: JULIAN GARDNER 
Date: Tue, 24 Oct 2017 01:59:51 +0200
Subject: [PATCH] lavc/dvbsub: Allow 256 colour encoding.

Fixes ticket #6769.
---
 libavcodec/dvbsub.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index 3cdbade..8cce702 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -239,9 +239,9 @@ static void dvb_encode_rle8(uint8_t **pq,
 x += len;
 }
 /* end of line */
-//   end of 8-bit/pixel_code_string
-*q++ = 0x00;
+//  end of 8-bit/pixel_code_string
 *q++ = 0x00;
+*q++ = 0xf0;
 bitmap += linesize;
 }
 *pq = q;
@@ -342,6 +342,9 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
 } else if (h->rects[region_id]->nb_colors <= 16) {
 /* 4 bpp, standard encoding */
 bpp_index = 1;
+} else if (h->rects[region_id]->nb_colors <= 256) {
+/* 8 bpp, standard encoding */
+bpp_index = 2;
 } else {
 return -1;
 }
-- 
1.7.10.4

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel