Re: [libav-devel] [PATCH 08/12] h264_parser: move the H264DSPContext to the parser context

2016-04-16 Thread Janne Grunau
On 2016-04-04 20:35:50 +0200, Anton Khirnov wrote:
> ---
>  libavcodec/h264_parser.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
> index cd37d31..d62eb73 100644
> --- a/libavcodec/h264_parser.c
> +++ b/libavcodec/h264_parser.c
> @@ -46,6 +46,7 @@ typedef struct H264ParseContext {
>  H264Context h;
>  ParseContext pc;
>  H264ParamSets ps;
> +H264DSPContext h264dsp;
>  int got_first;
>  } H264ParseContext;
>  
> @@ -53,7 +54,6 @@ typedef struct H264ParseContext {
>  static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
> int buf_size)
>  {
> -H264Context *h = >h;
>  int i;
>  uint32_t state;
>  ParseContext *pc = >pc;
> @@ -64,7 +64,7 @@ static int h264_find_frame_end(H264ParseContext *p, const 
> uint8_t *buf,
>  
>  for (i = 0; i < buf_size; i++) {
>  if (state == 7) {
> -i += h->h264dsp.startcode_find_candidate(buf + i, buf_size - i);
> +i += p->h264dsp.startcode_find_candidate(buf + i, buf_size - i);
>  if (i < buf_size)
>  state = 2;
>  } else if (state <= 2) {
> @@ -597,7 +597,7 @@ static av_cold int init(AVCodecParserContext *s)
>  h->nb_slice_ctx = 1;
>  
>  h->slice_context_count = 1;
> -ff_h264dsp_init(>h264dsp, 8, 1);
> +ff_h264dsp_init(>h264dsp, 8, 1);
>  return 0;
>  }

I find it questionable to use the h264 dsp just for this one function 
but that's not really an issue of this patch.

patch ok

Janne
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 08/12] h264_parser: move the H264DSPContext to the parser context

2016-04-05 Thread Tim W.
On Mon, Apr 4, 2016 at 8:35 PM, Anton Khirnov  wrote:

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


LGTM.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 08/12] h264_parser: move the H264DSPContext to the parser context

2016-04-04 Thread Luca Barbato
On 04/04/16 20:35, Anton Khirnov wrote:
> ---
>  libavcodec/h264_parser.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Possibly Ok.

lu

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 08/12] h264_parser: move the H264DSPContext to the parser context

2016-04-04 Thread Anton Khirnov
---
 libavcodec/h264_parser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index cd37d31..d62eb73 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -46,6 +46,7 @@ typedef struct H264ParseContext {
 H264Context h;
 ParseContext pc;
 H264ParamSets ps;
+H264DSPContext h264dsp;
 int got_first;
 } H264ParseContext;
 
@@ -53,7 +54,6 @@ typedef struct H264ParseContext {
 static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
int buf_size)
 {
-H264Context *h = >h;
 int i;
 uint32_t state;
 ParseContext *pc = >pc;
@@ -64,7 +64,7 @@ static int h264_find_frame_end(H264ParseContext *p, const 
uint8_t *buf,
 
 for (i = 0; i < buf_size; i++) {
 if (state == 7) {
-i += h->h264dsp.startcode_find_candidate(buf + i, buf_size - i);
+i += p->h264dsp.startcode_find_candidate(buf + i, buf_size - i);
 if (i < buf_size)
 state = 2;
 } else if (state <= 2) {
@@ -597,7 +597,7 @@ static av_cold int init(AVCodecParserContext *s)
 h->nb_slice_ctx = 1;
 
 h->slice_context_count = 1;
-ff_h264dsp_init(>h264dsp, 8, 1);
+ff_h264dsp_init(>h264dsp, 8, 1);
 return 0;
 }
 
-- 
2.0.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel