On Sun, Aug 2, 2015 at 2:10 PM, Ronald S. Bultje <rsbul...@gmail.com> wrote: > Hi, > > On Sun, Aug 2, 2015 at 7:10 AM, Hendrik Leppkes <h.lepp...@gmail.com> wrote: > >> On Sun, Aug 2, 2015 at 1:07 PM, Hendrik Leppkes <h.lepp...@gmail.com> >> wrote: >> > It needs to point to the value from the sps rps, not the final computed >> one from the slice header. >> > --- >> > libavcodec/dxva2_hevc.c | 2 +- >> > libavcodec/hevc.h | 1 + >> > libavcodec/hevc_ps.c | 1 + >> > 3 files changed, 3 insertions(+), 1 deletion(-) >> > >> > diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c >> > index 7e39677..79d2d28 100644 >> > --- a/libavcodec/dxva2_hevc.c >> > +++ b/libavcodec/dxva2_hevc.c >> > @@ -92,7 +92,7 @@ static void fill_picture_parameters(const >> AVCodecContext *avctx, AVDXVAContext * >> > pp->init_qp_minus26 = >> pps->pic_init_qp_minus26; >> > >> > if (h->sh.short_term_ref_pic_set_sps_flag == 0 && >> h->sh.short_term_rps) { >> > - pp->ucNumDeltaPocsOfRefRpsIdx = >> h->sh.short_term_rps->num_delta_pocs; >> > + pp->ucNumDeltaPocsOfRefRpsIdx = >> h->sh.short_term_rps->rps_idx_num_delta_pocs; >> > pp->wNumBitsForShortTermRPSInSlice = >> h->sh.short_term_ref_pic_set_size; >> > } >> > >> > diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h >> > index 2c1aff7..32d6da9 100644 >> > --- a/libavcodec/hevc.h >> > +++ b/libavcodec/hevc.h >> > @@ -276,6 +276,7 @@ enum ScanType { >> > typedef struct ShortTermRPS { >> > unsigned int num_negative_pics; >> > int num_delta_pocs; >> > + int rps_idx_num_delta_pocs; >> > int32_t delta_poc[32]; >> > uint8_t used[32]; >> > } ShortTermRPS; >> > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c >> > index d507c9b..427cf09 100644 >> > --- a/libavcodec/hevc_ps.c >> > +++ b/libavcodec/hevc_ps.c >> > @@ -136,6 +136,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, >> AVCodecContext *avctx, >> > return AVERROR_INVALIDDATA; >> > } >> > rps_ridx = &sps->st_rps[sps->nb_st_rps - delta_idx]; >> > + rps->rps_idx_num_delta_pocs = rps_ridx->num_delta_pocs; >> > } else >> > rps_ridx = &sps->st_rps[rps - sps->st_rps - 1]; >> > >> > -- >> >> Forgot to put this into the commit message, but it fixes this sample: >> http://trailers.divx.com/hevc/Sintel_4k_27qp_24fps_1aud_9subs.mkv > > > Makes sense, lgtm. >
Pushed with more verbose commit message. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel