[FFmpeg-cvslog] hevc: simplify SAO computation, delay from one row its computation
ffmpeg | branch: master | Mickaël Raulet | Tue Jul 15 10:23:20 2014 +0200| [1241eb88704f75fe9e7d1de3663aa24d4318cdab] | committer: Michael Niedermayer hevc: simplify SAO computation, delay from one row its computation (cherry picked from commit f2c5f647cec786df26f442a85e6d685a131a50c9) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1241eb88704f75fe9e7d1de3663aa24d4318cdab --- libavcodec/hevc.c |4 +- libavcodec/hevc.h |2 +- libavcodec/hevc_filter.c | 225 +++- libavcodec/hevcdsp.c | 12 +- libavcodec/hevcdsp.h | 15 +- libavcodec/hevcdsp_template.c | 389 - 6 files changed, 194 insertions(+), 453 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index cc36f97..00db01e 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2092,7 +2092,7 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread) if (x_ctb + ctb_size >= s->sps->width && y_ctb + ctb_size >= s->sps->height) -ff_hevc_hls_filter(s, x_ctb, y_ctb); +ff_hevc_hls_filter(s, x_ctb, y_ctb, ctb_size); return ctb_addr_ts; } @@ -2167,7 +2167,7 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int } if ((x_ctb+ctb_size) >= s->sps->width && (y_ctb+ctb_size) >= s->sps->height ) { -ff_hevc_hls_filter(s, x_ctb, y_ctb); +ff_hevc_hls_filter(s, x_ctb, y_ctb, ctb_size); ff_thread_report_progress2(s->avctx, ctb_row , thread, SHIFT_CTB_WPP); return ctb_addr_ts; } diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index fea2d4d..8d28490 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -1001,7 +1001,7 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, int log2_trafo_size); int ff_hevc_cu_qp_delta_sign_flag(HEVCContext *s); int ff_hevc_cu_qp_delta_abs(HEVCContext *s); -void ff_hevc_hls_filter(HEVCContext *s, int x, int y); +void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size); void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size); void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, int log2_trafo_size, enum ScanType scan_idx, diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c index ec7a211..f1ba1a3 100644 --- a/libavcodec/hevc_filter.c +++ b/libavcodec/hevc_filter.c @@ -153,129 +153,97 @@ static void copy_CTB(uint8_t *dst, uint8_t *src, static void sao_filter_CTB(HEVCContext *s, int x, int y) { -// TODO: This should be easily parallelizable -// TODO: skip CBs when (cu_transquant_bypass_flag || (pcm_loop_filter_disable_flag && pcm_flag)) -int c_idx = 0; -int class = 1, class_index; +int c_idx; int edges[4]; // 0 left 1 top 2 right 3 bottom -SAOParams *sao[4]; -int classes[4]; -int x_shift = 0, y_shift = 0; -int x_ctb = x >> s->sps->log2_ctb_size; -int y_ctb = y >> s->sps->log2_ctb_size; -int ctb_addr_rs = y_ctb * s->sps->ctb_width + x_ctb; -int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[ctb_addr_rs]; - +int x_ctb= x >> s->sps->log2_ctb_size; +int y_ctb= y >> s->sps->log2_ctb_size; +int ctb_addr_rs = y_ctb * s->sps->ctb_width + x_ctb; +int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[ctb_addr_rs]; +SAOParams *sao = &CTB(s->sao, x_ctb, y_ctb); // flags indicating unfilterable edges -uint8_t vert_edge[] = { 0, 0, 0, 0 }; -uint8_t horiz_edge[] = { 0, 0, 0, 0 }; -uint8_t diag_edge[] = { 0, 0, 0, 0 }; -uint8_t lfase[3]; // current, above, left -uint8_t no_tile_filter = s->pps->tiles_enabled_flag && - !s->pps->loop_filter_across_tiles_enabled_flag; -uint8_t left_tile_edge = 0; -uint8_t up_tile_edge = 0; - -sao[0] = &CTB(s->sao, x_ctb, y_ctb); +uint8_t vert_edge[] = { 0, 0 }; +uint8_t horiz_edge[] = { 0, 0 }; +uint8_t diag_edge[] = { 0, 0, 0, 0 }; +uint8_t lfase= CTB(s->filter_slice_edges, x_ctb, y_ctb); +uint8_t no_tile_filter = s->pps->tiles_enabled_flag && + !s->pps->loop_filter_across_tiles_enabled_flag; +uint8_t restore = no_tile_filter || !lfase; +uint8_t left_tile_edge = 0; +uint8_t right_tile_edge = 0; +uint8_t up_tile_edge = 0; +uint8_t bottom_tile_edge = 0; + edges[0] = x_ctb == 0; edges[1] = y_ctb == 0; edges[2] = x_ctb == s->sps->ctb_width - 1; edges[3] = y_ctb == s->sps->ctb_height - 1; -lfase[0] = CTB(s->filter_slice_edges, x_ctb, y_ctb); -classes[0] = 0; - -if (!edges[0]) { -left_tile_edge = no_tile_filter && s->pps->tile_id[ctb_addr_ts] != s->pps->tile_id[s
[FFmpeg-cvslog] hevc: move restore_tqb where it should be.
ffmpeg | branch: master | Mickaël Raulet | Mon Jul 14 16:57:45 2014 +0200| [f5beda3bfd753d1fc9488583eb8be7510a333ea0] | committer: Michael Niedermayer hevc: move restore_tqb where it should be. (cherry picked from commit 8fafc96a9805d11bfe32537c8f78a294a5844065) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5beda3bfd753d1fc9488583eb8be7510a333ea0 --- libavcodec/hevc.c| 31 --- libavcodec/hevc_filter.c | 33 + 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 00db01e..e4e5a07 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2286,33 +2286,6 @@ static int hls_nal_unit(HEVCContext *s) return nuh_layer_id == 0; } -static void restore_tqb_pixels(HEVCContext *s) -{ -int min_pu_size = 1 << s->sps->log2_min_pu_size; -int x, y, c_idx; - -for (c_idx = 0; c_idx < 3; c_idx++) { -ptrdiff_t stride = s->frame->linesize[c_idx]; -int hshift = s->sps->hshift[c_idx]; -int vshift = s->sps->vshift[c_idx]; -for (y = 0; y < s->sps->min_pu_height; y++) { -for (x = 0; x < s->sps->min_pu_width; x++) { -if (s->is_pcm[y * s->sps->min_pu_width + x]) { -int n; -int len = min_pu_size >> hshift; -uint8_t *src = &s->frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)]; -uint8_t *dst = &s->sao_frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)]; -for (n = 0; n < (min_pu_size >> vshift); n++) { -memcpy(dst, src, len); -src += stride; -dst += stride; -} -} -} -} -} -} - static int set_side_data(HEVCContext *s) { AVFrame *out = s->ref->frame; @@ -2528,10 +2501,6 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) ctb_addr_ts = hls_slice_data(s); if (ctb_addr_ts >= (s->sps->ctb_width * s->sps->ctb_height)) { s->is_decoded = 1; -if ((s->pps->transquant_bypass_enable_flag || - (s->sps->pcm.loop_filter_disable_flag && s->sps->pcm_enabled_flag)) && -s->sps->sao_enabled) -restore_tqb_pixels(s); } if (ctb_addr_ts < 0) { diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c index f1ba1a3..d18e04f 100644 --- a/libavcodec/hevc_filter.c +++ b/libavcodec/hevc_filter.c @@ -149,6 +149,37 @@ static void copy_CTB(uint8_t *dst, uint8_t *src, } } +static void restore_tqb_pixels(HEVCContext *s, int x0, int y0, int width, int height, int c_idx) +{ +if ( s->pps->transquant_bypass_enable_flag || +(s->sps->pcm.loop_filter_disable_flag && s->sps->pcm_enabled_flag)) { +int x, y; +ptrdiff_t stride = s->frame->linesize[c_idx]; +int min_pu_size = 1 << s->sps->log2_min_pu_size; +int hshift = s->sps->hshift[c_idx]; +int vshift = s->sps->vshift[c_idx]; +int x_min= ((x0 ) >> s->sps->log2_min_pu_size); +int y_min= ((y0 ) >> s->sps->log2_min_pu_size); +int x_max= ((x0 + width ) >> s->sps->log2_min_pu_size); +int y_max= ((y0 + height) >> s->sps->log2_min_pu_size); +int len = min_pu_size >> hshift; +for (y = y_min; y < y_max; y++) { +for (x = x_min; x < x_max; x++) { +if (s->is_pcm[y * s->sps->min_pu_width + x]) { +int n; +uint8_t *src = &s->frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)]; +uint8_t *dst = &s->sao_frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)]; +for (n = 0; n < (min_pu_size >> vshift); n++) { +memcpy(dst, src, len); +src += stride; +dst += stride; +} +} +} +} +} +} + #define CTB(tab, x, y) ((tab)[(y) * s->sps->ctb_width + (x)]) static void sao_filter_CTB(HEVCContext *s, int x, int y) @@ -230,6 +261,7 @@ static void sao_filter_CTB(HEVCContext *s, int x, int y) sao, edges, width, height, c_idx); +restore_tqb_pixels(s, x, y, width, height, c_idx);
[FFmpeg-cvslog] hevc: use local variable for split_cu_flag
ffmpeg | branch: master | Mickaël Raulet | Tue Jul 15 10:27:14 2014 +0200| [255086a7e06417d98417cea192053b8a8531eb24] | committer: Michael Niedermayer hevc: use local variable for split_cu_flag (cherry picked from commit ee71e9e9c12fc47856c452efb278f9f593a923ee) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=255086a7e06417d98417cea192053b8a8531eb24 --- libavcodec/hevc.c | 14 +- libavcodec/hevc.h |1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index e4e5a07..d30e1fb 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -55,7 +55,6 @@ static void pic_arrays_free(HEVCContext *s) { av_freep(&s->sao); av_freep(&s->deblock); -av_freep(&s->split_cu_flag); av_freep(&s->skip_flag); av_freep(&s->tab_ct_depth); @@ -85,7 +84,6 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) int log2_min_cb_size = sps->log2_min_cb_size; int width= sps->width; int height = sps->height; -int pic_size = width * height; int pic_size_in_ctb = ((width >> log2_min_cb_size) + 1) * ((height >> log2_min_cb_size) + 1); int ctb_count= sps->ctb_width * sps->ctb_height; @@ -96,8 +94,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) s->sao = av_mallocz_array(ctb_count, sizeof(*s->sao)); s->deblock = av_mallocz_array(ctb_count, sizeof(*s->deblock)); -s->split_cu_flag = av_malloc(pic_size); -if (!s->sao || !s->deblock || !s->split_cu_flag) +if (!s->sao || !s->deblock) goto fail; s->skip_flag= av_malloc(pic_size_in_ctb); @@ -1915,16 +1912,15 @@ static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, const int cb_size= 1 << log2_cb_size; int ret; int qp_block_mask = (1<<(s->sps->log2_ctb_size - s->pps->diff_cu_qp_delta_depth)) - 1; +int split_cu_flag; lc->ct.depth = cb_depth; if (x0 + cb_size <= s->sps->width && y0 + cb_size <= s->sps->height && log2_cb_size > s->sps->log2_min_cb_size) { -SAMPLE(s->split_cu_flag, x0, y0) = -ff_hevc_split_coding_unit_flag_decode(s, cb_depth, x0, y0); +split_cu_flag = ff_hevc_split_coding_unit_flag_decode(s, cb_depth, x0, y0); } else { -SAMPLE(s->split_cu_flag, x0, y0) = -(log2_cb_size > s->sps->log2_min_cb_size); +split_cu_flag = (log2_cb_size > s->sps->log2_min_cb_size); } if (s->pps->cu_qp_delta_enabled_flag && log2_cb_size >= s->sps->log2_ctb_size - s->pps->diff_cu_qp_delta_depth) { @@ -1932,7 +1928,7 @@ static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, lc->tu.cu_qp_delta = 0; } -if (SAMPLE(s->split_cu_flag, x0, y0)) { +if (split_cu_flag) { const int cb_size_split = cb_size >> 1; const int x1 = x0 + cb_size_split; const int y1 = y0 + cb_size_split; diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index 8d28490..81753e2 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -825,7 +825,6 @@ typedef struct HEVCContext { VideoDSPContext vdsp; BswapDSPContext bdsp; int8_t *qp_y_tab; -uint8_t *split_cu_flag; uint8_t *horizontal_bs; uint8_t *vertical_bs; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] hevc: separate residu and prediction (needed for Range Extension)
ffmpeg | branch: master | Mickaël Raulet | Mon Jul 14 21:17:33 2014 +0200| [250430bf28118cf843df887e8c8b345f1c60c82d] | committer: Michael Niedermayer hevc: separate residu and prediction (needed for Range Extension) (cherry picked from commit 6b3856ef57d66f2e59ee61fd2eb5f83b6d0d7d4a) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=250430bf28118cf843df887e8c8b345f1c60c82d --- libavcodec/hevc_cabac.c | 13 ++-- libavcodec/hevcdsp.c | 26 +++ libavcodec/hevcdsp.h | 14 ++-- libavcodec/hevcdsp_template.c | 168 + 4 files changed, 112 insertions(+), 109 deletions(-) diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c index 2647388..3da2bf0 100644 --- a/libavcodec/hevc_cabac.c +++ b/libavcodec/hevc_cabac.c @@ -1383,17 +1383,15 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, } } -if (lc->cu.cu_transquant_bypass_flag) { -s->hevcdsp.transquant_bypass[log2_trafo_size-2](dst, coeffs, stride); -} else { +if (!lc->cu.cu_transquant_bypass_flag) { if (transform_skip_flag) -s->hevcdsp.transform_skip(dst, coeffs, stride); +s->hevcdsp.transform_skip(coeffs, log2_trafo_size); else if (lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2) -s->hevcdsp.transform_4x4_luma_add(dst, coeffs, stride); +s->hevcdsp.idct_4x4_luma(coeffs); else { int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y); if (max_xy == 0) -s->hevcdsp.transform_dc_add[log2_trafo_size-2](dst, coeffs, stride); +s->hevcdsp.idct_dc[log2_trafo_size-2](coeffs); else { int col_limit = last_significant_coeff_x + last_significant_coeff_y + 4; if (max_xy < 4) @@ -1402,10 +1400,11 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, col_limit = FFMIN(8, col_limit); else if (max_xy < 12) col_limit = FFMIN(24, col_limit); -s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride, col_limit); +s->hevcdsp.idct[log2_trafo_size-2](coeffs, col_limit); } } } +s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride); } void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size) diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c index d89d6db..eeea542 100644 --- a/libavcodec/hevcdsp.c +++ b/libavcodec/hevcdsp.c @@ -191,21 +191,21 @@ void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth) #define HEVC_DSP(depth) \ hevcdsp->put_pcm= FUNC(put_pcm, depth); \ -hevcdsp->transquant_bypass[0] = FUNC(transquant_bypass4x4, depth);\ -hevcdsp->transquant_bypass[1] = FUNC(transquant_bypass8x8, depth);\ -hevcdsp->transquant_bypass[2] = FUNC(transquant_bypass16x16, depth); \ -hevcdsp->transquant_bypass[3] = FUNC(transquant_bypass32x32, depth); \ +hevcdsp->transform_add[0] = FUNC(transform_add4x4, depth);\ +hevcdsp->transform_add[1] = FUNC(transform_add8x8, depth);\ +hevcdsp->transform_add[2] = FUNC(transform_add16x16, depth); \ +hevcdsp->transform_add[3] = FUNC(transform_add32x32, depth); \ hevcdsp->transform_skip = FUNC(transform_skip, depth); \ -hevcdsp->transform_4x4_luma_add = FUNC(transform_4x4_luma_add, depth); \ -hevcdsp->transform_add[0] = FUNC(transform_4x4_add, depth); \ -hevcdsp->transform_add[1] = FUNC(transform_8x8_add, depth); \ -hevcdsp->transform_add[2] = FUNC(transform_16x16_add, depth); \ -hevcdsp->transform_add[3] = FUNC(transform_32x32_add, depth); \ +hevcdsp->idct_4x4_luma = FUNC(transform_4x4_luma, depth); \ +hevcdsp->idct[0]= FUNC(idct_4x4, depth);\ +hevcdsp->idct[1]= FUNC(idct_8x8, depth);\ +hevcdsp->idct[2]= FUNC(idct_16x16, depth); \ +hevcdsp->idct[3]= FUNC(idct_32x32, depth); \ \ -hevcdsp->transform_dc_add[0]= FUNC(transform_4x4_dc_add, depth);\ -hevcdsp->transform_dc_add[1]= FUNC(transform_8x8_dc_add, depth);\ -hevcdsp->transform_dc_add[2]= FUNC(transform_16x16_dc_add, depth); \ -hevcdsp->transform_dc_add[3]= FUNC(transform_32x32_dc_add, depth); \ +hevcdsp->idct_dc[0] = FUNC(idct_4x4_dc, depth); \ +hevcdsp->idct_dc[1] = FUNC(idct_8x8_dc, depth); \ +hevcdsp->idct_dc[2]
[FFmpeg-cvslog] hevc/rext: add support for Range extension tools
ffmpeg | branch: master | Mickaël Raulet | Tue Jul 15 00:20:22 2014 +0200| [453f8eaee213a1940c5d5dda7cb1bcd148e2c183] | committer: Michael Niedermayer hevc/rext: add support for Range extension tools SPS features/flags: - transform_skip_rotation_enabled_flag - transform_skip_context_enabled_flag - implicit_rdpcm_enabled_flag - explicit_rdpcm_enabled_flag - intra_smoothing_disabled_flag - persistent_rice_adaptation_enabled_flag PPS features/flags: - log2_max_transform_skip_block_size - cross_component_prediction_enabled_flag - chroma_qp_offset_list_enabled_flag - diff_cu_chroma_qp_offset_depth - chroma_qp_offset_list_len_minus1 - cb_qp_offset_list - cr_qp_offset_list - log2_sao_offset_scale_luma - log2_sao_offset_scale_chroma (cherry picked from commit 005294c5b939a23099871c6130c8a7cc331f73ee) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=453f8eaee213a1940c5d5dda7cb1bcd148e2c183 --- libavcodec/hevc.c | 89 + libavcodec/hevc.h | 15 ++ libavcodec/hevc_cabac.c | 406 - libavcodec/hevcdsp.c |1 + libavcodec/hevcdsp.h |2 + libavcodec/hevcdsp_template.c | 23 +++ 6 files changed, 409 insertions(+), 127 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 75bdb80..17f7252 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -628,6 +628,11 @@ static int hls_slice_header(HEVCContext *s) sh->slice_cr_qp_offset = 0; } +if (s->pps->chroma_qp_offset_list_enabled_flag) +sh->cu_chroma_qp_offset_enabled_flag = get_bits1(gb); +else +sh->cu_chroma_qp_offset_enabled_flag = 0; + if (s->pps->deblocking_filter_control_present_flag) { int deblocking_filter_override_flag = 0; @@ -738,6 +743,8 @@ static int hls_slice_header(HEVCContext *s) s->HEVClc->qp_y = s->sh.slice_qp; s->slice_initialized = 1; +s->HEVClc->tu.cu_qp_offset_cb = 0; +s->HEVClc->tu.cu_qp_offset_cr = 0; return 0; } @@ -830,6 +837,22 @@ static void hls_sao_param(HEVCContext *s, int rx, int ry) #undef SET_SAO #undef CTB +static int hls_cross_component_pred(HEVCContext *s, int idx) { +HEVCLocalContext *lc= s->HEVClc; +int log2_res_scale_abs_plus1 = ff_hevc_log2_res_scale_abs(s, idx); + +if (log2_res_scale_abs_plus1 != 0) { +int res_scale_sign_flag = ff_hevc_res_scale_sign_flag(s, idx); +lc->tu.res_scale_val = (1 << (log2_res_scale_abs_plus1 - 1)) * + (1 - 2 * res_scale_sign_flag); +} else { +lc->tu.res_scale_val = 0; +} + + +return 0; +} + static int hls_transform_unit(HEVCContext *s, int x0, int y0, int xBase, int yBase, int cb_xBase, int cb_yBase, int log2_cb_size, int log2_trafo_size, @@ -882,6 +905,25 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0, ff_hevc_set_qPy(s, x0, y0, cb_xBase, cb_yBase, log2_cb_size); } +if (s->sh.cu_chroma_qp_offset_enabled_flag && cbf_chroma && +!lc->cu.cu_transquant_bypass_flag && !lc->tu.is_cu_chroma_qp_offset_coded) { +int cu_chroma_qp_offset_flag = ff_hevc_cu_chroma_qp_offset_flag(s); +if (cu_chroma_qp_offset_flag) { +int cu_chroma_qp_offset_idx = 0; +if (s->pps->chroma_qp_offset_list_len_minus1 > 0) { +cu_chroma_qp_offset_idx = ff_hevc_cu_chroma_qp_offset_idx(s); +av_log(s->avctx, AV_LOG_ERROR, +"cu_chroma_qp_offset_idx not yet tested.\n"); +} +lc->tu.cu_qp_offset_cb = s->pps->cb_qp_offset_list[cu_chroma_qp_offset_idx]; +lc->tu.cu_qp_offset_cr = s->pps->cr_qp_offset_list[cu_chroma_qp_offset_idx]; +} else { +lc->tu.cu_qp_offset_cb = 0; +lc->tu.cu_qp_offset_cr = 0; +} +lc->tu.is_cu_chroma_qp_offset_coded = 1; +} + if (lc->cu.pred_mode == MODE_INTRA && log2_trafo_size < 4) { if (lc->tu.intra_pred_mode >= 6 && lc->tu.intra_pred_mode <= 14) { @@ -900,13 +942,20 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0, } } +lc->tu.cross_pf = 0; if (cbf_luma) ff_hevc_hls_residual_coding(s, x0, y0, log2_trafo_size, scan_idx, 0); if (log2_trafo_size > 2 || s->sps->chroma_format_idc == 3) { int trafo_size_h = 1 << (log2_trafo_size_c + s->sps->hshift[1]); int trafo_size_v = 1 << (log2_trafo_size_c + s->sps->vshift[1]); +lc->tu.cross_pf = (s->pps->cross_component_prediction_enabled_flag && cbf_luma && +(lc->cu.pred_mode == MODE_INTER || + (lc->tu.chroma_mode_c == 4)))
[FFmpeg-cvslog] doc/utils: add missing `@c man end` title
ffmpeg | branch: master | Timothy Gu | Mon Jul 14 16:21:15 2014 -0700| [7bf5084e30067dbf241a52688dad9756b06cc29f] | committer: Michael Niedermayer doc/utils: add missing `@c man end` title Signed-off-by: Timothy Gu Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7bf5084e30067dbf241a52688dad9756b06cc29f --- doc/utils.texi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/utils.texi b/doc/utils.texi index 5abfb0c..c46ad45 100644 --- a/doc/utils.texi +++ b/doc/utils.texi @@ -1031,7 +1031,7 @@ indication of the corresponding powers of 10 and of 2. 10^24 / 2^70 @end table -@c man end +@c man end EXPRESSION EVALUATION @chapter OpenCL Options @c man begin OPENCL OPTIONS ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: Fix copying timebase to muxer context
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 15:45:06 2014 +0200| [01c17b5224ce0c9899a58f639ef6611fe626ef5f] | committer: Michael Niedermayer ffmpeg: Fix copying timebase to muxer context Fixes Ticket3741 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01c17b5224ce0c9899a58f639ef6611fe626ef5f --- ffmpeg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 0bdbe14..1c1a559 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2880,7 +2880,7 @@ static int transcode_init(void) ost->st->codec->codec= ost->enc_ctx->codec; // copy timebase while removing common factors -ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0}); +ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1}); } /* init input streams */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpegvideo_enc: return proper error instead of failing assertion when max rate is not set
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 18:49:18 2014 +0200| [19e5114eaad9631a4a7431a96857a0b03e164717] | committer: Michael Niedermayer avcodec/mpegvideo_enc: return proper error instead of failing assertion when max rate is not set Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19e5114eaad9631a4a7431a96857a0b03e164717 --- libavcodec/mpegvideo_enc.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 56867cc..9c4f2a5 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -388,8 +388,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) if ((!avctx->rc_max_rate) != (!avctx->rc_buffer_size)) { av_log(avctx, AV_LOG_ERROR, "Either both buffer size and max rate or neither must be specified\n"); -if (avctx->rc_max_rate && !avctx->rc_buffer_size) -return -1; +return -1; } if (avctx->rc_min_rate && avctx->rc_max_rate != avctx->rc_min_rate) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/options_table: add liberal limits to intra dc precission
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 19:04:51 2014 +0200| [8a91cf857b206d8f8d762932891fb878f32cc532] | committer: Michael Niedermayer avcodec/options_table: add liberal limits to intra dc precission Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a91cf857b206d8f8d762932891fb878f32cc532 --- libavcodec/options_table.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index fa0bdf8..cbefa52 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -317,7 +317,7 @@ static const AVOption avcodec_options[] = { {"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"}, {"me_threshold", "motion estimation threshold", OFFSET(me_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"mb_threshold", "macroblock threshold", OFFSET(mb_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"dc", "intra_dc_precision", OFFSET(intra_dc_precision), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, V|E}, +{"dc", "intra_dc_precision", OFFSET(intra_dc_precision), AV_OPT_TYPE_INT, {.i64 = 0 }, -8, 16, V|E}, {"nssew", "nsse weight", OFFSET(nsse_weight), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E}, {"skip_top", "number of macroblock rows at the top which are skipped", OFFSET(skip_top), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D}, {"skip_bottom", "number of macroblock rows at the bottom which are skipped", OFFSET(skip_bottom), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D}, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpegvideo_enc: workaround applications specifying intra dc level based on 8 and othes based on 0bit
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 19:12:00 2014 +0200| [97f86cd97604b705d6065be8088dce9cb150dc25] | committer: Michael Niedermayer avcodec/mpegvideo_enc: workaround applications specifying intra dc level based on 8 and othes based on 0bit Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97f86cd97604b705d6065be8088dce9cb150dc25 --- libavcodec/mpegvideo_enc.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 9c4f2a5..e88b4f3 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -335,6 +335,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) s->mpeg_quant = avctx->mpeg_quant; s->rtp_mode = !!avctx->rtp_payload_size; s->intra_dc_precision = avctx->intra_dc_precision; + +// workaround some differences between how applications specify dc precission +if (s->intra_dc_precision < 0) { +s->intra_dc_precision += 8; +} else if (s->intra_dc_precision >= 8) +s->intra_dc_precision -= 8; + s->user_specified_pts = AV_NOPTS_VALUE; if (s->gop_size <= 1) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpegvideo_enc: check intra dc precission
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 19:12:55 2014 +0200| [339d8fb3532a9c0ddd3d4902b798cd220f616919] | committer: Michael Niedermayer avcodec/mpegvideo_enc: check intra dc precission Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=339d8fb3532a9c0ddd3d4902b798cd220f616919 --- libavcodec/mpegvideo_enc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index e88b4f3..4bb79f6 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -342,6 +342,17 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) } else if (s->intra_dc_precision >= 8) s->intra_dc_precision -= 8; +if (s->intra_dc_precision < 0) { +av_log(avctx, AV_LOG_ERROR, +"intra dc precision must be positive, note some applications use" +" 0 and some 8 as base meaning 8bit, the value must not be smaller than that\n"); +return AVERROR(EINVAL); +} + +if (s->intra_dc_precision > (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO ? 3 : 0)) { +av_log(avctx, AV_LOG_ERROR, "intra dc precision too large\n"); +return AVERROR(EINVAL); +} s->user_specified_pts = AV_NOPTS_VALUE; if (s->gop_size <= 1) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpegvideo_enc: make edge for interlaced mpeg2 encoding smaller
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 19:51:02 2014 +0200| [5bda0467d284e7f8b15101bbc8b0e417cc4ecb38] | committer: Michael Niedermayer avcodec/mpegvideo_enc: make edge for interlaced mpeg2 encoding smaller Fixes segfault the size can probably be reduced further for the mpeg2 case Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bda0467d284e7f8b15101bbc8b0e417cc4ecb38 --- libavcodec/mpegvideo_enc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 4bb79f6..a4786b4 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1146,7 +1146,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) int vpad = 16; if ( s->codec_id == AV_CODEC_ID_MPEG2VIDEO -&& !s->progressive_sequence) +&& !s->progressive_sequence +&& FFALIGN(s->height, 32) - s->height > 16) vpad = 32; if (!s->avctx->rc_buffer_size) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg_opt: remove intra_dc_precision, its handled by AVOptions
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 20:18:19 2014 +0200| [e10b62ab5d35ecdf9c5f2b57dd05934b0e203330] | committer: Michael Niedermayer ffmpeg_opt: remove intra_dc_precision, its handled by AVOptions Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e10b62ab5d35ecdf9c5f2b57dd05934b0e203330 --- ffmpeg_opt.c |4 1 file changed, 4 deletions(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 7439bc5..ab13d3c 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -104,7 +104,6 @@ float max_error_rate = 2.0/3; static int intra_only = 0; static int file_overwrite = 0; static int no_file_overwrite = 0; -static int intra_dc_precision = 8; static int do_psnr= 0; static int input_sync; static int override_ffserver = 0; @@ -1378,7 +1377,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in if (p) p++; } video_enc->rc_override_count = i; -video_enc->intra_dc_precision = intra_dc_precision - 8; if (do_psnr) video_enc->flags|= CODEC_FLAG_PSNR; @@ -2932,8 +2930,6 @@ const OptionDef options[] = { { "top", OPT_VIDEO | HAS_ARG | OPT_EXPERT | OPT_INT| OPT_SPEC | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(top_field_first) }, "top=1/bottom=0/auto=-1 field first", "" }, -{ "dc", OPT_VIDEO | OPT_INT | HAS_ARG | OPT_EXPERT , { &intra_dc_precision }, -"intra_dc_precision", "precision" }, { "vtag", OPT_VIDEO | HAS_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_old2new }, "force video tag/fourcc", "fourcc/tag" }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] build: fix build with --disable-encoders
ffmpeg | branch: master | Clément Bœsch | Tue Jul 15 21:26:14 2014 +0200| [7a15c22c5f76c1e5261b9ac023f95f418f8459d8] | committer: Clément Bœsch build: fix build with --disable-encoders draw_edges() should probably be moved somewhere else to avoid mpegvideo*enc* dependency to decoders. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a15c22c5f76c1e5261b9ac023f95f418f8459d8 --- configure |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 51efc39..8c8aef6 100755 --- a/configure +++ b/configure @@ -2046,7 +2046,7 @@ cook_decoder_select="audiodsp mdct sinewin" cscd_decoder_select="lzo" cscd_decoder_suggest="zlib" dca_decoder_select="mdct" -dirac_decoder_select="dsputil dwt golomb videodsp" +dirac_decoder_select="dsputil dwt golomb videodsp mpegvideoenc" dnxhd_decoder_select="blockdsp idctdsp" dnxhd_encoder_select="aandcttables blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp" dvvideo_decoder_select="dvprofile idctdsp" @@ -2155,7 +2155,7 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_e rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_er mpegvideo videodsp" shorten_decoder_select="golomb" sipr_decoder_select="lsp" -snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder" +snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder mpegvideoenc" snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rangecoder" sonic_decoder_select="golomb rangecoder" sonic_encoder_select="golomb rangecoder" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil & avdevice: remove av_bprint_fd_contents()
ffmpeg | branch: master | Michael Niedermayer | Sun Jul 13 15:56:06 2014 +0200| [95144729045fe00130f6b3547c04d40d1b48b157] | committer: Michael Niedermayer avutil & avdevice: remove av_bprint_fd_contents() MSVC does not allow passing file pointers between libs This API can thus not work with MSVC and as it was very recently added and its it was in no release its removial should not cause any problems A better API will be implemented, but its not finished yet, this revert is to avoid potentially blocking the release Found-by: Hendrik Leppkes Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95144729045fe00130f6b3547c04d40d1b48b157 --- libavdevice/lavfi.c | 39 --- libavutil/bprint.c | 24 libavutil/bprint.h |7 --- 3 files changed, 16 insertions(+), 54 deletions(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 4fc09d8..d1904dd 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -26,7 +26,6 @@ /* #define DEBUG */ #include /* DBL_MIN, DBL_MAX */ -#include /* O_RDONLY */ #include "libavutil/bprint.h" #include "libavutil/channel_layout.h" @@ -42,13 +41,6 @@ #include "libavformat/internal.h" #include "avdevice.h" -#if HAVE_UNISTD_H -#include /* close() */ -#endif -#if HAVE_IO_H -#include -#endif - typedef struct { AVClass *class; ///< class for private options char *graph_str; @@ -123,22 +115,23 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) } if (lavfi->graph_filename) { -AVBPrint graph_file_pb; -int fd = avpriv_open(lavfi->graph_filename, O_RDONLY); -if (fd == -1) -FAIL(AVERROR(EINVAL)); -av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED); -ret = av_bprint_fd_contents(&graph_file_pb, fd); -av_bprint_chars(&graph_file_pb, '\0', 1); -close(fd); -if (!ret && !av_bprint_is_complete(&graph_file_pb)) -ret = AVERROR(ENOMEM); -if (ret) { -av_bprint_finalize(&graph_file_pb, NULL); -FAIL(ret); +uint8_t *file_buf, *graph_buf; +size_t file_bufsize; +ret = av_file_map(lavfi->graph_filename, + &file_buf, &file_bufsize, 0, avctx); +if (ret < 0) +goto end; + +/* create a 0-terminated string based on the read file */ +graph_buf = av_malloc(file_bufsize + 1); +if (!graph_buf) { +av_file_unmap(file_buf, file_bufsize); +FAIL(AVERROR(ENOMEM)); } -if ((ret = av_bprint_finalize(&graph_file_pb, &lavfi->graph_str))) -FAIL(ret); +memcpy(graph_buf, file_buf, file_bufsize); +graph_buf[file_bufsize] = 0; +av_file_unmap(file_buf, file_bufsize); +lavfi->graph_str = graph_buf; } if (!lavfi->graph_str) diff --git a/libavutil/bprint.c b/libavutil/bprint.c index 325ff17..0a0d078 100644 --- a/libavutil/bprint.c +++ b/libavutil/bprint.c @@ -30,14 +30,6 @@ #include "error.h" #include "mem.h" -#if HAVE_IO_H -#include -#endif -#if HAVE_UNISTD_H -#include -#endif - - #define av_bprint_room(buf) ((buf)->size - FFMIN((buf)->len, (buf)->size)) #define av_bprint_is_allocated(buf) ((buf)->str != (buf)->reserved_internal_buffer) @@ -312,22 +304,6 @@ void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_cha } } -int av_bprint_fd_contents(AVBPrint *pb, int fd) -{ -int ret; -char buf[1024]; -while (1) { -ret = read(fd, buf, sizeof(buf)); -if (!ret) -return 0; -else if (ret < 0) -return AVERROR(errno); -av_bprint_append_data(pb, buf, ret); -if (!av_bprint_is_complete(pb)) -return AVERROR(ENOMEM); -} -} - #ifdef TEST #undef printf diff --git a/libavutil/bprint.h b/libavutil/bprint.h index 1b23b9f..839ec1e 100644 --- a/libavutil/bprint.h +++ b/libavutil/bprint.h @@ -213,11 +213,4 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str); void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, enum AVEscapeMode mode, int flags); -/** - * Read contents of fd into print buffer up to EOF. - * - * @return 0 for success, error code otherwise - */ -int av_bprint_fd_contents(AVBPrint *pb, int fd); - #endif /* AVUTIL_BPRINT_H */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc_ps: prevent stale pointer in malloc failure case
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 21:43:04 2014 +0200| [0fc2045d5f4eab35d943a79c3d965a2f31361f48] | committer: Michael Niedermayer avcodec/hevc_ps: prevent stale pointer in malloc failure case Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0fc2045d5f4eab35d943a79c3d965a2f31361f48 --- libavcodec/hevc_ps.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index ba166cb..98d987d 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1016,6 +1016,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) if (s->sps_list[sps_id] && s->sps == (HEVCSPS*)s->sps_list[sps_id]->data) { av_buffer_unref(&s->current_sps); s->current_sps = av_buffer_ref(s->sps_list[sps_id]); +if (!s->current_sps) +s->sps = NULL; } av_buffer_unref(&s->sps_list[sps_id]); s->sps_list[sps_id] = sps_buf; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc: treat current_sps like sps_list
ffmpeg | branch: master | Michael Niedermayer | Tue Jul 15 21:43:30 2014 +0200| [880dbe43ca71982ecdfe1c73446137d6b2fd24d5] | committer: Michael Niedermayer avcodec/hevc: treat current_sps like sps_list This simplifies the management of current_sps Fixes Ticket3458 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=880dbe43ca71982ecdfe1c73446137d6b2fd24d5 --- libavcodec/hevc.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 17f7252..cccd07a 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -3291,9 +3291,12 @@ static int hevc_update_thread_context(AVCodecContext *dst, } } -if (s->current_sps && s->sps == (HEVCSPS*)s->current_sps->data) -s->sps = NULL; av_buffer_unref(&s->current_sps); +if (s0->current_sps) { +s->current_sps = av_buffer_ref(s0->current_sps); +if (!s->current_sps) +return AVERROR(ENOMEM); +} if (s->sps != s0->sps) ret = set_sps(s, s0->sps); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Blackframe video filter now sets metadata accordingly.
ffmpeg | branch: master | Stepan Bujnak | Fri Jul 11 23:40:07 2014 +0200| [895e92eca0509e540e98913436533ae032552655] | committer: Michael Niedermayer Blackframe video filter now sets metadata accordingly. the libavfilter/vf_blackframe.c filter now not only logs detected values, but also sets frame metadata. Currently, only `pblack` value is set but `SET_META` macro has been introduced to ease development in the future. Signed-off-by: Stepan Bujnak Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=895e92eca0509e540e98913436533ae032552655 --- libavfilter/vf_blackframe.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 0eeda61..1be9fcc 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -58,6 +58,10 @@ static int query_formats(AVFilterContext *ctx) return 0; } +#define SET_META(key, format, value) \ +snprintf(buf, sizeof(buf), format, value); \ +av_dict_set(metadata, key, buf, 0) + static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; @@ -65,6 +69,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) int x, i; int pblack = 0; uint8_t *p = frame->data[0]; +AVDictionary **metadata; +char buf[32]; for (i = 0; i < frame->height; i++) { for (x = 0; x < inlink->w; x++) @@ -76,13 +82,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) s->last_keyframe = s->frame; pblack = s->nblack * 100 / (inlink->w * inlink->h); -if (pblack >= s->bamount) +if (pblack >= s->bamount) { +metadata = avpriv_frame_get_metadatap(frame); + av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pts:%"PRId64" t:%f " "type:%c last_keyframe:%d\n", s->frame, pblack, frame->pts, frame->pts == AV_NOPTS_VALUE ? -1 : frame->pts * av_q2d(inlink->time_base), av_get_picture_type_char(frame->pict_type), s->last_keyframe); +SET_META("lavfi.blackframe.pblack", "%u", pblack); +} + s->frame++; s->nblack = 0; return ff_filter_frame(inlink->dst->outputs[0], frame); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf: Add WebM DASH Manifest Muxer
ffmpeg | branch: master | Vignesh Venkatasubramanian | Mon Jul 14 09:52:23 2014 -0700| [3e73d1429045cc2985772391e1f36a034650880d] | committer: Michael Niedermayer lavf: Add WebM DASH Manifest Muxer This patch adds the ability to generate WebM DASH manifest XML using ffmpeg. A sample command line would be as follows: ffmpeg \ -f webm_dash_manifest -i video1.webm \ -f webm_dash_manifest -i video2.webm \ -f webm_dash_manifest -i audio1.webm \ -f webm_dash_manifest -i audio2.webm \ -map 0 -map 1 -map 2 -map 3 \ -c copy \ -f webm_dash_manifest \ -adaptation_sets “id=0,streams=0,1 id=1,streams=2,3” \ manifest.xml It works by exporting necessary fields as metadata tags in matroskadec and use those values to write the appropriate XML fields as per the WebM DASH Specification [1]. Some ideas are adopted from webm-tools project [2]. [1] https://sites.google.com/a/webmproject.org/wiki/adaptive-streaming/webm-dash-specification [2] https://chromium.googlesource.com/webm/webm-tools/+/master/webm_dash_manifest/ Signed-off-by: Vignesh Venkatasubramanian Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e73d1429045cc2985772391e1f36a034650880d --- Changelog |1 + RELEASE_NOTES |1 + doc/muxers.texi | 30 + libavformat/Makefile | 11 +- libavformat/allformats.c |1 + libavformat/version.h |2 +- libavformat/webmdashenc.c | 317 + 7 files changed, 360 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 169819b..ddf0f05 100644 --- a/Changelog +++ b/Changelog @@ -34,6 +34,7 @@ version : - Image format auto-detection - LRC demuxer and muxer - Samba protocol (via libsmbclient) +- WebM DASH Manifest muxer version 2.2: diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 349995f..4502d9f 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -151,6 +151,7 @@ • Image format auto-detection • LRC lyric file demuxer and muxer • Samba protocol (via libsmbclient) +• WebM DASH Manifest muxer ┌┐ │ libavfilter│ diff --git a/doc/muxers.texi b/doc/muxers.texi index dc2a08b..55e06a3 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -1100,4 +1100,34 @@ Note: some codecs may need different options depending on the output format; the auto-detection of this can not work with the tee muxer. The main example is the @option{global_header} flag. +@section webm_dash_manifest + +WebM DASH Manifest muxer. + +This muxer implements the WebM DASH Manifest specification to generate the DASH manifest XML. + +@subsection Options + +This muxer supports the following options: + +@table @option +@item adaptation_sets +This option has the following syntax: "id=x,streams=a,b,c id=y,streams=d,e" where x and y are the +unique identifiers of the adaptation sets and a,b,c,d and e are the indices of the corresponding +audio and video streams. Any number of adaptation sets can be added using this option. +@end table + +@subsection Example +@example +ffmpeg -f webm_dash_manifest -i video1.webm \ + -f webm_dash_manifest -i video2.webm \ + -f webm_dash_manifest -i audio1.webm \ + -f webm_dash_manifest -i audio2.webm \ + -map 0 -map 1 -map 2 -map 3 \ + -c copy \ + -f webm_dash_manifest \ + -adaptation_sets "id=0,streams=0,1 id=1,streams=2,3" \ + manifest.xml +@end example + @c man end MUXERS diff --git a/libavformat/Makefile b/libavformat/Makefile index a365463..9017e06 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -223,7 +223,8 @@ OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o matroska.o \ flac_picture.o replaygain.o OBJS-$(CONFIG_MATROSKA_MUXER)+= matroskaenc.o matroska.o \ isom.o avc.o hevc.o \ -flacenc_header.o avlanguage.o vorbiscomment.o wv.o +flacenc_header.o avlanguage.o vorbiscomment.o wv.o \ +webmdashenc.o OBJS-$(CONFIG_MD5_MUXER) += md5enc.o OBJS-$(CONFIG_MGSTS_DEMUXER) += mgsts.o OBJS-$(CONFIG_MICRODVD_DEMUXER) += microdvddec.o subtitles.o @@ -432,7 +433,13 @@ OBJS-$(CONFIG_WC3_DEMUXER) += wc3movie.o OBJS-$(CONFIG_WEBM_MUXER)+= matroskaenc.o matroska.o \ isom.o avc.o hevc.o \ flacenc_header.o avlanguage.o \ -wv.o vorbiscomment.o +wv.o vorbiscomment.o \ +webmdashenc.o +OBJS-$(CONFIG_WEBM_DASH_MANIFEST_DEMUXER)+= matroskadec.o matroska.o \ +
[FFmpeg-cvslog] diracdec: remove unused dsputil context
ffmpeg | branch: master | James Almer | Tue Jul 15 19:10:09 2014 -0300| [ad24256e7e9f0aa3f6f1dd563b020d3b37dcf6ae] | committer: Michael Niedermayer diracdec: remove unused dsputil context Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad24256e7e9f0aa3f6f1dd563b020d3b37dcf6ae --- libavcodec/diracdec.c |3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index d1c3758..a18c867 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -27,7 +27,6 @@ */ #include "avcodec.h" -#include "dsputil.h" #include "get_bits.h" #include "bytestream.h" #include "internal.h" @@ -138,7 +137,6 @@ typedef struct Plane { typedef struct DiracContext { AVCodecContext *avctx; -DSPContext dsp; MpegvideoEncDSPContext mpvencdsp; DiracDSPContext diracdsp; GetBitContext gb; @@ -425,7 +423,6 @@ static av_cold int dirac_decode_init(AVCodecContext *avctx) s->avctx = avctx; s->frame_number = -1; -ff_dsputil_init(&s->dsp, avctx); ff_diracdsp_init(&s->diracdsp); ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/matroskadec: fix declaration after statement
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 00:06:15 2014 +0200| [e240d01c120eb8a83b2b3020f0153bf509d6b136] | committer: Michael Niedermayer avformat/matroskadec: fix declaration after statement Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e240d01c120eb8a83b2b3020f0153bf509d6b136 --- libavformat/matroskadec.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 6fa8229..ec43526 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3233,7 +3233,9 @@ static int64_t webm_dash_manifest_compute_bandwidth(AVFormatContext *s, int64_t MatroskaDemuxContext *matroska = s->priv_data; AVStream *st = s->streams[0]; double bandwidth = 0.0; -for (int i = 0; i < st->nb_index_entries; i++) { +int i; + +for (i = 0; i < st->nb_index_entries; i++) { int64_t prebuffer_ns = 10; int64_t time_ns = st->index_entries[i].timestamp * matroska->time_scale; double nano_seconds_per_second = 10.0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/matroska: Add functions for WebM DASH Manifest
ffmpeg | branch: master | Vignesh Venkatasubramanian | Mon Jul 7 12:52:37 2014 -0700| [5a206569468ae390b0b3c81ba7cc421a0454a19c] | committer: Michael Niedermayer lavf/matroska: Add functions for WebM DASH Manifest Add functions and logic to matroskadec for use by the WebM DASH Manifest XML Muxer. The actual muxer is added in a future patch. Signed-off-by: Vignesh Venkatasubramanian Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a206569468ae390b0b3c81ba7cc421a0454a19c --- libavformat/matroska.h| 12 ++ libavformat/matroskadec.c | 368 + 2 files changed, 380 insertions(+) diff --git a/libavformat/matroska.h b/libavformat/matroska.h index 3bb5aee..e01b9de 100644 --- a/libavformat/matroska.h +++ b/libavformat/matroska.h @@ -284,4 +284,16 @@ extern const AVMetadataConv ff_mkv_metadata_conv[]; extern const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREO_MODE_COUNT]; extern const char * const ff_matroska_video_stereo_plane[MATROSKA_VIDEO_STEREO_PLANE_COUNT]; +/* AVStream Metadata tag keys for WebM Dash Manifest */ +#define INITIALIZATION_RANGE "webm_dash_manifest_initialization_range" +#define CUES_START "webm_dash_manifest_cues_start" +#define CUES_END "webm_dash_manifest_cues_end" +#define FILENAME "webm_dash_manifest_file_name" +#define BANDWIDTH "webm_dash_manifest_bandwidth" +#define DURATION "webm_dash_manifest_duration" +#define CLUSTER_KEYFRAME "webm_dash_manifest_cluster_keyframe" +#define CUE_TIMESTAMPS "webm_dash_manifest_cue_timestamps" +#define TRACK_NUMBER "webm_dash_manifest_track_number" +#define CODEC_PRIVATE_SIZE "webm_dash_manifest_codec_priv_size" + #endif /* AVFORMAT_MATROSKA_H */ diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 213767c..6fa8229 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3068,6 +3068,365 @@ static int matroska_read_close(AVFormatContext *s) return 0; } +typedef struct { +int64_t start_time_ns; +int64_t end_time_ns; +int64_t start_offset; +int64_t end_offset; +} CueDesc; + +/* This function searches all the Cues and returns the CueDesc corresponding the + * the timestamp ts. Returned CueDesc will be such that start_time_ns <= ts < + * end_time_ns. All 4 fields will be set to -1 if ts >= file's duration. + */ +static CueDesc get_cue_desc(AVFormatContext *s, int64_t ts, int64_t cues_start) { +MatroskaDemuxContext *matroska = s->priv_data; +CueDesc cue_desc; +int i; +int nb_index_entries = s->streams[0]->nb_index_entries; +AVIndexEntry *index_entries = s->streams[0]->index_entries; +if (ts >= matroska->duration * matroska->time_scale) return (CueDesc) {-1, -1, -1, -1}; +for (i = 1; i < nb_index_entries; i++) { +if (index_entries[i - 1].timestamp * matroska->time_scale <= ts && +index_entries[i].timestamp * matroska->time_scale > ts) { +break; +} +} +--i; +cue_desc.start_time_ns = index_entries[i].timestamp * matroska->time_scale; +cue_desc.start_offset = index_entries[i].pos - matroska->segment_start; +if (i != nb_index_entries - 1) { +cue_desc.end_time_ns = index_entries[i + 1].timestamp * matroska->time_scale; +cue_desc.end_offset = index_entries[i + 1].pos - matroska->segment_start; +} else { +cue_desc.end_time_ns = matroska->duration * matroska->time_scale; +// FIXME: this needs special handling for files where Cues appear +// before Clusters. the current logic assumes Cues appear after +// Clusters. +cue_desc.end_offset = cues_start - matroska->segment_start; +} +return cue_desc; +} + +static int webm_clusters_start_with_keyframe(AVFormatContext *s) +{ +MatroskaDemuxContext *matroska = s->priv_data; +int64_t cluster_pos, before_pos; +int index, rv = 1; +if (s->streams[0]->nb_index_entries <= 0) return 0; +// seek to the first cluster using cues. +index = av_index_search_timestamp(s->streams[0], 0, 0); +if (index < 0) return 0; +cluster_pos = s->streams[0]->index_entries[index].pos; +before_pos = avio_tell(s->pb); +while (1) { +int64_t cluster_id = 0, cluster_length = 0; +AVPacket *pkt; +avio_seek(s->pb, cluster_pos, SEEK_SET); +// read cluster id and length +ebml_read_num(matroska, matroska->ctx->pb, 4, &cluster_id); +ebml_read_length(matroska, matroska->ctx->pb, &cluster_length); +if (cluster_id != 0xF43B675) { // done with all clusters +break; +} +avio_seek(s->pb, cluster_pos, SEEK_SET); +matroska->current_id = 0; +matroska_clear_queue(matroska); +if (matroska_parse_cluster(matroska) < 0 || +matroska->num_packets <= 0) { +break; +} +pkt = matroska->packets[0]; +cluster_pos += cluster_length + 12; // 12 is the
[FFmpeg-cvslog] avdevice/avfoundation: kCVPixelFormatType_OneComponent8 only exists from 10.8 onward
ffmpeg | branch: master | Hanspeter Niederstrasser | Sun Jul 13 21:49:24 2014 -0500| [04980dbee805f372f0505a0afd9ae10c0da1e17e] | committer: Michael Niedermayer avdevice/avfoundation: kCVPixelFormatType_OneComponent8 only exists from 10.8 onward Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04980dbee805f372f0505a0afd9ae10c0da1e17e --- libavdevice/avfoundation.m |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index df322c6..74d7811 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -70,7 +70,9 @@ static const struct AVFPixelFormatSpec avf_pixel_formats[] = { { AV_PIX_FMT_YUV420P, kCVPixelFormatType_420YpCbCr8Planar }, { AV_PIX_FMT_NV12, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange }, { AV_PIX_FMT_YUYV422, kCVPixelFormatType_422YpCbCr8_yuvs }, +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 { AV_PIX_FMT_GRAY8,kCVPixelFormatType_OneComponent8 }, +#endif { AV_PIX_FMT_NONE, 0 } }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/drawtext: Add basic text shaping using libfribidi
ffmpeg | branch: master | Marc Jeffreys | Sat Jun 21 05:41:45 2014 +0100| [a0b71e9f3e95d22b098e4d81c26d3bfe1f53249f] | committer: Michael Niedermayer avfilter/drawtext: Add basic text shaping using libfribidi Fixes ticket #3758 Reviewed-by: Andrey Utkin Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0b71e9f3e95d22b098e4d81c26d3bfe1f53249f --- Changelog |1 + RELEASE_NOTES |1 + configure |3 ++ doc/filters.texi | 11 libavfilter/version.h |2 +- libavfilter/vf_drawtext.c | 123 ++--- 6 files changed, 134 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index ddf0f05..24a3c01 100644 --- a/Changelog +++ b/Changelog @@ -35,6 +35,7 @@ version : - LRC demuxer and muxer - Samba protocol (via libsmbclient) - WebM DASH Manifest muxer +- libfribidi support in drawtext version 2.2: diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 4502d9f..145abfa 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -164,6 +164,7 @@ • signalstats filter • hqx filter (hq2x, hq3x, hq4x) • flanger filter +• libfribidi support in drawtext ┌┐ │ ⚠ Behaviour changes │ diff --git a/configure b/configure index 8c8aef6..4ed43a0 100755 --- a/configure +++ b/configure @@ -209,6 +209,7 @@ External library support: --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] --enable-libfliteenable flite (voice synthesis) support via libflite [no] --enable-libfreetype enable libfreetype [no] + --enable-libfribidi enable libfribidi [no] --enable-libgme enable Game Music Emu via libgme [no] --enable-libgsm enable GSM de/encoding via libgsm [no] --enable-libiec61883 enable iec61883 via libiec61883 [no] @@ -1333,6 +1334,7 @@ EXTERNAL_LIBRARY_LIST=" libflite libfontconfig libfreetype +libfribidi libgme libgsm libiec61883 @@ -4729,6 +4731,7 @@ enabled libflite && require2 libflite "flite/flite.h" flite_init $flite enabled fontconfig&& enable libfontconfig enabled libfontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit enabled libfreetype && require_libfreetype +enabled libfribidi&& require_pkg_config fribidi fribidi.h fribidi_version_info enabled libgme&& require libgme gme/gme.h gme_new_emu -lgme -lstdc++ enabled libgsm&& { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do check_lib "${gsm_hdr}" gsm_create -lgsm && break; diff --git a/doc/filters.texi b/doc/filters.texi index 65106a5..0f73314 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3653,6 +3653,8 @@ To enable compilation of this filter, you need to configure FFmpeg with @code{--enable-libfreetype}. To enable default font fallback and the @var{font} option you need to configure FFmpeg with @code{--enable-libfontconfig}. +To enable the @var{text_shaping} option, you need to configure FFmpeg with +@code{--enable-libfribidi}. @subsection Syntax @@ -3707,6 +3709,12 @@ This parameter is mandatory if the fontconfig support is disabled. The font size to be used for drawing text. The default value of @var{fontsize} is 16. +@item text_shaping +If set to 1, attempt to shape the text (for example, reverse the order of +right-to-left text and join Arabic characters) before drawing it. +Otherwise, just draw the text exactly as given. +By default 1 (if supported). + @item ft_load_flags The flags to be used for loading the fonts. @@ -4010,6 +4018,9 @@ For more information about libfreetype, check: For more information about fontconfig, check: @url{http://freedesktop.org/software/fontconfig/fontconfig-user.html}. +For more information about libfribidi, check: +@url{http://fribidi.org/}. + @section edgedetect Detect and draw edges. The filter uses the Canny Edge Detection algorithm. diff --git a/libavfilter/version.h b/libavfilter/version.h index bf9191e..227d320 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 4 -#define LIBAVFILTER_VERSION_MINOR 10 +#define LIBAVFILTER_VERSION_MINOR 11 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 0d829a6..0b93d14 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -59,6 +59,10 @@ #include "internal.h" #include "video.h" +#if CONFIG_LIBFRIBIDI +#include +#endif + #include #include FT_FREETYPE_H #include FT_GLYPH_H @@ -182,6 +186,9 @@ typedef struct DrawTextContext { int tc24hmax; ///< 1 if timecode is wrapped to 24 hours, 0 otherwise int reload;
[FFmpeg-cvslog] avfilter/drawtext: Add basic text shaping using libfribidi
ffmpeg | branch: release/2.3 | Marc Jeffreys | Sat Jun 21 05:41:45 2014 +0100| [a0b71e9f3e95d22b098e4d81c26d3bfe1f53249f] | committer: Michael Niedermayer avfilter/drawtext: Add basic text shaping using libfribidi Fixes ticket #3758 Reviewed-by: Andrey Utkin Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0b71e9f3e95d22b098e4d81c26d3bfe1f53249f --- Changelog |1 + RELEASE_NOTES |1 + configure |3 ++ doc/filters.texi | 11 libavfilter/version.h |2 +- libavfilter/vf_drawtext.c | 123 ++--- 6 files changed, 134 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index ddf0f05..24a3c01 100644 --- a/Changelog +++ b/Changelog @@ -35,6 +35,7 @@ version : - LRC demuxer and muxer - Samba protocol (via libsmbclient) - WebM DASH Manifest muxer +- libfribidi support in drawtext version 2.2: diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 4502d9f..145abfa 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -164,6 +164,7 @@ • signalstats filter • hqx filter (hq2x, hq3x, hq4x) • flanger filter +• libfribidi support in drawtext ┌┐ │ ⚠ Behaviour changes │ diff --git a/configure b/configure index 8c8aef6..4ed43a0 100755 --- a/configure +++ b/configure @@ -209,6 +209,7 @@ External library support: --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] --enable-libfliteenable flite (voice synthesis) support via libflite [no] --enable-libfreetype enable libfreetype [no] + --enable-libfribidi enable libfribidi [no] --enable-libgme enable Game Music Emu via libgme [no] --enable-libgsm enable GSM de/encoding via libgsm [no] --enable-libiec61883 enable iec61883 via libiec61883 [no] @@ -1333,6 +1334,7 @@ EXTERNAL_LIBRARY_LIST=" libflite libfontconfig libfreetype +libfribidi libgme libgsm libiec61883 @@ -4729,6 +4731,7 @@ enabled libflite && require2 libflite "flite/flite.h" flite_init $flite enabled fontconfig&& enable libfontconfig enabled libfontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit enabled libfreetype && require_libfreetype +enabled libfribidi&& require_pkg_config fribidi fribidi.h fribidi_version_info enabled libgme&& require libgme gme/gme.h gme_new_emu -lgme -lstdc++ enabled libgsm&& { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do check_lib "${gsm_hdr}" gsm_create -lgsm && break; diff --git a/doc/filters.texi b/doc/filters.texi index 65106a5..0f73314 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3653,6 +3653,8 @@ To enable compilation of this filter, you need to configure FFmpeg with @code{--enable-libfreetype}. To enable default font fallback and the @var{font} option you need to configure FFmpeg with @code{--enable-libfontconfig}. +To enable the @var{text_shaping} option, you need to configure FFmpeg with +@code{--enable-libfribidi}. @subsection Syntax @@ -3707,6 +3709,12 @@ This parameter is mandatory if the fontconfig support is disabled. The font size to be used for drawing text. The default value of @var{fontsize} is 16. +@item text_shaping +If set to 1, attempt to shape the text (for example, reverse the order of +right-to-left text and join Arabic characters) before drawing it. +Otherwise, just draw the text exactly as given. +By default 1 (if supported). + @item ft_load_flags The flags to be used for loading the fonts. @@ -4010,6 +4018,9 @@ For more information about libfreetype, check: For more information about fontconfig, check: @url{http://freedesktop.org/software/fontconfig/fontconfig-user.html}. +For more information about libfribidi, check: +@url{http://fribidi.org/}. + @section edgedetect Detect and draw edges. The filter uses the Canny Edge Detection algorithm. diff --git a/libavfilter/version.h b/libavfilter/version.h index bf9191e..227d320 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 4 -#define LIBAVFILTER_VERSION_MINOR 10 +#define LIBAVFILTER_VERSION_MINOR 11 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 0d829a6..0b93d14 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -59,6 +59,10 @@ #include "internal.h" #include "video.h" +#if CONFIG_LIBFRIBIDI +#include +#endif + #include #include FT_FREETYPE_H #include FT_GLYPH_H @@ -182,6 +186,9 @@ typedef struct DrawTextContext { int tc24hmax; ///< 1 if timecode is wrapped to 24 hours, 0 otherwise int reload;
[FFmpeg-cvslog] avcodec/hevc: clear HEVClcList[i] on allocation
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 01:33:50 2014 +0200| [cf92cc8751bb27666a5b8c7c384a3c6b379823b3] | committer: Michael Niedermayer avcodec/hevc: clear HEVClcList[i] on allocation Fixes fate failure with --enable-memory-poisoning && make THREAD_TYPE=slice THREADS=7 fate-hevc-conformance-ENTP_C_Qualcomm_1 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf92cc8751bb27666a5b8c7c384a3c6b379823b3 --- libavcodec/hevc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index cccd07a..afb2baa 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2427,7 +2427,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const uint8_t *nal, int length) for (i = 1; i < s->threads_number; i++) { s->sList[i] = av_malloc(sizeof(HEVCContext)); memcpy(s->sList[i], s, sizeof(HEVCContext)); -s->HEVClcList[i] = av_malloc(sizeof(HEVCLocalContext)); +s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext)); s->sList[i]->HEVClc = s->HEVClcList[i]; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] update for FFmpeg 2.3
ffmpeg | branch: release/2.3 | Michael Niedermayer | Wed Jul 16 01:45:34 2014 +0200| [7fa72ff19cc01030aa81195eb778234efa556b0d] | committer: Michael Niedermayer update for FFmpeg 2.3 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fa72ff19cc01030aa81195eb778234efa556b0d --- RELEASE |2 +- VERSION |1 + doc/Doxyfile |2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index bd5ee42..bb576db 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.git +2.3 diff --git a/VERSION b/VERSION new file mode 100644 index 000..bb576db --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.3 diff --git a/doc/Doxyfile b/doc/Doxyfile index 8697e6c..7b2a785 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = 2.3 # With the PROJECT_LOGO tag one can specify a logo or icon that is included # in the documentation. The maximum height of the logo should not exceed 55 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc: clear HEVClcList[i] on allocation
ffmpeg | branch: release/2.3 | Michael Niedermayer | Wed Jul 16 01:33:50 2014 +0200| [cf92cc8751bb27666a5b8c7c384a3c6b379823b3] | committer: Michael Niedermayer avcodec/hevc: clear HEVClcList[i] on allocation Fixes fate failure with --enable-memory-poisoning && make THREAD_TYPE=slice THREADS=7 fate-hevc-conformance-ENTP_C_Qualcomm_1 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf92cc8751bb27666a5b8c7c384a3c6b379823b3 --- libavcodec/hevc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index cccd07a..afb2baa 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2427,7 +2427,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const uint8_t *nal, int length) for (i = 1; i < s->threads_number; i++) { s->sList[i] = av_malloc(sizeof(HEVCContext)); memcpy(s->sList[i], s, sizeof(HEVCContext)); -s->HEVClcList[i] = av_malloc(sizeof(HEVCLocalContext)); +s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext)); s->sList[i]->HEVClc = s->HEVClcList[i]; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] RELEASE_NOTES: update version numbers
ffmpeg | branch: release/2.3 | Michael Niedermayer | Wed Jul 16 02:01:14 2014 +0200| [e32249605456a9a2367d76b30dfe8894d60cc4f6] | committer: Michael Niedermayer RELEASE_NOTES: update version numbers Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e32249605456a9a2367d76b30dfe8894d60cc4f6 --- RELEASE_NOTES |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 145abfa..8677067 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -33,9 +33,9 @@ • libavutil 52.92.100 • libavcodec 55.69.100 - • libavformat55.47.100 + • libavformat55.48.100 • libavdevice55.13.102 - • libavfilter 4.10.100 + • libavfilter 4.11.100 • libswscale 2. 6.100 • libswresample 0.19.100 • libpostproc52. 3.100 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/APIchanges: update
ffmpeg | branch: release/2.3 | Michael Niedermayer | Wed Jul 16 02:06:44 2014 +0200| [2678b2509910ef2d32de0b5fbe6723a88293b7aa] | committer: Michael Niedermayer doc/APIchanges: update Signed-off-by: Michael Niedermayer (cherry picked from commit 13a72d9b08c914c3d3c99be1053e9d5cda8baa88) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2678b2509910ef2d32de0b5fbe6723a88293b7aa --- doc/APIchanges | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index e87f165..c0486f2 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,13 +15,13 @@ libavutil: 2012-10-22 API changes, most recent first: -2014-07-14 - xxx - lavf 55.47.100 - avformat.h +2014-07-14 - 62227a7 - lavf 55.47.100 - avformat.h Add av_stream_get_parser() -2014-07-xx - xxx - lavu 53.18.0 - display.h +2014-07-09 - c67690f / a54f03b - lavu 52.92.100 / 53.18.0 - display.h Add av_display_matrix_flip() to flip the transformation matrix. -2014-07-xx - xxx - lavc 55.56.0 - dv_profile.h +2014-07-09 - 1b58f13 / f6ee61f - lavc 55.69.100 / 55.56.0 - dv_profile.h Add a public API for DV profile handling. 2014-06-20 - 0dceefc / 9e500ef - lavu 52.90.100 / 53.17.0 - imgutils.h @@ -42,7 +42,7 @@ API changes, most recent first: 2014-05-30 - 00759d7 - lavu 52.89.100 - opt.h Add av_opt_copy() -2014-04-xx - 03bb99a / 0957b27 - lavc 55.66.100 / 55.54.0 - avcodec.h +2014-06-01 - 03bb99a / 0957b27 - lavc 55.66.100 / 55.54.0 - avcodec.h Add AVCodecContext.side_data_only_packets to allow encoders to output packets with only side data. This option may become mandatory in the future, so all users are recommended to update their code and enable this option. @@ -52,7 +52,7 @@ API changes, most recent first: AVColorTransferCharacteristic, and AVChromaLocation) inside lavu. And add AVFrame fields for them. -2014-04-xx - bdb2e80 / b2d4565 - lavr 1.3.0 - avresample.h +2014-05-29 - bdb2e80 / b2d4565 - lavr 1.3.0 - avresample.h Add avresample_max_output_samples 2014-05-24 - d858ee7 / 6d21259 - lavf 55.42.100 / 55.19.0 - avformat.h ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/APIchanges: update
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 02:06:44 2014 +0200| [13a72d9b08c914c3d3c99be1053e9d5cda8baa88] | committer: Michael Niedermayer doc/APIchanges: update Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13a72d9b08c914c3d3c99be1053e9d5cda8baa88 --- doc/APIchanges | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index e87f165..c0486f2 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,13 +15,13 @@ libavutil: 2012-10-22 API changes, most recent first: -2014-07-14 - xxx - lavf 55.47.100 - avformat.h +2014-07-14 - 62227a7 - lavf 55.47.100 - avformat.h Add av_stream_get_parser() -2014-07-xx - xxx - lavu 53.18.0 - display.h +2014-07-09 - c67690f / a54f03b - lavu 52.92.100 / 53.18.0 - display.h Add av_display_matrix_flip() to flip the transformation matrix. -2014-07-xx - xxx - lavc 55.56.0 - dv_profile.h +2014-07-09 - 1b58f13 / f6ee61f - lavc 55.69.100 / 55.56.0 - dv_profile.h Add a public API for DV profile handling. 2014-06-20 - 0dceefc / 9e500ef - lavu 52.90.100 / 53.17.0 - imgutils.h @@ -42,7 +42,7 @@ API changes, most recent first: 2014-05-30 - 00759d7 - lavu 52.89.100 - opt.h Add av_opt_copy() -2014-04-xx - 03bb99a / 0957b27 - lavc 55.66.100 / 55.54.0 - avcodec.h +2014-06-01 - 03bb99a / 0957b27 - lavc 55.66.100 / 55.54.0 - avcodec.h Add AVCodecContext.side_data_only_packets to allow encoders to output packets with only side data. This option may become mandatory in the future, so all users are recommended to update their code and enable this option. @@ -52,7 +52,7 @@ API changes, most recent first: AVColorTransferCharacteristic, and AVChromaLocation) inside lavu. And add AVFrame fields for them. -2014-04-xx - bdb2e80 / b2d4565 - lavr 1.3.0 - avresample.h +2014-05-29 - bdb2e80 / b2d4565 - lavr 1.3.0 - avresample.h Add avresample_max_output_samples 2014-05-24 - d858ee7 / 6d21259 - lavf 55.42.100 / 55.19.0 - avformat.h ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Changelog: change "version " to "version 2.3"
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 02:09:06 2014 +0200| [faafd1e4f1fcc2d618633eae4dc532050b2be988] | committer: Michael Niedermayer Changelog: change "version " to "version 2.3" Found-by: jamrial Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=faafd1e4f1fcc2d618633eae4dc532050b2be988 --- Changelog |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 24a3c01..07cf1cf 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version : +version 2.3: - AC3 fixed-point decoding - shuffleplanes filter - subfile protocol ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Changelog: change "version " to "version 2.3"
ffmpeg | branch: release/2.3 | Michael Niedermayer | Wed Jul 16 02:09:06 2014 +0200| [bc4f6ae88e5fa3b7c0de33583e3299f83f3499ef] | committer: Michael Niedermayer Changelog: change "version " to "version 2.3" Found-by: jamrial Signed-off-by: Michael Niedermayer (cherry picked from commit faafd1e4f1fcc2d618633eae4dc532050b2be988) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc4f6ae88e5fa3b7c0de33583e3299f83f3499ef --- Changelog |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 24a3c01..07cf1cf 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version : +version 2.3: - AC3 fixed-point decoding - shuffleplanes filter - subfile protocol ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] RELEASE_NOTES: update
ffmpeg | branch: release/2.3 | Timothy Gu | Tue Jul 15 17:39:24 2014 -0700| [bef4d9bf87f755be62c8cc35b1c333596e41b3c6] | committer: Michael Niedermayer RELEASE_NOTES: update Signed-off-by: Timothy Gu Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bef4d9bf87f755be62c8cc35b1c333596e41b3c6 --- RELEASE_NOTES | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 8677067..0780595 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -7,9 +7,10 @@ since the release of FFmpeg 2.2. In this release, there are lots of internal overhauls that make FFmpeg a - more accessible project for new developers. Many important new features - like QTKit and AVFoundation input devices are committed. Contributions done - by Libav such as a new native Opus decoder are also merged. + more accessible project for new developers. Many important new + optimizations and features like QTKit and AVFoundation input devices are + committed. Contributions done by Libav such as a new native Opus decoder + are also merged. Because of the increasing difficulty to maintain and lack of maintainers, we are very sorry to say that we have removed all Blackfin and SPARC @@ -17,8 +18,9 @@ interested in maintaining optimization for these two architecture, feel free to contact us and we will restore the code! - Since this release, the traditional Changelog file is upgraded to this - modern-looking release note. Old changelogs are moved to doc/Changelog.old. + Oh, and since this release, this modern-looking release note is provided in + addition to the old-style Changelog file, to make it easier for you to + focus on the most important features in this release. Enjoy! ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Tag n2.3 : FFmpeg 2.3 release
[ffmpeg] [branch: refs/tags/n2.3] Tag:606f9dbd233d95cc3681c70bc883f7356a2c7ac2 > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=606f9dbd233d95cc3681c70bc883f7356a2c7ac2 Tagger: Michael Niedermayer Date: Wed Jul 16 03:16:22 2014 +0200 FFmpeg 2.3 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 04d476b web/download: add FFmpeg 2.3
The branch, master has been updated via 04d476be5126c0e2cae013816a4b8ba72ef40ed2 (commit) from 4bd578c97cc4bc93800f9a8bd4837d11a255be10 (commit) - Log - commit 04d476be5126c0e2cae013816a4b8ba72ef40ed2 Author: Michael Niedermayer AuthorDate: Wed Jul 16 03:31:58 2014 +0200 Commit: Michael Niedermayer CommitDate: Wed Jul 16 03:31:58 2014 +0200 web/download: add FFmpeg 2.3 diff --git a/src/download b/src/download index f1391c5..3be3b84 100644 --- a/src/download +++ b/src/download @@ -168,6 +168,37 @@ selected changes from the development branch, which therefore receives much more and much faster bug fixes such as additional features and security patches. + +FFmpeg 2.3 "Mandelbrot" + + +2.3 was released on 2014-07-16. It is the latest stable FFmpeg release +from the 2.3 release branch, which was cut from master on 2014-07-16. +Amongst lots of other changes, it includes all changes from +ffmpeg-mt, libav master of 2014-07-15, libav 10.2 as of 2014-07-15. + +It includes the following library versions: + + + libavutil 52. 92.100 + libavcodec 55. 69.100 + libavformat55. 48.100 + libavdevice55. 13.102 + libavfilter 4. 11.100 + libswscale 2. 6.100 + libswresample 0. 19.100 + libpostproc52. 3.100 + + + +Download bzip2 tarball +PGP signature +Download gzip tarball +PGP signature +http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.3";>Changelog +http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=n2.3";>Release Notes + + FFmpeg 2.2.5 "Muybridge" --- Summary of changes: src/download | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/snowdec: remove mpegvideoencdsp dependency
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 04:10:25 2014 +0200| [8156e036e52777532b15d509c3962fb883dabbc9] | committer: Michael Niedermayer avcodec/snowdec: remove mpegvideoencdsp dependency Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8156e036e52777532b15d509c3962fb883dabbc9 --- configure|2 +- libavcodec/snow.c| 15 --- libavcodec/snowenc.c | 19 +++ 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 4ed43a0..0ac 100755 --- a/configure +++ b/configure @@ -2157,7 +2157,7 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_e rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_er mpegvideo videodsp" shorten_decoder_select="golomb" sipr_decoder_select="lsp" -snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder mpegvideoenc" +snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder" snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rangecoder" sonic_decoder_select="golomb rangecoder" sonic_encoder_select="golomb rangecoder" diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 711d1a4..e3518eb 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -433,7 +433,6 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ ff_videodsp_init(&s->vdsp, 8); ff_dwt_init(&s->dwt); ff_h264qpel_init(&s->h264qpel, 8); -ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx); #define mcf(dx,dy)\ s->qdsp.put_qpel_pixels_tab [0][dy+dx/4]=\ @@ -642,20 +641,6 @@ int ff_snow_frame_start(SnowContext *s){ int w= s->avctx->width; //FIXME round up to x16 ? int h= s->avctx->height; -if (s->current_picture->data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) { -s->mpvencdsp.draw_edges(s->current_picture->data[0], -s->current_picture->linesize[0], w , h , -EDGE_WIDTH , EDGE_WIDTH , EDGE_TOP | EDGE_BOTTOM); -if (s->current_picture->data[2]) { -s->mpvencdsp.draw_edges(s->current_picture->data[1], -s->current_picture->linesize[1], w>>s->chroma_h_shift, h>>s->chroma_v_shift, -EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM); -s->mpvencdsp.draw_edges(s->current_picture->data[2], -s->current_picture->linesize[2], w>>s->chroma_h_shift, h>>s->chroma_v_shift, -EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM); -} -} - ff_snow_release_buffer(s->avctx); tmp= s->last_picture[s->max_ref_frames-1]; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index cb83821..0911392 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -64,6 +64,8 @@ static av_cold int encode_init(AVCodecContext *avctx) ff_snow_common_end(avctx->priv_data); return ret; } +ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx); + ff_snow_alloc_blocks(s); s->version=0; @@ -1602,6 +1604,23 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda = 0; }//else keep previous frame's qlog until after motion estimation +if (s->current_picture->data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) { +int w = s->avctx->width; +int h = s->avctx->height; + +s->mpvencdsp.draw_edges(s->current_picture->data[0], +s->current_picture->linesize[0], w , h , +EDGE_WIDTH , EDGE_WIDTH , EDGE_TOP | EDGE_BOTTOM); +if (s->current_picture->data[2]) { +s->mpvencdsp.draw_edges(s->current_picture->data[1], +s->current_picture->linesize[1], w>>s->chroma_h_shift, h>>s->chroma_v_shift, +EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM); +s->mpvencdsp.draw_edges(s->current_picture->data[2], +s->current_picture->linesize[2], w>>s->chroma_h_shift, h>>s->chroma_v_shift, +EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM); +} +} + ff_snow_frame_start(s); avctx->coded_frame= s->current_picture; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] g2meet: allow size changes within original sizes
ffmpeg | branch: master | Vittorio Giovara | Tue Jul 15 15:22:11 2014 -0400| [14b4e64eabc84c5a5e57c8ccc56bbeb95380823b] | committer: Vittorio Giovara g2meet: allow size changes within original sizes > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14b4e64eabc84c5a5e57c8ccc56bbeb95380823b --- libavcodec/g2meet.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 456045d..c405f38 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -90,6 +90,7 @@ typedef struct G2MContext { intcompression; intwidth, height, bpp; +intorig_width, orig_height; inttile_width, tile_height; inttiles_x, tiles_y, tile_x, tile_y; @@ -710,8 +711,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, } c->width = bytestream2_get_be32(&bc); c->height = bytestream2_get_be32(&bc); -if (c->width < 16 || c->width > avctx->width || -c->height < 16 || c->height > avctx->height) { +if (c->width < 16 || c->width > c->orig_width || +c->height < 16 || c->height > c->orig_height) { av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions %dx%d\n", c->width, c->height); @@ -875,6 +876,10 @@ static av_cold int g2m_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_RGB24; +// store original sizes and check against those if resize happens +c->orig_width = avctx->width; +c->orig_height = avctx->height; + return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] diracdec: don't call ff_emulated_edge_mc_8 directly
ffmpeg | branch: master | James Almer | Tue Jul 15 22:37:25 2014 -0300| [b67a0e99ee82bc30af0b0d5f5e3a40bf584470f2] | committer: Michael Niedermayer diracdec: don't call ff_emulated_edge_mc_8 directly Use the videodsp function pointer instead. Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b67a0e99ee82bc30af0b0d5f5e3a40bf584470f2 --- libavcodec/diracdec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index a18c867..30e6138 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -38,7 +38,7 @@ #include "dirac_dwt.h" #include "dirac.h" #include "diracdsp.h" -#include "videodsp.h" // for ff_emulated_edge_mc_8 +#include "videodsp.h" /** * The spec limits the number of wavelet decompositions to 4 for both @@ -73,8 +73,6 @@ */ #define DELAYED_PIC_REF 4 -#define ff_emulated_edge_mc ff_emulated_edge_mc_8 /* Fix: change the calls to this function regarding bit depth */ - #define CALC_PADDING(size, depth) \ (((size + (1 << depth) - 1) >> depth) << depth) @@ -138,6 +136,7 @@ typedef struct Plane { typedef struct DiracContext { AVCodecContext *avctx; MpegvideoEncDSPContext mpvencdsp; +VideoDSPContext vdsp; DiracDSPContext diracdsp; GetBitContext gb; dirac_source_params source; @@ -425,6 +424,7 @@ static av_cold int dirac_decode_init(AVCodecContext *avctx) ff_diracdsp_init(&s->diracdsp); ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx); +ff_videodsp_init(&s->vdsp, 8); for (i = 0; i < MAX_FRAMES; i++) { s->all_frames[i].avframe = av_frame_alloc(); @@ -1451,10 +1451,10 @@ static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5], y + p->yblen > p->height+EDGE_WIDTH/2 || x < 0 || y < 0) { for (i = 0; i < nplanes; i++) { -ff_emulated_edge_mc(s->edge_emu_buffer[i], src[i], -p->stride, p->stride, -p->xblen, p->yblen, x, y, -p->width+EDGE_WIDTH/2, p->height+EDGE_WIDTH/2); +s->vdsp.emulated_edge_mc(s->edge_emu_buffer[i], src[i], + p->stride, p->stride, + p->xblen, p->yblen, x, y, + p->width+EDGE_WIDTH/2, p->height+EDGE_WIDTH/2); src[i] = s->edge_emu_buffer[i]; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '14b4e64eabc84c5a5e57c8ccc56bbeb95380823b'
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 03:40:13 2014 +0200| [f00bb086cb976a054a9c72df3a4fa7278a4f0dad] | committer: Michael Niedermayer Merge commit '14b4e64eabc84c5a5e57c8ccc56bbeb95380823b' * commit '14b4e64eabc84c5a5e57c8ccc56bbeb95380823b': g2meet: allow size changes within original sizes Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f00bb086cb976a054a9c72df3a4fa7278a4f0dad --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/snow: only allocate space for edges when encoding
ffmpeg | branch: master | Michael Niedermayer | Wed Jul 16 04:57:42 2014 +0200| [aa1d096d027be4fe901062f04a0b2adfb75af82f] | committer: Michael Niedermayer avcodec/snow: only allocate space for edges when encoding Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa1d096d027be4fe901062f04a0b2adfb75af82f --- libavcodec/snow.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index e3518eb..7cce7a5 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -69,19 +69,26 @@ void ff_snow_inner_add_yblock(const uint8_t *obmc, const int obmc_stride, uint8_ int ff_snow_get_buffer(SnowContext *s, AVFrame *frame) { int ret, i; +int edges_needed = av_codec_is_encoder(s->avctx->codec); -frame->width = s->avctx->width + 2 * EDGE_WIDTH; -frame->height = s->avctx->height + 2 * EDGE_WIDTH; +frame->width = s->avctx->width ; +frame->height = s->avctx->height; +if (edges_needed) { +frame->width += 2 * EDGE_WIDTH; +frame->height += 2 * EDGE_WIDTH; +} if ((ret = ff_get_buffer(s->avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; -for (i = 0; frame->data[i]; i++) { -int offset = (EDGE_WIDTH >> (i ? s->chroma_v_shift : 0)) * -frame->linesize[i] + -(EDGE_WIDTH >> (i ? s->chroma_h_shift : 0)); -frame->data[i] += offset; +if (edges_needed) { +for (i = 0; frame->data[i]; i++) { +int offset = (EDGE_WIDTH >> (i ? s->chroma_v_shift : 0)) * +frame->linesize[i] + +(EDGE_WIDTH >> (i ? s->chroma_h_shift : 0)); +frame->data[i] += offset; +} +frame->width = s->avctx->width; +frame->height = s->avctx->height; } -frame->width = s->avctx->width; -frame->height = s->avctx->height; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog