Hi,

On Sat, May 21, 2011 at 8:32 AM, Ronald S. Bultje <[email protected]> wrote:
> draw_edges does not extend edges when finishing the first field, thus
> second fields depending on the first field edges being extended will
> read uninitialized data.
>
> Fixes THREADS=7 THREAD_TYPE=2 fate-h264-conformance-cvnlfi2_sony_h.
> ---
>  libavcodec/h264.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index 5fb303c..a4d0a29 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -2306,7 +2306,8 @@ static int decode_slice_header(H264Context *h, 
> H264Context *h0){
>                           +(h->ref_list[j][i].reference&3);
>     }
>
> -    h->emu_edge_width= (s->flags&CODEC_FLAG_EMU_EDGE) ? 0 : 16;
> +    //FIXME: fix draw_edges+PAFF+threads to draw edges of first field 
> independently
> +    h->emu_edge_width= (s->flags&CODEC_FLAG_EMU_EDGE || 
> (!h->sps.frame_mbs_only_flag && s->avctx->active_thread_type)) ? 0 : 16;
>     h->emu_edge_height= (FRAME_MBAFF || FIELD_PICTURE) ? 0 : 
> h->emu_edge_width;
>
>     if(s->avctx->debug&FF_DEBUG_PICT_INFO){

FYI this is a -mt backport, I believe it applies to slice-threading
also so it's relatively independent. We can also port it as part of
-mt if preferred.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to