[FFmpeg-cvslog] libavcodec/texturedsp : add rgtc1u_alpha decoding func

2017-10-16 Thread Martin Vignali
ffmpeg | branch: master | Martin Vignali  | Thu Sep 
28 21:36:58 2017 +0200| [d4d4629dfe727d4c890fc7a19eb7e22eb155fce8] | committer: 
Tom Butterworth

libavcodec/texturedsp : add rgtc1u_alpha decoding func

this func decode an rgtc1 texture and overwrite only the alpha channel
of the dest RGBA picture

Signed-off-by: Tom Butterworth 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4d4629dfe727d4c890fc7a19eb7e22eb155fce8
---

 libavcodec/texturedsp.c | 41 -
 libavcodec/texturedsp.h |  1 +
 2 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index 90b1eb4f11..787aa118d1 100644
--- a/libavcodec/texturedsp.c
+++ b/libavcodec/texturedsp.c
@@ -413,7 +413,7 @@ static int dxt5ys_block(uint8_t *dst, ptrdiff_t stride, 
const uint8_t *block)
 
 static inline void rgtc_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block,
-   const int *color_tab)
+   const int *color_tab, int alpha)
 {
 uint8_t indices[16];
 int x, y;
@@ -429,14 +429,20 @@ static inline void rgtc_block_internal(uint8_t *dst, 
ptrdiff_t stride,
 int i = indices[x + y * 4];
 /* Interval expansion from [-1 1] or [0 1] to [0 255]. */
 int c = color_tab[i];
-uint32_t pixel = RGBA(c, c, c, 255U);
-AV_WL32(dst + x * 4 + y * stride, pixel);
+
+if (alpha){
+dst [x * 4 + y * stride + 3] = (uint8_t)c;
+}
+else{
+uint32_t pixel = RGBA(c, c, c, 255U);
+AV_WL32(dst + x * 4 + y * stride, pixel);
+}
 }
 }
 }
 
 static inline void rgtc1_block_internal(uint8_t *dst, ptrdiff_t stride,
-const uint8_t *block, int sign)
+const uint8_t *block, int sign, int 
alpha)
 {
 int color_table[8];
 int r0, r1;
@@ -472,7 +478,7 @@ static inline void rgtc1_block_internal(uint8_t *dst, 
ptrdiff_t stride,
 color_table[7] = 255;  /* max range */  // bit code 111
 }
 
-rgtc_block_internal(dst, stride, block, color_table);
+rgtc_block_internal(dst, stride, block, color_table, alpha);
 }
 
 /**
@@ -486,7 +492,7 @@ static inline void rgtc1_block_internal(uint8_t *dst, 
ptrdiff_t stride,
  */
 static int rgtc1s_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
 {
-rgtc1_block_internal(dst, stride, block, 1);
+rgtc1_block_internal(dst, stride, block, 1, 0);
 
 return 8;
 }
@@ -502,7 +508,23 @@ static int rgtc1s_block(uint8_t *dst, ptrdiff_t stride, 
const uint8_t *block)
  */
 static int rgtc1u_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
 {
-rgtc1_block_internal(dst, stride, block, 0);
+rgtc1_block_internal(dst, stride, block, 0, 0);
+
+return 8;
+}
+
+/**
+ * Decompress one block of a RGRC1 texture with unsigned components
+ * and overwrite the alpha component in 'dst' (RGBA data).
+ *
+ * @param dstoutput buffer.
+ * @param stride scanline in bytes.
+ * @param block  block to decompress.
+ * @return how much texture data has been consumed.
+ */
+static int rgtc1u_alpha_block(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block)
+{
+rgtc1_block_internal(dst, stride, block, 0, 1);
 
 return 8;
 }
@@ -516,8 +538,8 @@ static inline void rgtc2_block_internal(uint8_t *dst, 
ptrdiff_t stride,
 int x, y;
 
 /* Decompress the two channels separately and interleave them afterwards. 
*/
-rgtc1_block_internal(c0, 16, block, sign);
-rgtc1_block_internal(c1, 16, block + 8, sign);
+rgtc1_block_internal(c0, 16, block, sign, 0);
+rgtc1_block_internal(c1, 16, block + 8, sign, 0);
 
 /* B is rebuilt exactly like a normal map. */
 for (y = 0; y < 4; y++) {
@@ -608,6 +630,7 @@ av_cold void ff_texturedsp_init(TextureDSPContext *c)
 c->dxt5ys_block = dxt5ys_block;
 c->rgtc1s_block = rgtc1s_block;
 c->rgtc1u_block = rgtc1u_block;
+c->rgtc1u_alpha_block = rgtc1u_alpha_block;
 c->rgtc2s_block = rgtc2s_block;
 c->rgtc2u_block = rgtc2u_block;
 c->dxn3dc_block = dxn3dc_block;
diff --git a/libavcodec/texturedsp.h b/libavcodec/texturedsp.h
index 26f3b6473f..04b31525d9 100644
--- a/libavcodec/texturedsp.h
+++ b/libavcodec/texturedsp.h
@@ -53,6 +53,7 @@ typedef struct TextureDSPContext {
 int (*dxt5ys_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
 int (*rgtc1s_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
 int (*rgtc1u_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
+int (*rgtc1u_alpha_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
 int (*rgtc2s_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
 int (*rgtc2u_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
 int (*dxn3dc_bl

[FFmpeg-cvslog] libavcodec/texturedspenc : add rgtc1_u_alpha encoding func

2017-10-16 Thread Martin Vignali
ffmpeg | branch: master | Martin Vignali  | Thu Sep 
28 21:37:46 2017 +0200| [50a20de6b9edd1d893fe0ea652ccf796dd9850fb] | committer: 
Tom Butterworth

libavcodec/texturedspenc : add rgtc1_u_alpha encoding func

this func encode the alpha channel of the rgba input
to an rgtc1u block

Signed-off-by: Tom Butterworth 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50a20de6b9edd1d893fe0ea652ccf796dd9850fb
---

 libavcodec/texturedspenc.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c
index 8b2863033b..ae2e95e23f 100644
--- a/libavcodec/texturedspenc.c
+++ b/libavcodec/texturedspenc.c
@@ -647,9 +647,26 @@ static int dxt5ys_block(uint8_t *dst, ptrdiff_t stride, 
const uint8_t *block)
 return 16;
 }
 
+/**
+ * Compress one block of RGBA pixels in a RGTC1U texture and store the
+ * resulting bytes in 'dst'. Use the alpha channel of the input image.
+ *
+ * @param dstoutput buffer.
+ * @param stride scanline in bytes.
+ * @param block  block to compress.
+ * @return how much texture data has been written.
+ */
+static int rgtc1u_alpha_block(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block)
+{
+compress_alpha(dst, stride, block);
+
+return 8;
+}
+
 av_cold void ff_texturedspenc_init(TextureDSPContext *c)
 {
 c->dxt1_block   = dxt1_block;
 c->dxt5_block   = dxt5_block;
 c->dxt5ys_block = dxt5ys_block;
+c->rgtc1u_alpha_block = rgtc1u_alpha_block;
 }

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


[FFmpeg-cvslog] libavcodec/texturedsp : indent after add rgtc1u_alpha func

2017-10-16 Thread Martin Vignali
ffmpeg | branch: master | Martin Vignali  | Thu Sep 
28 21:45:31 2017 +0200| [92500c7bc53ba0d585db666aef65152468e80c9c] | committer: 
Tom Butterworth

libavcodec/texturedsp : indent after add rgtc1u_alpha func

Signed-off-by: Tom Butterworth 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92500c7bc53ba0d585db666aef65152468e80c9c
---

 libavcodec/texturedsp.c | 26 +-
 libavcodec/texturedsp.h | 26 +-
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index 787aa118d1..6fc8e560ec 100644
--- a/libavcodec/texturedsp.c
+++ b/libavcodec/texturedsp.c
@@ -620,18 +620,18 @@ static int dxn3dc_block(uint8_t *dst, ptrdiff_t stride, 
const uint8_t *block)
 
 av_cold void ff_texturedsp_init(TextureDSPContext *c)
 {
-c->dxt1_block   = dxt1_block;
-c->dxt1a_block  = dxt1a_block;
-c->dxt2_block   = dxt2_block;
-c->dxt3_block   = dxt3_block;
-c->dxt4_block   = dxt4_block;
-c->dxt5_block   = dxt5_block;
-c->dxt5y_block  = dxt5y_block;
-c->dxt5ys_block = dxt5ys_block;
-c->rgtc1s_block = rgtc1s_block;
-c->rgtc1u_block = rgtc1u_block;
+c->dxt1_block = dxt1_block;
+c->dxt1a_block= dxt1a_block;
+c->dxt2_block = dxt2_block;
+c->dxt3_block = dxt3_block;
+c->dxt4_block = dxt4_block;
+c->dxt5_block = dxt5_block;
+c->dxt5y_block= dxt5y_block;
+c->dxt5ys_block   = dxt5ys_block;
+c->rgtc1s_block   = rgtc1s_block;
+c->rgtc1u_block   = rgtc1u_block;
 c->rgtc1u_alpha_block = rgtc1u_alpha_block;
-c->rgtc2s_block = rgtc2s_block;
-c->rgtc2u_block = rgtc2u_block;
-c->dxn3dc_block = dxn3dc_block;
+c->rgtc2s_block   = rgtc2s_block;
+c->rgtc2u_block   = rgtc2u_block;
+c->dxn3dc_block   = dxn3dc_block;
 }
diff --git a/libavcodec/texturedsp.h b/libavcodec/texturedsp.h
index 04b31525d9..9953cf589d 100644
--- a/libavcodec/texturedsp.h
+++ b/libavcodec/texturedsp.h
@@ -43,20 +43,20 @@
 #define TEXTURE_BLOCK_H 4
 
 typedef struct TextureDSPContext {
-int (*dxt1_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt1a_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt2_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt3_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt4_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt5_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt5y_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxt5ys_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*rgtc1s_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*rgtc1u_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
+int (*dxt1_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt1a_block)   (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt2_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt3_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt4_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt5_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt5y_block)   (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxt5ys_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*rgtc1s_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*rgtc1u_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
 int (*rgtc1u_alpha_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
-int (*rgtc2s_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*rgtc2u_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
-int (*dxn3dc_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
+int (*rgtc2s_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*rgtc2u_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
+int (*dxn3dc_block)  (uint8_t *dst, ptrdiff_t stride, const uint8_t 
*block);
 } TextureDSPContext;
 
 void ff_texturedsp_init(TextureDSPContext *c);

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


[FFmpeg-cvslog] libavcodec/texturedspenc : indent after add rgtc1u_alpha func

2017-10-16 Thread Martin Vignali
ffmpeg | branch: master | Martin Vignali  | Thu Sep 
28 21:46:08 2017 +0200| [7480f232d24a4215ff69584dbd873036e3bcb30e] | committer: 
Tom Butterworth

libavcodec/texturedspenc : indent after add rgtc1u_alpha func

Signed-off-by: Tom Butterworth 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7480f232d24a4215ff69584dbd873036e3bcb30e
---

 libavcodec/texturedspenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c
index ae2e95e23f..3d68e0cf39 100644
--- a/libavcodec/texturedspenc.c
+++ b/libavcodec/texturedspenc.c
@@ -665,8 +665,8 @@ static int rgtc1u_alpha_block(uint8_t *dst, ptrdiff_t 
stride, const uint8_t *blo
 
 av_cold void ff_texturedspenc_init(TextureDSPContext *c)
 {
-c->dxt1_block   = dxt1_block;
-c->dxt5_block   = dxt5_block;
-c->dxt5ys_block = dxt5ys_block;
+c->dxt1_block = dxt1_block;
+c->dxt5_block = dxt5_block;
+c->dxt5ys_block   = dxt5ys_block;
 c->rgtc1u_alpha_block = rgtc1u_alpha_block;
 }

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


[FFmpeg-cvslog] configure: add missing optional deps on gcrypt and openssl to the hls muxer

2017-10-16 Thread James Almer
ffmpeg | branch: master | James Almer  | Mon Oct 16 17:47:01 
2017 -0300| [ae6fe04bee600dec99e81efba3b8350366f6367c] | committer: James Almer

configure: add missing optional deps on gcrypt and openssl to the hls muxer

Should fix ticket #6738

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae6fe04bee600dec99e81efba3b8350366f6367c
---

 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index b9a3a9bc1f..819fd37718 100755
--- a/configure
+++ b/configure
@@ -3031,6 +3031,7 @@ fifo_muxer_deps="threads"
 flac_demuxer_select="flac_parser"
 hds_muxer_select="flv_muxer"
 hls_muxer_select="mpegts_muxer"
+hls_muxer_suggest="gcrypt openssl"
 image2_alias_pix_demuxer_select="image2_demuxer"
 image2_brender_pix_demuxer_select="image2_demuxer"
 ipod_muxer_select="mov_muxer"

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


[FFmpeg-cvslog] ffmpeg: remove hwaccel_lax_profile_check option

2017-10-16 Thread Jun Zhao
ffmpeg | branch: master | Jun Zhao  | Mon Oct  9 02:13:14 
2017 -0400| [2e94490225909a2d40d25722b49f54a3fe967635] | committer: Mark 
Thompson

ffmpeg: remove hwaccel_lax_profile_check option

This has been unused for a long time, and the original purpose has been
replaced by the per-stream hwaccel_flags.

Signed-off-by: Jun Zhao 
Signed-off-by: Mark Thompson 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e94490225909a2d40d25722b49f54a3fe967635
---

 fftools/ffmpeg.h | 1 -
 fftools/ffmpeg_opt.c | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index f6c76bcc55..888f77223a 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -624,7 +624,6 @@ extern const AVIOInterruptCB int_cb;
 
 extern const OptionDef options[];
 extern const HWAccel hwaccels[];
-extern int hwaccel_lax_profile_check;
 extern AVBufferRef *hw_device_ctx;
 #if CONFIG_QSV
 extern char *qsv_device;
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 100fa76e46..500920326b 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -100,7 +100,6 @@ const HWAccel hwaccels[] = {
 #endif
 { 0 },
 };
-int hwaccel_lax_profile_check = 0;
 AVBufferRef *hw_device_ctx;
 HWDevice *filter_hw_device;
 
@@ -3640,8 +3639,6 @@ const OptionDef options[] = {
 { "autorotate",   HAS_ARG | OPT_BOOL | OPT_SPEC |
   OPT_EXPERT | OPT_INPUT,  
  { .off = OFFSET(autorotate) },
 "automatically insert correct rotate filters" },
-{ "hwaccel_lax_profile_check", OPT_BOOL | OPT_EXPERT,  
  { &hwaccel_lax_profile_check},
-"attempt to decode anyway if HW accelerated decoder's supported 
profiles do not exactly match the stream" },
 
 /* audio options */
 { "aframes",OPT_AUDIO | HAS_ARG  | OPT_PERFILE | OPT_OUTPUT,   
{ .func_arg = opt_audio_frames },

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


[FFmpeg-cvslog] configure: add missing optional dep on libfribidi to the drawtext filter

2017-10-16 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Oct 17 01:17:32 
2017 -0300| [15b86d3b4aeb51d92687f031934a807fd6f29b99] | committer: James Almer

configure: add missing optional dep on libfribidi to the drawtext filter

Fixes ticket #6740

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15b86d3b4aeb51d92687f031934a807fd6f29b99
---

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 819fd37718..6e7faf55b6 100755
--- a/configure
+++ b/configure
@@ -3224,7 +3224,7 @@ delogo_filter_deps="gpl"
 deshake_filter_select="pixelutils"
 deshake_filter_suggest="opencl"
 drawtext_filter_deps="libfreetype"
-drawtext_filter_suggest="libfontconfig"
+drawtext_filter_suggest="libfontconfig libfribidi"
 elbg_filter_deps="avcodec"
 eq_filter_deps="gpl"
 fftfilt_filter_deps="avcodec"

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