diff mbox

[FFmpeg-devel] lavc: Enable a53cc by default

Message ID 201609091759.19523.cehoyos@ag.or.at
State Accepted
Commit 93e041026f3c02f622253f81e5c794b81e784a37
Headers show

Commit Message

Carl Eugen Hoyos Sept. 9, 2016, 3:59 p.m. UTC
Hi!

Attached patch enables saving closed caption by default if available.

Please comment, Carl Eugen
From f8db342abefbe33b78a7291592eb542bc18b3d07 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Fri, 9 Sep 2016 17:56:46 +0200
Subject: [PATCH] lavc: Enable a53cc by default for x264 and qsv_h264.

---
 libavcodec/libx264.c     |    2 +-
 libavcodec/qsvenc_h264.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Sept. 10, 2016, 5:04 p.m. UTC | #1
On Fri, Sep 09, 2016 at 05:59:19PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch enables saving closed caption by default if available.
> 
> Please comment, Carl Eugen

>  libx264.c     |    2 +-
>  qsvenc_h264.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 7df31837c63e8c6aa42ababbd988d518f49b6497  0001-lavc-Enable-a53cc-by-default-for-x264-and-qsv_h264.patch
> From f8db342abefbe33b78a7291592eb542bc18b3d07 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
> Date: Fri, 9 Sep 2016 17:56:46 +0200
> Subject: [PATCH] lavc: Enable a53cc by default for x264 and qsv_h264.

LGTM but i do not really know a53 CC, so if someone else who knows
them replies, consider his reply to have overriden mine!

[...]
Carl Eugen Hoyos Sept. 14, 2016, 3:53 p.m. UTC | #2
2016-09-10 19:04 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> On Fri, Sep 09, 2016 at 05:59:19PM +0200, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch enables saving closed caption by default if available.
>>
>> Please comment, Carl Eugen
>
>>  libx264.c     |    2 +-
>>  qsvenc_h264.c |    2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>> 7df31837c63e8c6aa42ababbd988d518f49b6497  0001-lavc-Enable-a53cc-by-default-for-x264-and-qsv_h264.patch
>> From f8db342abefbe33b78a7291592eb542bc18b3d07 Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
>> Date: Fri, 9 Sep 2016 17:56:46 +0200
>> Subject: [PATCH] lavc: Enable a53cc by default for x264 and qsv_h264.
>
> LGTM but i do not really know a53 CC, so if someone else who knows
> them replies, consider his reply to have overriden mine!

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index b730c91..9e12464 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -907,7 +907,7 @@  static const AVOption options[] = {
     {"level", "Specify level (as defined by Annex A)", OFFSET(level), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
     {"passlogfile", "Filename for 2 pass stats", OFFSET(stats), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
     {"wpredp", "Weighted prediction for P-frames", OFFSET(wpredp), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
-    {"a53cc",          "Use A53 Closed Captions (if available)",          OFFSET(a53_cc),        AV_OPT_TYPE_BOOL,   {.i64 = 0}, 0, 1, VE},
+    {"a53cc",          "Use A53 Closed Captions (if available)",          OFFSET(a53_cc),        AV_OPT_TYPE_BOOL,   {.i64 = 1}, 0, 1, VE},
     {"x264opts", "x264 options", OFFSET(x264opts), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, VE},
     { "crf",           "Select the quality for constant quality mode",    OFFSET(crf),           AV_OPT_TYPE_FLOAT,  {.dbl = -1 }, -1, FLT_MAX, VE },
     { "crf_max",       "In CRF mode, prevents VBV from lowering quality beyond this point.",OFFSET(crf_max), AV_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, VE },
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 84513be..c1f6003 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -138,7 +138,7 @@  static const AVOption options[] = {
     { "main"    , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_AVC_MAIN     }, INT_MIN, INT_MAX,     VE, "profile" },
     { "high"    , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_AVC_HIGH     }, INT_MIN, INT_MAX,     VE, "profile" },
 
-    { "a53cc" , "Use A53 Closed Captions (if available)", OFFSET(qsv.a53_cc), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, VE},
+    { "a53cc" , "Use A53 Closed Captions (if available)", OFFSET(qsv.a53_cc), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, VE},
     { NULL },
 };