Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-22 Thread Michael Niedermayer
On Thu, Jan 22, 2015 at 02:44:55PM +, Derek Buitenhuis wrote:
> Signed-off-by: Derek Buitenhuis 
> ---
>  libavcodec/libx265.c | 5 +
>  1 file changed, 5 insertions(+)

LGTM

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange


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


Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-22 Thread Derek Buitenhuis
On 1/22/2015 2:44 PM, Derek Buitenhuis wrote:
> Signed-off-by: Derek Buitenhuis 
> ---
>  libavcodec/libx265.c | 5 +
>  1 file changed, 5 insertions(+)

This is v2.

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


[FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-22 Thread Derek Buitenhuis
Signed-off-by: Derek Buitenhuis 
---
 libavcodec/libx265.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 923c750..aee7ae2 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -224,6 +224,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 
 x265pic.pts  = pic->pts;
 x265pic.bitDepth = 
av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1;
+
+x265pic.sliceType = pic->pict_type == AV_PICTURE_TYPE_I ? X265_TYPE_I :
+pic->pict_type == AV_PICTURE_TYPE_P ? X265_TYPE_P :
+pic->pict_type == AV_PICTURE_TYPE_B ? X265_TYPE_B :
+X265_TYPE_AUTO;
 }
 
 ret = x265_encoder_encode(ctx->encoder, &nal, &nnal,
-- 
1.8.3.1

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


Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-21 Thread Reimar Döffinger
On Wed, Jan 21, 2015 at 04:52:33PM +, Derek Buitenhuis wrote:
> On 1/21/2015 4:46 PM, Timo Rothenpieler wrote:
> >> No? It has X265_TYPE_AUTO as the fallback if it is NULL. Just like 
> >> libx264.c:
> > 
> > Is falls back to that if pic->pict_type is NULL, but if pic is NULL, it
> > will just crash.
> 
> I meant to send a reply saying I misread,
> but responded to the wrong mail in my haste.
> I blame writing email over RDP on my phome,
> on a bus.

Maybe you should try standing on your head and drinking a coke at the
same time, you know, just to not make it too easy or convenient :P
Sorry, it was just impossible to resist...
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-21 Thread Derek Buitenhuis
On 1/21/2015 4:46 PM, Timo Rothenpieler wrote:
>> No? It has X265_TYPE_AUTO as the fallback if it is NULL. Just like libx264.c:
> 
> Is falls back to that if pic->pict_type is NULL, but if pic is NULL, it
> will just crash.

I meant to send a reply saying I misread,
but responded to the wrong mail in my haste.
I blame writing email over RDP on my phome,
on a bus.

- Derek

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


Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-21 Thread Timo Rothenpieler
> No? It has X265_TYPE_AUTO as the fallback if it is NULL. Just like libx264.c:

Is falls back to that if pic->pict_type is NULL, but if pic is NULL, it
will just crash.




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


Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-21 Thread Derek Buitenhuis
On 1/21/2015 4:28 PM, Michael Niedermayer wrote:
> this is missing pic==NULL checks or should be under the if() above
> or something like that

No? It has X265_TYPE_AUTO as the fallback if it is NULL. Just like libx264.c:

https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/libx264.c;h=4da0ee0d84ce42c0f6a9b0234c168826fee50ce3;hb=HEAD#l182

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


Re: [FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-21 Thread Michael Niedermayer
On Wed, Jan 21, 2015 at 03:18:48PM +, Derek Buitenhuis wrote:
> Signed-off-by: Derek Buitenhuis 
> ---
>  libavcodec/libx265.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> index 923c750..5e4931a 100644
> --- a/libavcodec/libx265.c
> +++ b/libavcodec/libx265.c
> @@ -226,6 +226,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, 
> AVPacket *pkt,
>  x265pic.bitDepth = 
> av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1;
>  }
>  
> +x265pic.sliceType = pic->pict_type == AV_PICTURE_TYPE_I ? X265_TYPE_I :
> +pic->pict_type == AV_PICTURE_TYPE_P ? X265_TYPE_P :
> +pic->pict_type == AV_PICTURE_TYPE_B ? X265_TYPE_B :
> +X265_TYPE_AUTO;
> +

this is missing pic==NULL checks or should be under the if() above
or something like that

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"- "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."


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


[FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

2015-01-21 Thread Derek Buitenhuis
Signed-off-by: Derek Buitenhuis 
---
 libavcodec/libx265.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 923c750..5e4931a 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -226,6 +226,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 x265pic.bitDepth = 
av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1;
 }
 
+x265pic.sliceType = pic->pict_type == AV_PICTURE_TYPE_I ? X265_TYPE_I :
+pic->pict_type == AV_PICTURE_TYPE_P ? X265_TYPE_P :
+pic->pict_type == AV_PICTURE_TYPE_B ? X265_TYPE_B :
+X265_TYPE_AUTO;
+
 ret = x265_encoder_encode(ctx->encoder, &nal, &nnal,
   pic ? &x265pic : NULL, &x265pic_out);
 if (ret < 0)
-- 
1.8.3.1

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